or
<select id="SelColumnA" runat="server" onchange="jf_st_read_sel();" style="width:125px"> <option title="VALUE01">TEXT1</option> <option title="VALUE02">TEXT2</option> <option title="VALUE02">TEXT2</option></select><telerik:RadGrid ID="RadGrid1" OnNeedDataSource="RadGrid1_DataSource" AllowSorting="false" AllowAutomaticUpdates="true" Skin="Office2010Silver" OnBatchEditCommand="RadGrid1_BatchEditCommand" OnItemDataBound="RadGrid1_ItemDataBound" AutoGenerateColumns="false" runat="server"> <ClientSettings Scrolling-AllowScroll="False" EnableRowHoverStyle="True"> <Selecting AllowRowSelect="True" /> <Resizing AllowColumnResize="true" /> <Scrolling AllowScroll="true" UseStaticHeaders="True" ScrollHeight=""/> </ClientSettings> <MasterTableView DataKeyNames="MENUID" EditMode="Batch" CommandItemDisplay="Top" AutoGenerateColumns="False" BatchEditingSettings-OpenEditingEvent="Click" CssClass="mst_table"> <Columns> <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Center" FilterControlAltText="Filter MENUID column" HeaderText="MENUID" ="MENUID" UniqueName="MENUID" DataField="MENUID"> <ItemTemplate> <asp:Label ID="lb_MENUID" runat="server" Text='<%# Eval("MENUID")%>'></asp:Label> </ItemTemplate> <HeaderStyle Width="40px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="COLUMN_A" HeaderStyle-Width="100px" FilterControlAltText="Filter COLUMN_A column" UniqueName="COLUMN_A" DataField="COLUMN_A" > <ItemTemplate> <asp:Label ID="lb_COLUMN_A_NAME" runat="server" Text='<%# Eval("COLUMN_A_NAME")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <telerik:RadComboBox ID="COLUMN_A_CodeComboBox" runat="server" OnPreRender="COLUMN_A_CodeComboBox_OnPreRender" Width="100px" > </telerik:RadComboBox> </EditItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid>protected void SelectBoxValueChanged(object sender, EventArgs e) { for (int i = 0; i < this.RadGrid1.Items.Count; i++) { (this.RadGrid1.Items[i].FindControl("lb_COLUMN_NAME") as Label).Text = this.SelColumnA.Items[SelColumnA
.SelectedIndex].Text; } } }
<telerik:radgrid id="grdData" height="400px" width="100%" runat="server" pagesize="50" showstatusbar="True" allowmultirowselection="False" allowpaging="True" autogeneratecolumns="False" allowsorting="true" gridlines="None" cssclass="gridControl" onneeddatasource="OnNeedDataSource" ondetailtabledatabind="RadGrid1_grdData" onprerender="grdStudentsData_PreRender"> <pagerstyle mode="NumericPages"></pagerstyle> <clientsettings allowcolumnsreorder="False" reordercolumnsonclient="False"> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </clientsettings> <mastertableview width="98%" summary="Data" clientdatakeynames="PropertyA, PropertyB, PropertyC, PropertyD, PropertyE"> <DetailTables> <telerik:GridTableView AutoGenerateColumns="false" DataKeyNames="Code,DisplayValue" Width="100%"> <Columns> <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="DisplayValue" Display="True" HeaderText="Display Value" ReadOnly="True" Reorderable="True" Resizable="True" ShowSortIcon="False" UniqueName="DisplayValue" Visible="True"> </telerik:GridBoundColumn> <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="Code" Display="True" HeaderText="Code" ReadOnly="True" Reorderable="False" Resizable="True" ShowSortIcon="False" UniqueName="Code" Visible="True"> </telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="PropertyA" Display="True" HeaderText="PropertyA" ReadOnly="True" Reorderable="True" Resizable="True" ShowSortIcon="False" UniqueName="Entity" Visible="True"> </telerik:GridBoundColumn> <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="PropertyB" Display="True" HeaderText="PropertyB" ReadOnly="True" Reorderable="False" Resizable="True" ShowSortIcon="False" UniqueName="CodeAttribute" Visible="True"> </telerik:GridBoundColumn> <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="PropertyC" Display="True" HeaderText="PropertyC" ReadOnly="True" Reorderable="True" Resizable="True" ShowSortIcon="False" UniqueName="DescriptionAttribute" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="PropertyD" Display="True" HeaderText="PropertyD" ReadOnly="True" Reorderable="True" Resizable="True" ShowSortIcon="False" UniqueName="OptionAttribute" Visible="true"> </telerik:GridBoundColumn> </Columns> </mastertableview> </telerik:radgrid>Stack Trace:
[HttpException (0x80004005): DataBinding: 'Object' does not contain a property with the name 'Code'.] System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +11394950 Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +409 [GridException: There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.] Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +1060 Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +411 Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1169 Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +873 System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +94 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +182 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +274 Telerik.Web.UI.GridTableView.DataBind() +432 Telerik.Web.UI.GridDataItem.OnExpand() +461 Telerik.Web.UI.GridItem.set_Expanded(Boolean value) +295 Telerik.Web.UI.RadCompositeDataBoundControl.OnPreRender(EventArgs e) +46 System.Web.UI.Control.PreRenderRecursiveInternal() +113 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201 |

<telerik:RadListView ID="lvWorkGroups" runat="server" DataKeyNames="ID, Name" OnItemDataBound="lvWorkGroups_ItemDataBound" onneeddatasource="lvWorkGroups_NeedDataSource" AllowPaging="True" PageSize="1" ItemPlaceholderID="PlaceHolder1" onpageindexchanged="lvWorkGroups_PageIndexChanged" onpagesizechanged="lvWorkGroups_PageSizeChanged" ondatabound="lvWorkGroups_DataBound" onitemcommand="lvWorkGroups_ItemCommand"> <LayoutTemplate> <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> <div class="workGroup2" style="text-align:center"> <div style="margin:auto;"> <asp:Button runat="server" ID="btnFirst" CommandName="Page" CommandArgument="First" Text="First" Enabled="<%#Container.CurrentPageIndex > 0 %>" CausesValidation="false"></asp:Button> <asp:Button runat="server" ID="btnPrev" CommandName="Page" CommandArgument="Prev" Text="Prev" Enabled="<%#Container.CurrentPageIndex > 0 %>" CausesValidation="false"></asp:Button> <span style="vertical-align: middle; line-height:22px; display:inline-block;">Page <%#Container.CurrentPageIndex + 1 %> of <%#Container.PageCount %></span> <asp:Button runat="server" ID="btnNext" CommandName="Page" CommandArgument="Next" Text="Next" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" CausesValidation="false"> </asp:Button> <asp:Button runat="server" ID="btnLast" CommandName="Page" CommandArgument="Last" Text="Last" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" CausesValidation="false"> </asp:Button> </div> </div> </LayoutTemplate> <ItemTemplate> <uc1:InspectionWorkGroup ID="InspectionWorkGroup1" runat="server" OnworkGroupSaved="wg_workGroupSaved"/> </ItemTemplate> </telerik:RadListView>
