c# - Get Gridview cell value on cell click -
i have gridview having sqldatasource stored procedure. stored procedure creates matrix table. want when click on cell of gridview display value of specific cell popup window. gridview:
<asp:gridview id="gridview1" runat="server" datasourceid="sqldatasource1" backcolor="white" bordercolor="#dedfde" borderstyle="none" borderwidth="1px" cellpadding="4" forecolor="black" gridlines="vertical"> <alternatingrowstyle backcolor="white" /><footerstyle backcolor="#cccc99" /> <headerstyle backcolor="#6b696b" font-bold="true" forecolor="white" /> <pagerstyle backcolor="#f7f7de" forecolor="black" horizontalalign="right" /> <rowstyle backcolor="#f7f7de" /> <selectedrowstyle backcolor="#ce5d5a" font-bold="true" forecolor="white" /></asp:gridview> <asp:sqldatasource id="sqldatasource1" runat="server" connectionstring="<%$ connectionstrings:cntest %>" selectcommand="test_matrix" selectcommandtype="storedprocedure"> <selectparameters> <asp:parameter defaultvalue="59" name="selectidvar" type="int32" /> <asp:sessionparameter defaultvalue="" name="dateid" sessionfield="dateid" type="int32" /> </selectparameters> </asp:sqldatasource>
try writing custom event gridview cell click , write javascript show popup on cell click event of gridview. sample javascript: scriptmanager.registerstartupscript(this, typeof(string), "open_window", window.open(target,'height=400,width=800,status=1,toolbar=1,menubar=1,resizable=1,location=1,scrollbars=1'), true);
Comments
Post a Comment