or

I have some RadGrids bound to some data and I need to be able to get the IDs from the underlying data. I checked your documentation and saw the following code for doing this:
I have also seen code like the following to do the same thing:
Are there any cleaner ways to get these IDs from our Rad Grids?
| <%@ Page Language="VB" MasterPageFile="~/legal/Legal.master" AutoEventWireup="false" CodeFile="postcode.aspx.vb" Inherits="legal_postcode" title="Untitled Page" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <asp:Content ID="cntHead" ContentPlaceHolderID="cplHead" Runat="Server"> |
| <script type="text/javascript"> |
| function PostcodeAjax(eventArgs) { |
| <%=radAJAX.ClientID%>.ajaxRequest(eventArgs); |
| } |
| </script> |
| </asp:Content> |
| <asp:Content ID="cntBody" ContentPlaceHolderID="cplBody" Runat="Server"> |
| <asp:ScriptManager ID="scmAJAX" runat="server" /> |
| <telerik:RadAjaxManager ID="radAJAX" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="tbxAddress_Postcode_C"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="tbxAddress_Suburb_C" /> |
| <telerik:AjaxUpdatedControl ControlID="tbxAddress_State_C" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <asp:SqlDataSource ID="sqlSuburbList" runat="server" ConnectionString="<%$ ConnectionStrings:PRM_AFPConnectionString %>" |
| SelectCommand="usp_AFP_AjaxSuburbList2" SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="tbxAddress_Postcode_C" Name="Postcode" Type="String" PropertyName="Text" Size="4" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="sqlStateList" runat="server" ConnectionString="<%$ ConnectionStrings:PRM_AFPConnectionString %>" |
| SelectCommand="usp_AFP_AjaxStateList" SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="tbxAddress_Postcode_C" Name="Postcode" Type="String" PropertyName="Text" Size="4" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:Label ID="lblAddress_Postcode_C" AssociatedControlID="tbxAddress_Postcode_C" runat="server" Text="Postcode (AU):" /> |
| <asp:TextBox ID="tbxAddress_Postcode_C" runat="server" onkeyup="PostcodeAjax('tbxAddress_Postcode_C');" MaxLength="4" /> |
| <br /> |
| <asp:Label ID="lblAddress_Suburb_C" AssociatedControlID="ddlAddress_Suburb_C" runat="server" Text="Suburb (AU):" /> |
| <asp:DropDownList ID="ddlAddress_Suburb_C" runat="server" DataSourceID="sqlSuburbList" DataTextField="Suburb" DataValueField="Suburb" /> |
| <br /> |
| <asp:Label ID="lblAddress_State_C" AssociatedControlID="ddlAddress_State_C" runat="server" Text="State (AU):" /> |
| <asp:DropDownList ID="ddlAddress_State_C" runat="server" DataSourceID="sqlStateList" DataTextField="State" DataValueField="State" /> |
| </asp:Content> |