or
Protected Sub myRadGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGrid.ItemDataBound If (TypeOf e.Item Is GridDataItem) Then Dim item As GridDataItem = CType(e.Item, GridDataItem) Dim options As DropDownList = DirectCast(item.FindControl("ddlModel"), DropDownList) Dim field As String = e.Item.Cells(5).Text.ToString.ToLower sql = "Select dm.intModelId, m.strmake + ' ' + dm.strModel Model from Drat_Model dm INNER JOIN Drat_Make m on m.intMakeId = dm.intMakeId Order by strModel" buildDD(sql, options) 'options.SelectedItem.Text = DirectCast(DataBinder.Eval(e.Item.DataItem, field).ToString(), String) End If End SubDataBinding: 'System.Data.DataRowView' does not contain a property with the name 'optiplex 760'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'optiplex 760'. Source Error: Line 95: Line 96: buildDD(sql, options) Line 97: options.SelectedItem.Text = DirectCast(DataBinder.Eval(e.Item.DataItem, field).ToString(), String) Line 98: End If Line 99: End Sub If Not IsPostBack Then rgWeightBreaks.MasterTableView.Columns(2).Visible = False rgWeightBreaks.MasterTableView.GroupByExpressions.Add(New Telerik.Web.UI.GridGroupByExpression(rgWeightBreaks.MasterTableView.Columns(2)))... <telerik:RadScriptManager ID="rsmWeightBreaks" runat="server" /> <telerik:RadSkinManager ID="rskmWeightBreaks" runat="server" ShowChooser="false" /> <telerik:RadScriptBlock runat="server" ID="rsbWeightBreaks"> <script type="text/javascript"> function onRequestStart(sender, args) { if (args.get_eventTarget().indexOf("rtbExport") >= 0) { args.set_enableAjax(false); bExporting = false; } } </script> </telerik:RadScriptBlock> <telerik:RadAjaxManager ID="ramWeightBreaks" runat="server" DefaultLoadingPanelID="ralpWeightBreaks" ClientEvents-OnRequestStart="onRequestStart" meta:resourcekey="ramWeightBreaksResource1"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="rgWeightBreaks"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgWeightBreaks" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="rtbWeightBreaks"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rtbWeightBreaks" /> <telerik:AjaxUpdatedControl ControlID="rgWeightBreaks" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="ralpWeightBreaks" runat="server" meta:resourcekey="ralpWeightBreaksResource1"></telerik:RadAjaxLoadingPanel> <div style="width:800;"> <asp:Label ID="lblIntroText1" runat="server" Text="Thank you for the opportunity to quote your shipment, please click on the below gateway to view your rates." meta:resourcekey="lblIntroText1" /> <br /><br /> <asp:Label ID="lblIntroText2" runat="server" Text="The inland rates displayed below reflect the price per kilogram in US Dollars." meta:resourcekye="lblIntroText2" /> <br /><br /> <asp:Label ID="lblFuelSurchargeText1" runat="server" meta:resourcekey="lblFuelSurchargeText1"></asp:Label> <asp:Label ID="lblFuelSurchargeAmount" runat="server" /> <asp:Label ID="lblFuelSurchargeText2" runat="server" meta:resourcekey="lblFuelSurchargeText2" /> <br /><br /> <div> <asp:Label ID="lblTermsAndConditions" runat="server" meta:resourcekey="lblTermsAndConditionsResource" Text="All quotes are subject to the " /> <asp:HyperLink ID="hlTermsAndConditions" runat="server" meta:resourcekey="hlTermsAndConditionsResource" NavigateUrl="#" Text="Terms & Conditions" /> </div> <br /> </div> <telerik:RadTabStrip ID="rtsWeightBreaks" runat="server" Width="802px" meta:resourcekey="rtsWeightBreaksResource1" SelectedIndex="0"> <Tabs> <telerik:RadTab runat="server" Text="US Exports - Inland Rates" Selected="true" meta:resourcekey="RadTabResource1"></telerik:RadTab> <telerik:RadTab runat="server" Text="US Imports - Inland Rates" Selected="true" meta:resourcekey="RadTabResource2"></telerik:RadTab> </Tabs> </telerik:RadTabStrip> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <telerik:RadToolBar ID="rtbWeightBreaks" runat="server" OnButtonClick="rtbWeightBreaks_ButtonClick" meta:resourcekey="rtbWeightBreaksResource1"> <Items> <telerik:RadToolBarButton Text="Gateway View" CommandName="GatewayView" runat="server" Enabled="false" meta:resourcekey="RadToolBarButtonResource1"></telerik:RadToolBarButton> <telerik:RadToolBarButton Text="Airport View" CommandName="AirportView" runat="server" meta:resourcekey="RadToolBarButtonResource2"></telerik:RadToolBarButton> </Items> </telerik:RadToolBar> </td> <td> <telerik:RadToolBar ID="rtbExport" runat="server" OnButtonClick="rtbWeightBreaks_ButtonClick" meta:resourcekey="rtbExportResource1"> <Items> <telerik:RadToolBarButton Text="Export To Excel" CommandName="ExportToExcel" runat="server" meta:resourcekey="RadToolBarButtonResource3"></telerik:RadToolBarButton> </Items> </telerik:RadToolBar> </td> </tr> </table> <telerik:RadGrid ID="rgWeightBreaks" runat="server" Width="800px" CellSpacing="0" GridLines="None" meta:resourcekey="rgWeightBreaksResource1"> <MasterTableView AutoGenerateColumns="false" GroupsDefaultExpanded="false" GroupLoadMode="Client" DataKeyNames="OriginAirport, DestinationAirport, TariffNumber" ClientDataKeyNames="OriginAirport, DestinationAirport, TariffNumber" UseAllDataFields="true" EnableHeaderContextMenu="true" AllowFilteringByColumn="true"> <Columns> <telerik:GridBoundColumn HeaderText="Origin City" DataField="OrgAirportCity" HeaderStyle-Width="200px" ItemStyle-Width="200px" AllowFiltering="true" meta:resourcekey="GridBoundColumnResource1"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Airport" DataField="OriginAirport" HeaderStyle-Width="50px" ItemStyle-Width="50px" AllowFiltering="true" FilterControlWidth="35px" ShowFilterIcon="false" AutoPostBackOnFilter="true" meta:resourcekey="GridBoundColumnResource2"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="To Gateway" DataField="DestAirportCity" HeaderStyle-Width="175px" ItemStyle-Width="175px" UniqueName="OriginCity" Groupable="true" AllowFiltering="true" meta:resourcekey="GridBoundColumnResource3"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Transit Days" DataField="TransitDays" HeaderStyle-Width="50px" HeaderStyle-HorizontalAlign="Right" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Right" AllowFiltering="false" meta:resourcekey="GridBoundColumnResource4"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Minimum Charge" DataField="MinimumCharge" DataFormatString="{0:C}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" AllowFiltering="false" meta:resourcekey="GridBoundColumnResource5"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="45 kgs<br/>(100 LBS)" DataField="BreakOne" DataFormatString="{0:C}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" AllowFiltering="false" meta:resourcekey="GridBoundColumnResource6"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="225 kgs<br/>(500 LBS)" DataField="BreakTwo" DataFormatString="{0:C}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" AllowFiltering="false" meta:resourcekey="GridBoundColumnResource7"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="450 kgs<br/>(1000 LBS)" DataField="BreakThree" DataFormatString="{0:C}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" AllowFiltering="false" meta:resourcekey="GridBoundColumnResource8"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="1350 kgs<br/>(3000 LBS)" DataField="BreakFour" DataFormatString="{0:C}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" AllowFiltering="false" meta:resourcekey="GridBoundColumnResource9"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CityAirport" HeaderText="From Airport" UniqueName="CityAirport" Groupable="true" meta:resourcekey="GridBoundColumnResource10" Display="false"> </telerik:GridBoundColumn> </Columns> <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" /> </MasterTableView> <GroupingSettings ShowUnGroupButton="true" /> <ClientSettings AllowExpandCollapse="true" EnableRowHoverStyle="true" AllowDragToGroup="true"> <Selecting AllowRowSelect="true" /> <Scrolling UseStaticHeaders="true" AllowScroll="true" ScrollHeight="500px"/> <Resizing AllowColumnResize="true" /> </ClientSettings> <ExportSettings OpenInNewWindow="true" ExportOnlyData="true"> <Excel Format="ExcelML" /> </ExportSettings> </telerik:RadGrid> <telerik:RadToolTip ID="rttTermsAndConditions" runat="server" TargetControlID="hlTermsAndConditions" RelativeTo="Element" Title="Terms And Conditions" Width="700px" Animation="Slide" HideEvent="LeaveTargetAndToolTip" meta:resourcekey="rttTermsAndConditionsResource"> <div style="margin:10px"> <ol>...<telerik:RadTextBox runat="server" ID="configData" TextMode="MultiLine" Width="100%" Height="300px"/>