Hi,
I have a rad grid...
It is populated using data binding and all the columns show data...
However what I want to do is take my textbox column, and return the values back into the database, however I can't get data out of the Textboxes, I know how to manipulate the data once I've got it, but I can't get it. This code does what I want on standard columns but not on textbox columns what am I missing
Thanks in advance for your help, Ryan
I have a rad grid...
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateSelectColumn="True" CellSpacing="0" GridLines="Horizontal" AutoGenerateColumns="False" OnNeedDataSource="RadGrid1_NeedDataSource" AllowAutomaticUpdates="false" AllowPaging="false" AllowSorting="false" Width="100%"> <SortingSettings EnableSkinSortStyles="false" /> <MasterTableView DataKeyNames="Code" PageSize="20" Width="100%"> <Columns> <telerik:GridTemplateColumn UniqueName="txtQTY" HeaderText="Quantity"> <ItemTemplate> <asp:TextBox runat="server" ID="QTYtextbox" Width="40px" Enabled="true" Text='<%# Bind("QTY") %>'> </asp:TextBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="Code" HeaderText="Code" UniqueName="Code" FilterControlAltText="Filter Code column" SortExpression="Code" ItemStyle-Width="50px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" FilterControlAltText="Filter Name column" SortExpression="Name" ItemStyle-Width="200px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Units" HeaderText="Units" UniqueName="Units" FilterControlAltText="Filter Units column" SortExpression="Units" ItemStyle-Width="25px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="QTY" HeaderText="QTY" UniqueName="colQTY" Visible="True" ItemStyle-Width="25px"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid>It is populated using data binding and all the columns show data...
Protected Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 'Loads Data into the table Dim ordlist As New dbrcOrdEst(Session("ConnectionString")) Dim dt As DataTable = ordlist.ListOrderEstimates(498) RadGrid1.DataSource = dtEnd SubHowever what I want to do is take my textbox column, and return the values back into the database, however I can't get data out of the Textboxes, I know how to manipulate the data once I've got it, but I can't get it. This code does what I want on standard columns but not on textbox columns what am I missing
Protected Sub btnImport_Click(sender As Object, e As System.EventArgs) Handles btnImport.Click For Each item As GridDataItem In RadGrid1.Items Dim value As String value = item.Cells(2).Text
'DB Functionality NextEnd SubThanks in advance for your help, Ryan