c# - Calling RowDataBound Event when the page is refreshed -
i having gridview , binding if not postback, want call function rowdatabound when postback. how can that
protected void gridview1_rowdatabound(object sender, gridviewroweventargs e) { if (e.row.rowindex == -1) { //some logic } } protected void page_load(object sender, eventargs e) { if (!ispostback) { loadgridview(); } else { gridview1_rowdatabound(null, null); // object reference not set instance of object } } how can call ?
Comments
Post a Comment