I am using RadGrid and I designed the UI with Telerik Controls.
I had 3 Text boxes such as “txt_A”,”txt_B” and “txt_C” and I am adding as “txt_A”,”txt_B” values at client side and displaying in to “txt_C”.
In this manner I have to implement DML Operations(Insertion/Updation). I am successfully inserting record, but come to the point of implementing Update functionality i am getting the problem.
Before Explaining the problem let me explain how I am implementing the TextBox Calculations…
Iam performing this Operation as follow …
var price = document.getElementById('ctl00_ContentPlaceHolder1_rgRFQResponseDetails_ctl00_ctl02_ctl03_txtResDetailsPrice');
var txtPriceinsUS = document.getElementById('ctl00_ContentPlaceHolder1_rgRFQResponseDetails_ctl00_ctl02_ctl03_txtPriceinsUS');
In this manner I have inserted 3 records and now 3 records are Binded to Grid.
But while updating the record I am not getting the Control ID as same Above.. here I am getting 3 Id each..for example here I am mentioning the one Control ID as follows while updating 1st record.
price = document.getElementById('ctl00_ContentPlaceHolder1_rgRFQResponseDetails_ctl00_ctl05_txtResDetailsPrice');
var txtPriceinsUS = document.getElementById('ctl00_ContentPlaceHolder1_rgRFQResponseDetails_ctl00_ctl02_ctl05_txtPriceinsUS');
For 2nd Record Updation:-
price = document.getElementById('ctl00_ContentPlaceHolder1_rgRFQResponseDetails_ctl00_ctl07_txtResDetailsPrice');
var txtPriceinsUS = document.getElementById('ctl00_ContentPlaceHolder1_rgRFQResponseDetails_ctl00_ctl02_ctl07_txtPriceinsUS');
Please help me how to find the Exact ID even while Updating (static ID)..