c# - GetPostBackClientHyperlink stops when navigating a second grid on the page -


i have 2 grids on page. on pageload both grids have data expected

the first grid has event on rowdatabound

protected void onrowdatabound(object sender, system.web.ui.webcontrols.gridviewroweventargs e) {     if (e.row.rowtype == datacontrolrowtype.datarow)     {         e.row.attributes["onclick"] = page.clientscript.getpostbackclienthyperlink(gridview1, "select$" + e.row.rowindex);         e.row.tooltip = "click select row.";     } } 

the first grid's row click works expected. when start navigating through second grid using 'next' button, rowclick on first grid stops working. next button click on second grid below

    protected void lbtnnext_click(object sender, eventargs e)     {         try         {             int pageindex = (int)viewstate["current"] + 1;             if (pageindex < grdimages.pagecount)             {                 grdimages.pageindex = pageindex;                 bindsecondgrid();                 viewstate["current"] = pageindex;             }             else             {                 bindsecondgrid();             }         }         catch (exception ex)         {             // catch exception         }     } 

the datasource on second grid different first grid , the databind() on first never called during navigation of second grid. idea wrong?

any idea why happen?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -