<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript" language="javascript"> function createCallBack(tableView, div) { return function(result) { if (result != null && div != null) { div.style.display = "block"; } tableView.set_dataSource(result); tableView.dataBind(); if (result.count != null) { tableView.set_virtualItemCount(result.Count); } }; } function createPartsCallBack(tableView, div) { return function(result) { if (result != null && div != null) { div.style.display = "block"; } tableView.set_dataSource(result.Parts); tableView.dataBind(); if (result.Count != null) { tableView.set_virtualItemCount(result.Count); } }; } /*functions for specimen History Start*/ function loadSpecimenHistory() { var tblView = $find("<%=radGridHistory.ClientID %>").get_masterTableView(); var divHistory = document.getElementById('divHistory'); //Pass in the selected Specimen Id var result = PageMethods.FindSpecimen(20, createCallBack(tblView, divHistory)); } function radGridHistory_hierarchyExpanding(sender, args) { var firstClientDataKeyName = args.get_tableView().get_clientDataKeyNames()[0]; if (firstClientDataKeyName == "SpecimenID") { var tblView = $find("<%= radGridHistory.Items(0).ChildItem.NestedTableViews(0).ClientID%>"); var currentPageIndex = tblView.get_currentPageIndex(); var pageSize = tblView.get_pageSize(); var sortExpressionsAsSQL = tblView.get_sortExpressions().toString(); var filterExpressionsAsSQL = tblView.get_filterExpressions().toString(); var result = PageMethods.FindSpecimenHistoryParts(args.getDataKeyValue(firstClientDataKeyName), currentPageIndex * pageSize, pageSize, sortExpressionsAsSQL, filterExpressionsAsSQL, createPartsCallBack(tblView,null)); } } //Grid command invoked (sort) function radGridHistory_command(sender, args) { args.set_cancel(true); if (args.get_commandName() == "ExpandCollapse") { var tblView = $find("<%= radGridHistory.Items(0).ChildItem.NestedTableViews(0).ClientID%>"); } var tblView = args.get_tableView(); var tableName = tblView.get_name() var specimenId = sender.get_masterTableView().get_dataItems()[0].get_dataItem().SpecimenID; if (tableName == "Parts") { var pageSize = tblView.get_pageSize(); var sortExpressionsAsSQL = tblView.get_sortExpressions().toString(); var filterExpressionsAsSQL = tblView.get_filterExpressions().toString(); var currentPageIndex = tblView.get_currentPageIndex(); var result = PageMethods.FindSpecimenHistoryParts(specimenId, currentPageIndex * pageSize, pageSize, sortExpressionsAsSQL, filterExpressionsAsSQL, createPartsCallBack(tblView, null)); } } /*functions for specimen History END*/ </script> </telerik:RadCodeBlock><div id="divHistory" style="display:none"> <telerik:RadGrid ID="radGridHistory" runat="server" EnableViewState="False" AllowSorting="True" GridLines="None" ShowStatusBar="false" > <ClientSettings AllowExpandCollapse="true"> <ClientEvents OnHierarchyExpanding="radGridHistory_hierarchyExpanding" OnCommand="radGridHistory_command" /> </ClientSettings> <PagerStyle Mode="NumericPages" AlwaysVisible="true"></PagerStyle> <MasterTableView AllowMultiColumnSorting="false" TableLayout="Fixed" HierarchyLoadMode="Client" DataKeyNames="SpecimenID" ClientDataKeyNames="SpecimenID" AllowPaging="false" Width="100%"> <DetailTables> <telerik:GridTableView Width="100%" Name="Parts" PageSize="4" AllowPaging="true" AllowCustomPaging="true" > <DetailTables> <telerik:GridTableView Width="100%" Name="Blocks" PageSize="4" AllowPaging="true" AllowCustomPaging="true" > <Columns> <telerik:GridBoundColumn SortExpression="BlockID" HeaderText="BlockID" HeaderButtonType="TextButton" DataField="BlockID" UniqueName="BlockID"> </telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn SortExpression="PartID" HeaderText="PartID" HeaderButtonType="TextButton" DataField="PartID" UniqueName="PartID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Name" HeaderText="Part Name" HeaderButtonType="TextButton" DataField="Name"> </telerik:GridBoundColumn> </Columns> <PagerStyle AlwaysVisible="True" Mode="NumericPages"></PagerStyle> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn SortExpression="SpecimenID" HeaderText="SpecimenID" HeaderButtonType="TextButton" DataField="SpecimenID" /> <telerik:GridBoundColumn SortExpression="SpecimenName" HeaderText="Specimen Name" HeaderButtonType="TextButton" DataField="SpecimenName" /> </Columns> <PagerStyle AlwaysVisible="True"></PagerStyle> </MasterTableView> </telerik:RadGrid> </div><div style="border-style:inset; width:1093px; height:856px; left:50%; top:130px; margin-left:-546px; position:absolute"> <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Height="100%" Skin="Simple" Width="100%" style="position:absolute;"> <Items> <telerik:RadPanelItem runat="server" Text="Escrever Mensagem" ChildGroupHeight="282px" Expanded="True"> <Items> <telerik:RadPanelItem Value="escrever" runat="server"> <ItemTemplate> <div style="position:relative"> <telerik:RadTextBox ID="RadTextBox1" runat="server" style="z-index: 1; left: 50%; top: 1%; position: relative;" Height="277px" TextMode="MultiLine" Width="50%"> <PasswordStrengthSettings ShowIndicator="False" CalculationWeightings="50;15;15;20" PreferredPasswordLength="10" MinimumNumericCharacters="2" RequiresUpperAndLowerCaseCharacters="True" MinimumLowerCaseCharacters="2" MinimumUpperCaseCharacters="2" MinimumSymbolCharacters="2" OnClientPasswordStrengthCalculating="" TextStrengthDescriptions="Very Weak;Weak;Medium;Strong;Very Strong" TextStrengthDescriptionStyles="riStrengthBarL0;riStrengthBarL1;riStrengthBarL2;riStrengthBarL3;riStrengthBarL4;riStrengthBarL5;" IndicatorElementBaseStyle="riStrengthBar" IndicatorElementID=""></PasswordStrengthSettings> </telerik:RadTextBox> <asp:Label ID="Label2" runat="server" Text="DE:" style="z-index: 1; left: 90%; top: 10%; position: relative"></asp:Label> <asp:Label ID="Label3" runat="server" Text="PARA:" style="z-index: 1; left: 90%; top: 20%; position: relative"></asp:Label> <telerik:RadTextBox ID="RadTextBox2" runat="server" Width="20%" style="z-index: 1; left: 80%; top: 10%; position: relative"> <PasswordStrengthSettings ShowIndicator="False" CalculationWeightings="50;15;15;20" PreferredPasswordLength="10" MinimumNumericCharacters="2" RequiresUpperAndLowerCaseCharacters="True" MinimumLowerCaseCharacters="2" MinimumUpperCaseCharacters="2" MinimumSymbolCharacters="2" OnClientPasswordStrengthCalculating="" TextStrengthDescriptions="Very Weak;Weak;Medium;Strong;Very Strong" TextStrengthDescriptionStyles="riStrengthBarL0;riStrengthBarL1;riStrengthBarL2;riStrengthBarL3;riStrengthBarL4;riStrengthBarL5;" IndicatorElementBaseStyle="riStrengthBar" IndicatorElementID=""></PasswordStrengthSettings> </telerik:RadTextBox> <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="20%" style="z-index: 1; left: 80%; top: 20%; position: relative"> </telerik:RadComboBox> <telerik:RadListBox ID="RadListBox1" runat="server" AllowDelete="True" style="left: 90%; top: 30%; position: relative; height: 69%; width: 30%;"> <ButtonSettings TransferButtons="All"></ButtonSettings> <Items> <telerik:RadListBoxItem runat="server" /> </Items> <Localization Delete="Remover" /> </telerik:RadListBox> </div> </ItemTemplate> </telerik:RadPanelItem> </Items> </telerik:RadPanelItem> <telerik:RadPanelItem runat="server" Text="Ler Mensagem"> <Items> <telerik:RadPanelItem Value="ler" runat="server"> <ItemTemplate> </ItemTemplate> </telerik:RadPanelItem> </Items> </telerik:RadPanelItem> <telerik:RadPanelItem runat="server" Text="Lista de Mensagens" Selected="True" Expanded="True"> </telerik:RadPanelItem> </Items> </telerik:RadPanelBar> </div>

