I am rebinding data grind on text changed event. When I changed the text in the text box, the data in the data grid need to reload. If I change the text in the text box which is in first row, the grid is reloading but the text box is missing on first row. But I am not getting issues when I changed the text in other rows.
I tried both data grid and rad grid.
I am using the below code,
.aspx Page Code
<rad:RadCodeBlock ID="RadCodeBlock1" runat="server">
<asp:datagrid id="Datagrid1" runat="server" Width="100%" AutoGenerateColumns="False" BorderColor="#B6B9BE" BorderWidth="1px" BorderStyle="Solid">
--Bound columns--
<asp:TemplateColumn
<ItemTemplate>
<asp:TextBox ID="txt_QPercent" runat="server" Width="100%" Text='<%#Container.DataItem("RevisedPercent")%>' onkeydown="return jsDecimals(event,this.value);" MaxLength="3" onchange="SavePercent(this);" OnTextChanged="ReLoadGrid" AutoPostBack="True"></asp:TextBox>
</asp:TemplateColumn>
</ItemTemplate>
</asp:datagrid>
</rad:RadCodeBlock>
<rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<rad:AjaxSetting AjaxControlID="txt_QPercent">
<UpdatedControls>
<rad:AjaxUpdatedControl ControlID="txt_QPercent" />
<rad:AjaxUpdatedControl ControlID="DgQAccounts" />
</UpdatedControls>
</AjaxSettings>
</rad:RadAjaxManager>
Code Behind - aspx.vb
Public
Sub ReLoadGrid(ByVal sender As Object, ByVal e As System.EventArgs)
BindGrid(ID)--Binding the data in the function
End Sub
Thanks,
Durga Rao