asp.net - update panel not binding data -
i have gridview when click on cell populates gridview sessions parameter passed gridview1 gridview2 placed update panel gets parameter gridview1 updates rebind gridview2 gridview not rebinding when updated
<asp:updatepanel id="updatepanel1" runat="server" updatemode="conditional"> <contenttemplate> <ig:webdatagrid id="webdatagrid2" runat="server" width="400px" autogeneratecolumns="false" datasourceid="sqldatatesting2"> <columns> <ig:bounddatafield datafieldname="pressname" key="pressname"> <header text="pressname" /> </ig:bounddatafield> <ig:bounddatafield datafieldname="minwidth" key="minwidth"> <header text="minwidth" /> </ig:bounddatafield> <ig:bounddatafield datafieldname="minheight" key="minheight"> <header text="minheight" /> </ig:bounddatafield> <ig:bounddatafield datafieldname="maxwidth" key="maxwidth"> <header text="maxwidth" /> </ig:bounddatafield> <ig:bounddatafield datafieldname="maxheight" key="maxheight"> <header text="maxheight" /> </ig:bounddatafield> </columns> </ig:webdatagrid> <asp:sqldatasource id="sqldatatesting2" runat="server" connectionstring="<%$ connectionstrings:masterconnectionstring %>" ****selectcommand="select [pressname], [minwidth], [minheight], [maxwidth], [maxheight] [pressinfonew] ([pressname] = @pressname) order [pressname]">**** <selectparameters> <asp:sessionparameter name="pressname" sessionfield="pressname" type="string" /> </selectparameters> </asp:sqldatasource> </contenttemplate> </asp:updatepanel>
public sub webdatagrid1_cellselectionchanged(sender object, e infragistics.web.ui.gridcontrols.selectedcelleventargs) handles webdatagrid1.cellselectionchanged dim pressname = e.currentselectedcells(0).text session("pressname") = pressname webdatagrid2.databind() end sub
public sub updatepanel1_load(sender object, e system.eventargs) handles updatepanel1.prerender webdatagrid1.databind() end sub
try put gridview1 in same updatepanel of gridview2
remove selectcommand sqldatatesting2 in webdatagrid1_cellselectionchanged
sqldatatesting2.selectcommand="select [pressname], [minwidth], [minheight], [maxwidth], [maxheight] [pressinfonew] ([pressname] = pressname ) order [pressname]" sqldatatesting2.databind() webdatagrid2.databind()
Comments
Post a Comment