Hello,
I have two problems using the RadComboBox control.
1. I'm using the radgrid control that handles the insert, update and delete operations (using user control).
The user control has a radcombobox control that Displays two columns: color and value.
In normal situation where no validation controls are exist in the user control, the radComboBox control displays as it should be (Please view the attached screenshot).
If I add validation group to the user control then the error occures.
Please follow the steps below in order to show you the problem.
1) Click add new record.
2) Click on the radcombobox control (The result is shown in the attached screenshot1).
3) click "Add", then the validation error messages must appear.(dont fill in the Name field)
4) Click on the radcombobox control (The result is shown in the attached screenshot1 - No color appear).
2. As you can see there is a compare validator for the radcombobox (No "Select Color" item is exist).
How can I verify that the user select one color from the list (No selection must show an error message).
Here is the usercontrol content:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SubUserControl.ascx.cs" Inherits="IsraelOnTheMap.SecureSiteManagenment_Pages_SecureSQLServer_Ctgrs_SubUserControl" %><link rel="stylesheet" type="text/css" href="../../../../Common/Controls/RadEditor/RTLRadEditorStyle/Editor_RTL.css" /><link rel="stylesheet" type="text/css" href="../../../Design/Style/SecureManagenmentStyle.css" /><asp:Panel ID="SubPanel" runat="server" style="margin:10px;"> <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" style="BORDER-COLLAPSE: collapse"> <tr id="LastVisitDateTr" align="<%$ Resources:MngResource, ContentFloat %>" runat="server"> <td colspan="2"> <asp:Panel ID="LastModifyPanel" runat="server" HorizontalAlign="<%$ Resources:MngResource, NoContentFloat %>" Visible='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? false : true %>' Width="100%"> <asp:Label ID="LastModifyByTextLabel" runat="server" Visible="false" Font-Bold="true" Text="<%$ Resources:MngResource, LastModifyBy %>" ></asp:Label> <asp:Label ID="LastModifyByIDLabel" runat="server" Visible="false" Text='<%# DataBinder.Eval( Container, "DataItem.UserName" ) %>'></asp:Label> <asp:Label ID="LastModifyDateTextLabel" runat="server" Font-Bold="true" Text="<%$ Resources:MngResource, LastModifyDate %>" ></asp:Label> <asp:Label ID="LastModifyDateLabel" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.LastModifyDate" ) %>'></asp:Label> </asp:Panel> </td> </tr> <tr id="DataFieldsTr" align="<%$ Resources:MngResource, ContentFloat %>" runat="server"> <td> <table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0"> <tr> <td></td> <td></td> </tr> <tr runat="server" Visible='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? false : true %>'> <td> <asp:Label ID="CtgryIDLabel" runat="server" Text="<%$ Resources:MngResource, PagesSecureSqlServerCtgrsRadGridUserControlCtgryIDLabel %>"></asp:Label> </td> <td> <asp:Label ID="CtgryIDDataLabel" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.CtgryID" ) %>'></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="CtgryNameLabel" runat="server" Text="<%$ Resources:MngResource, PagesSecureSqlServerCtgrsRadGridUserControlCtgryNameLabel %>"></asp:Label> </td> <td> <telerik:RadTextBox ID="CtgryNameDataRadTextBox" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.CtgryName" ) %>' Width="201px" ValidationGroup="CtgrsMngValidationGroup"> </telerik:RadTextBox> <asp:RequiredFieldValidator ID="CtgryNameRequiredFieldValidator" runat="server" ControlToValidate="CtgryNameDataRadTextBox" SkinID="NormalRequiredFieldValidator" ErrorMessage="<%$ Resources:MngResource, PagesSecureSqlServerCtgrsRadGridUserControlCtgryNameRequiredFieldValidatorErrorMessage %>" ValidationGroup="CtgrsMngValidationGroup" ></asp:RequiredFieldValidator> </td> </tr> <tr> <td> <asp:Label ID="CtgryColrLabel" runat="server" Text="<%$ Resources:MngResource, PagesSecureSqlServerCtgrsRadGridUserControlCtgryColrLabel %>"></asp:Label> </td> <td> <asp:XmlDataSource ID="CtgrsXmlDataSource" runat="server" DataFile="~/Pages/Design/xml/Ctgrs.xml" > </asp:XmlDataSource> <telerik:RadComboBox ID="CtgryColrRadComboBox" runat="server" DataSourceID="CtgrsXmlDataSource" DataValueField="Value" DataTextField="Text" SelectedValue='<%# DataBinder.Eval( Container, "DataItem.CtgryColr" ) %>' HighlightTemplatedItems="true" AllowCustomText="true" Width="205px" style="z-index:10000;" ValidationGroup="CtgrsMngValidationGroup"> <ItemTemplate> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="width:20%;"> <asp:Panel ID="Panel1" BorderWidth="1px" Height="12px" Width="12px" BackColor='<%# System.Drawing.Color.FromName("#" + Eval("Value").ToString()) %>' runat="server"> </asp:Panel> </td> <td style="width:80%;"> <asp:Label ID="Label2" runat="server" Text='<%# "#" + Eval("Value").ToString() %>'></asp:Label> </td> </tr> </table> </ItemTemplate> </telerik:RadComboBox> <asp:CompareValidator ID="CtgryColrRequiredFirstNameValidator" runat="server" ControlToValidate="CtgryColrRadComboBox" Type="String" Operator="NotEqual" SkinID="NormalRequiredFieldValidator" ValueToCompare=" " ErrorMessage="<%$ Resources:MngResource, PagesSecureSqlServerCtgrsRadGridUserControlCtgryColrRequiredFirstNameValidatorErrorMessage %>" ValidationGroup="CtgrsMngValidationGroup" ></asp:CompareValidator> </td> </tr> </table> </td> </tr> <tr> <td id="Td1" align="<%$ Resources:MngResource, NoContentFloat %>" runat="server" colspan="2"> <asp:button id="btnUpdate" text="<%$ Resources:GeneralTelerikResource, TelerikRadGridEditFormUpdateButtonText %>" runat="server" CommandName="Update" Visible='<%# !(DataBinder.Eval( Container, "DataItem") is Telerik.Web.UI.GridInsertionObject) %>' ValidationGroup="CtgrsMngValidationGroup"></asp:button> <asp:button id="btnInsert" text="<%$ Resources:GeneralTelerikResource, TelerikRadGridEditFormInsertButtonText %>" runat="server" CommandName="PerformInsert" Visible='<%# DataBinder.Eval( Container, "DataItem") is Telerik.Web.UI.GridInsertionObject %>' ValidationGroup="CtgrsMngValidationGroup"></asp:button> <asp:button id="btnCancel" text="<%$ Resources:GeneralTelerikResource, TelerikRadGridEditFormCancelButtonText %>" runat="server" causesvalidation="False" commandname="Cancel"></asp:button> </td> </tr> </table></asp:Panel>Please, I need your help.
It is very appreciated to send me the modified code.
Regards,
Bader