or
<telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowSorting="True" AutoGenerateColumns="False" GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="897px" Height="252px" OnNeedDataSource="grdCurrentandPrior_NeedDataSource" OnExcelMLExportRowCreated="grdCurrentandPrior_ExcelMLExportRowCreated" OnSortCommand="grdCurrentandPrior_SortCommand"> <ExportSettings FileName="OpenItemsCurrentInventory" IgnorePaging="True" OpenInNewWindow="True" ExportOnlyData="true" Excel-Format="ExcelML"> </ExportSettings> <MasterTableView CommandItemDisplay="Bottom" AllowNaturalSort="false" UseAllDataFields="true"> <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" /> <Columns> <telerik:GridTemplateColumn DataField="Assignee" HeaderText="Assignee" UniqueName="Assignee" SortExpression="Assignee"> <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label> </ItemTemplate> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="State" HeaderText="State" UniqueName="State" SortExpression="State" Visible="false"> <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label> </ItemTemplate> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="JurisdictionCount" HeaderText="Jurisdictions" UniqueName="JurisdictionCount" SortExpression="JurisdictionCount"> <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="OpenItemsCountPrior" HeaderText="Prior Open Items" UniqueName="OpenItemsCountPrior" SortExpression="OpenItemsCountPrior"> <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lbPrior" runat="server" Text='<%# Eval("OpenItemsCountPrior", "{0:N0}") %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="OpenItemsCountLastMonth" HeaderText="Last Month Items" UniqueName="OpenItemsCountLastMonth" SortExpression="OpenItemsCountLastMonth"> <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lbLastMonth" runat="server" Text='<%# Eval("OpenItemsCountLastMonth", "{0:N0}") %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="OpenItemsCountCurrent" HeaderText="Current Open Items" UniqueName="OpenItemsCountCurrent" SortExpression="OpenItemsCountCurrent"> <HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lbCurrent" runat="server" Text='<%# Eval("OpenItemsCountCurrent", "{0:N0}") %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="TotalRemainingItems" HeaderText="Items Left to Pay" UniqueName="TotalRemainingItems" SortExpression="TotalRemainingItems"> <HeaderStyle Font-Bold="True" Width="95px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="CompleteCount" HeaderText="Complete" UniqueName="CompleteCount" SortExpression="CompleteCount"> <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lblCompleteCount" runat="server" Text='<%# Eval("CompleteCount", "{0:N0}") %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="PercentComplete" HeaderText="% Complete" UniqueName="clmPctComplete" SortExpression="PercentComplete"> <HeaderStyle Font-Bold="True" Width="85px" HorizontalAlign="Center" Font-Names="Arial" /> <ItemTemplate> <asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:N2}%")%>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="AssigneeEmployeeKey" ReadOnly="True" UniqueName="AssigneeEmployeeKey" Visible="False"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <HeaderStyle BorderStyle="Solid" /> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings> </telerik:RadGrid><telerik:RadDatePicker ID="dpMeetingDate" runat="server" MinDate="2009-01-01" Width="150px" ImagesPath="" Skin="Vista" Enabled="false"> <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Vista" /> <DatePopupButton ImageUrl="" HoverImageUrl="" /> </telerik:RadDatePicker>if (dpMeetingDate.SelectedDate == null) { lblError.Text += "<br> - Select a meeting date"; canSave = false; }Dim
numberoflines As Integer = radgrid1.Items.Count
For i = 0 To numberoflines - 1
radgrid1.Items(i).Cells(0).Controls(0).Visible =
False
Next i
Hello,
I'm trying to get Cell Values for Selected Rows Client-side, and I followed the following example below, but what about if the cell is a text box or drop down list? I am getting null on innerhtml and value when I reference those controls within the grid. Is there a different method to access controls within the grid and not necessarily the bound fields?
http://www.telerik.com/help/aspnet-ajax/grid-getting-cell-values-for-selected-rows-client-side.html