Hi,
I,m using RadComboBox with multi columns like “EmployeeStatus” & “StatusID” and applying search on both the columns. Once I have selected an employee status, saving StatusID of that status in the database. Its working fine. But my problem is that if I,m loading that statusID from the database and again binding radcomboBox with this id and doing selected true for that id, its not working.
CS Code:
protected void cboMEStatus_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
List<bocWFEmployeeStatusCollection> listEmpStatus = objlibWFDALController.GetEmployeeStatus();
if (listEmpStatus != null)
{
var status = Enumerable.Empty<bocWFEmployeeStatusCollection>();
if (utlTypeChecking.IsNumeric(temp))
{
status = from data in listEmpStatus
where data.Employee_Status_ID.ToString().StartsWith(temp)
select data;
}
else
{
status = from data in listEmpStatus
where data.Employee_Status_Value.StartsWith(temp, StringComparison.OrdinalIgnoreCase)
select data;
}
foreach (var item in status)
{
RadComboBoxItem radItem = new RadComboBoxItem();
radItem.Text = item.Employee_Status_Value;
radItem.Value = item.Employee_Status_ID.ToString();
radItem.Attributes.Add("Employee_Status_ID", item.Employee_Status_ID.ToString());
cboMEStatus.Items.Add(radItem);
radItem.DataBind();
}
}
}
HTML Code:
<HeaderTemplate>
<table style="width: 200px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;">
Status Description
</td>
<td style="width: 80px;">
Status ID
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table border="0" style="width: 200px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;">
<%# DataBinder.Eval(Container, "Text")%>
</td>
<td style="width: 80px;">
<%# DataBinder.Eval(Container, "Attributes['Employee_Status_ID']")%>
</td>
</tr>
</table>
</ItemTemplate>
********************************************************
cboMEStatus.FindItemByValue(statusRef.ToString()).Selected = true;
where statusRef.ToString() is coming from database.
How to Show selected text in combobox with this id.
Please Help
Regards
Ravi


<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="3%" ItemStyle-Width="3%"> <HeaderStyle Width="3%"></HeaderStyle> <ItemStyle Width="3%"></ItemStyle></telerik:GridClientSelectColumn><CommandItemTemplate> <td align="right" style="width: 20%">Selected Records:<asp:Label ID="lblselTsks" Width="20px" Font-Size="10pt" Font-Bold="true" runat="server" Text="0"></asp:Label> </td></CommandItemTemplate>protected void rg200_DataBound(object sender, EventArgs e) { foreach (GridDataItem item in rg200.MasterTableView.Items) { CheckBox chkBoxOne = (CheckBox)item.FindControl("ClientSelectColumn"); if (chkBoxOne != null) chkBoxOne.Attributes.Add("onclick", "javascript:return SelectOne('" + chkBoxOne.ClientID + "')"); } }JSfunction SelectOne(id) { var count = 0; count = Number(document.getElementById('ctl00_PagePlaceholder_rg200_ctl00_ctl02_ctl00_lblselTsks').innerHTML); if (document.getElementById(id).checked == true) { if (!document.getElementById(id).disabled) { count = count + 1; } } else if (document.getElementById(id).checked == false) { if (!document.getElementById(id).disabled) { count = count - 1; } } document.getElementById('ctl00_PagePlaceholder_rg200_ctl00_ctl02_ctl00_lblselTsks').innerHTML = count; }function ShowEditForm(id, rowIndex) {
var grid = $find("<%= grdStoryList.ClientID %>");
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);
window.radopen("StoryObservedTypePopup.aspx?Id=" + id, "UserListDialog");
return false;
}
I would like like multiple query string via:
window.radopen("StoryObservedTypePopup.aspx?Id=" + id, "UserListDialog");
These new query string parameters are columns in the radgrid itself.
Can any one please suggest?
Thanks
<telerik:RadAjaxManager runat="server" ID="ramResourceManagement" OnAjaxRequest="ramResourceManagement_AjaxRequest"> <AjaxSettings>... <telerik:AjaxSetting AjaxControlID="ramResourceManagement"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="gridUnits" LoadingPanelID="ralpResourceManager" /> <telerik:AjaxUpdatedControl ControlID="gridResources" LoadingPanelID="ralpResourceManager" /> <telerik:AjaxUpdatedControl ControlID="headerPanel" /> </UpdatedControls> </telerik:AjaxSetting>... </AjaxSettings></telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel ID="ralpResourceManager" runat="server" EnableEmbeddedSkins="false" />function RefreshResourceGrid(){ $find("<%=ramResourceManagement.ClientID %>").ajaxRequestWithTarget("<%= btn_refreshGrid.UniqueID %>", "");} <telerik:AjaxSetting AjaxControlID="btn_refreshGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="gridResources" LoadingPanelID="ralpResourceManager" /> </UpdatedControls> </telerik:AjaxSetting><asp:Button runat="server" ID="btn_refreshGrid" OnClick="btn_refreshGrid_Click" CausesValidation="false" Visible="false"/>protected void btn_refreshGrid_Click(object sender, EventArgs e){ BindResources();}