This is a migrated thread and some comments may be shown as answers.

Only the first item is getting inserted

1 Answer 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Venkatesh
Top achievements
Rank 1
Venkatesh asked on 10 Dec 2012, 12:37 PM
HI,
I have a radgrid, which has editmode as InPlace.
In the Insertcommand, i am getting the values as :
<InsertItemTemplate>
                       <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                       </telerik:RadTextBox>
                   </InsertItemTemplate>

DataTable purchaseOrder = this.PurchaseOrderData;
                                  
GridDataInsertItem item = (GridDataInsertItem)e.Item;
                               
RadTextBox txtProductNumber = (RadTextBox)item.FindControl("RadtxtPrdNumber");
string strProductNumbervalue = txtProductNumber.Text;

when i insert the first row, i am getting the value in "strProductNumbervalue". However when i insert the second row, the "strProductNumbervalue" is coming as empty.
How to fix this?
Thanks

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 13 Dec 2012, 07:46 AM
Hello Venkatesh,

Based on the provided information it is hard to say what is causing the described issue on your end. Could you please elaborate a bit more on your scenario? Does the "RadtxtPrdNumber" textbox belong to the GridTemplateColumn's InsertItemTemplate? Also how you put the RadGrid in insert mode - programmatically or by clicking with mouse on Add new Record button? Additionally it will be helpful if you post your aspx page markup with the related code behind. Thus we will be able to get more information about your scenario and provide you more to the point answer.

Looking forward for your reply.

All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Venkatesh
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or