Hello
I am using RadGrid in my application to insert and updated a record. I am using Master page in my application.
depending upon the querystring i an setting the mode of RadGrid. for example if i get a querystring i am setting the RadGrid in edit mode if not then in insert mode.
If it is in Insert mode and once the record is inserted, I will show a RAD alert message to user and then it will change it into edit mode for the inserted record.
If i try to change any data again and save the record back it gives an error "Object undefined”. I debugged this bug and found the cause for this problem.
It looks like after the post back the ID's of controls are getting changed and the javascript in WebResource.axd still referring with old IDS.WebResource.axd and JavaScript are not getting updated with the new IDs
I am using RadGrid in my application to insert and updated a record. I am using Master page in my application.
depending upon the querystring i an setting the mode of RadGrid. for example if i get a querystring i am setting the RadGrid in edit mode if not then in insert mode.
If it is in Insert mode and once the record is inserted, I will show a RAD alert message to user and then it will change it into edit mode for the inserted record.
If i try to change any data again and save the record back it gives an error "Object undefined”. I debugged this bug and found the cause for this problem.
It looks like after the post back the ID's of controls are getting changed and the javascript in WebResource.axd still referring with old IDS.WebResource.axd and JavaScript are not getting updated with the new IDs
For example, before Insert JavaScript trying to get the object using J-Query with the object ID as
“ctl00_ContentPlaceHolder1_RadGridAccManageMain_ctl00_ctl02_ctl01_txtBoxCompanyName”
But after the Insert the client ID got changed to
“ctl00_ContentPlaceHolder1_RadGridAccManageMain_ctl00_ctl05_txtBoxCompanyName”
But the generated JavaScript in “WebResource.axd” still referring the object with old ID and it is causing JavaScript undefined error.
How do I resolve this issue?