asp.net - ListView ItemDataBound on all pages -


the itemdatabound event of asp.net listview seems deal visible page determined datapager.

how able utilize data binding on pages worth of listview?

this regarding using itemdatabound check checkboxes...

protected void lvcfr_itemdatabound(object sender, listviewitemeventargs e)     {         listview lv = (listview)sender;         listviewdataitem lvi = (listviewdataitem)e.item;         if (lvi.itemtype == listviewitemtype.dataitem)         {             checkbox cb = (checkbox)lvi.findcontrol("cb1");             dropdownlist ddl = (dropdownlist)lvi.findcontrol("ddl1");             if (ddl != null)                 ddl.enabled = false;              if (cb != null && ddl != null)             {                 int id = convert.toint32(lv.datakeys[lvi.displayindex].value);                 foreach (keyvaluepair<int, string> kv in cfrids)                     if (kv.key == id)                     {                         cb.checked = true;                         ddl.enabled = true;                         ddl.selectedvalue = kv.value;                         break;                     }             }         }     } 

the itemdatabound fired controls rendered. of other pages aren't being rendered. need set value in underlying dataset, or use temp table bind if checkbox not tied underlying data source.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -