本文介绍了radcombobox控件的CheckBox mulitselect得到CheckedItems值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为MPHome.master母版页包含一个radcombobox控件这里的code

I have master page named MPHome.master contains a RadComboBox here is the code of

<telerik:RadComboBox CheckBoxes="true" EnableCheckAllItemsCheckBox="true" ID="TaskID" runat="server" Height="100" Width="150" EmptyMessage="Select a Task"
EnableLoadOnDemand="true" OnClientItemsRequesting="OnClientItemsRequesting"    WebServiceSettings-UseHttpGet="true" ShowMoreResultsBox="true"  EnableVirtualScrolling="true">
        <WebServiceSettings Method="GetTasks" Path="~/ProjectDropDownWebService.asmx"   />
        </telerik:RadComboBox>

现在这个组合工作正常,它填补了从Web服务价值,也显示了复选框it.Now我做的是我继承了这个母版页Default.aspx页面,并在里面默认页面提交按钮,我已经使用这个$ C $ ç

Now this combo works fine it fills values from webservice and also shows checkboxes on it.Now what I do is I inherit this master page to Default.aspx page and inside button of submit in default page I have used this code

 protected void btnViewAllTask_Click(object sender, EventArgs e)
    {
         RadComboBox TaskID = (RadComboBox)Master.FindControl("TaskID");
    var selectedtask = TaskID.CheckedItems;
}

这selectedtask返回任我选择了它的所有记录我算零。

This selectedtask returns me count of zero either i have selected all the records on it.

推荐答案

据我所知。您正在尝试使用复选框以按需加载功能,这是不是与Telerik的复选框radcombobox控件=真。

As far as I know. You are trying to use the CheckBoxes along with Load On Demand feature which is not a supported scenario with telerik RadComboBox with checkboxes=true.

请有关此主题 rel=\"nofollow\">

Please find more details about this topic here.

这篇关于radcombobox控件的CheckBox mulitselect得到CheckedItems值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-26 21:56