Sunday, 15 April 2012

html - Setting the Control in RadGrid to Visible-False -



html - Setting the Control in RadGrid to Visible-False -

i need help getting id of command in radgrid in order set visable=false.

the lastly function creating pic based on value that's coming db. how can set hyperlink next pic i'm adding visible false?

i think need send function renderlinked hyperlink command don't know how , hope 1 can show me way.

<telerik:radgrid id="rgphonebook" runat="server" autogeneratecolumns="false" allowpaging="true" allowsorting="true" pagesize="50" cellspacing="0" gridlines="none" onitemcommand="rgphonebook_itemcommand" onpageindexchanged="rgphonebook_onpageindexchanged" onsortcommand="rgphonebook_onsortcommand" onitemcreated="rgphonebook_onitemcreated" enableheadercontextfiltermenu="true" width="933px" height="528px"> <clientsettings> <selecting allowrowselect="true"></selecting> <scrolling allowscroll="true" usestaticheaders="true" savescrollposition="true" frozencolumnscount="2" /> </clientsettings> <mastertableview showheaderswhennorecords="true" nomasterrecordstext="no phonebook records display" font-size="11px" gridlines="none" allowpaging="true" itemstyle-height="25px" commanditemdisplay="top" allowautomaticupdates="false" tablelayout="auto" datakeynames="locationid,personid" clientdatakeynames="locationid,personid"> <pagerstyle mode="numericpages"></pagerstyle> <columns> <telerik:gridtemplatecolumn headertext="linked" headerstyle-width="45px" > <itemtemplate> <span id="spanhyperlink" style="visibility:visible" runat="server"> <asp:hyperlink id="link" runat="server" text="link"> </asp:hyperlink> </span> <%# renderlinked(databinder.eval(container.dataitem, "linked"))%> </itemtemplate> </telerik:gridtemplatecolumn> </columns> </mastertableview> </telerik:radgrid> protected function renderlinked(byval inputval string) string dim output string = "" seek dim svcs new systemservices if not inputval nil , not string.isnullorempty(inputval) if inputval = true output = "<img src='" + globals.grootrelativesecureurl("\images\layout\link.png") + "' width=""13"" height=""13"" border=""0"" align=""absmiddle"">" else 'dim item griddataitem = directcast(e.item, griddataitem) 'dim link hyperlink = directcast(item("link").controls(0), hyperlink) 'linkbutton.disabledcssclass = true me.page.clientscript.registerstartupscript(me.gettype(), "startupscript", "sys.application.add_load(function() { disablehyperlinkcss(); });", true) 'output = "<a herf='#' onclick='showpersonlinkmodal() ;'>link</a>" end if end if grab ex exception globals.sendemailerror(ex, m_user.sessionid, system.reflection.methodbase.getcurrentmethod.name.tostring(), request.rawurl.tostring(), m_user.userid) end seek homecoming output end function

if want set control's attribute visible=false in code behind when rows bound info 1 1 may utilize rowdatabound event , write next code in it's handler

control_type control_id = (control_type) e.row.findcontrol("control_id"); control_id.visible = false;

and if want set in javascript,

rgphonebook.rows[record_index].cells[0].visible = false;

hope helps you. above code in c#, please convert it's equivalent in vb.

html asp.net vb.net telerik

No comments:

Post a Comment