Hello,
I use the OnItemsRequested event to get the data from database:
Below are design code:
<telerik:RadComboBox ID="ddlItem" runat="server" Width="45%" ZIndex="50000" Height="400px"
DropDownWidth="500px" HighlightTemplatedItems="true" EmptyMessage="[ Search items by typing minimum 2 characters ]"
AllowCustomText="true" MarkFirstMatch="true" EnableLoadOnDemand="true" OnItemsRequested="ddlItem_OnItemsRequested"
Skin="Office2007" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnClientItemsRequesting="OnClientItemsRequesting"
CheckBoxes="true" >
<HeaderTemplate>
<table style="width: 100%" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 10%" align="left">
<asp:Literal ID="Literal1" runat="server" Text="Group"></asp:Literal>
</td>
<td style="width: 60%" align="left">
<asp:Literal ID="Literal2" runat="server" Text="Item Name"></asp:Literal>
</td>
<td style="width: 15%" align="right">
Stock
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 100%" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 10%" align="left">
<%# DataBinder.Eval(Container,"Attributes['ItemSubCategoryShortName']" )%>
</td>
<td style="width: 60%" align="left">
<%# DataBinder.Eval(Container, "Text")%>
</td>
<td style="width: 15%" align="right">
<%# DataBinder.Eval(Container, "Attributes['ClosingBalance']")%>
</td>
<td style="width: 10%; display: none;" align="right">
<%# DataBinder.Eval(Container, "Attributes['Percentage']")%>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
And i use the following code in c#:
protected void ddlItem_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
//write login code to get the data from database through ItemRequest event.
}
What I want is I use the checkbox to select multiple items or data from drop down and add all the checkboxs true to grid but when i use foreach loop then I can't get the checkbox true items.
Here is the code:
foreach (RadComboBoxItem ComboItem in ddlItem.CheckedItems)
{
if (ComboItem.Checked == true)
{
}
}
The above loop is not working when i try to get the checked true items.
Please help me as soon as possible.
I hope you understand my query.
Thanks
Jiten Mutum