c# - how to check all items in my RadListBox -
aspx.cs:
radlistdirectiondetail.datasource = m_listedirection; radlistdirectiondetail.datavaluefield = "departmentid"; radlistdirectiondetail.datatextfield = "departmentname"; radlistdirectiondetail.databind(); if (radlistdirectiondetail.items.count > 0) { (int = 0; < radlistdirectiondetail.items.count; i++) { radlistdirectiondetail.items[i].checked = false; } }
aspx:
<telerik:radajaxpanel runat="server" id="radajaxpanel2"> <telerik:radlistbox id="radlistdirectiondetail" runat="server" checkboxes="true" width="200px" showcheckall = "true" selectionmode="multiple" autopostback="true" height="55px" skin="outlook" visible="false" enabled="false"> </telerik:radlistbox> </telerik:radajaxpanel>
i think problem visible , enabled properties of radlistbox both set false.
try
<telerik:radlistbox id="radlistdirectiondetail" runat="server" checkboxes="true" width="200px" showcheckall = "true" selectionmode="multiple" autopostback="true" height="55px" skin="outlook" visible="true" enabled="true">
and
radlistdirectiondetail.items[i].checked = true;
Comments
Post a Comment