Hi,
Given:
- I have an AjaxControlToolKit TabPanel.
- I have a radgrid in a tab with Master Table and Detail Table views. I am using Client hierarchy mode.
- I have having a dropdown in master table ItemTemplate. A selected index changed event is handled in code behind.
- I have a textbox in detailtable ItemTemplate. A javascript function is called on click of the textbox where I send textbox's Client ID. Inside the javascript function, I use document.getElementById() to get the DOM object of textbox.
Problem:
- When grid loads for the first time, everything works fine. I expand child items, click on texboxes and document.getElementById() gets me the textbox object.
- But when I click on dropdown, change the selected item and the grid loads back.
- Now when I open a child item and click on textbox, document.getElementById() throws a null reference error.
- I checked the viewsource, I was able to find the textox with id. But document.getElementById() is not able to locate it.
I believe this has something to do with Ajax and viewstate of DetailTable views but I dont know where the problem. Please help me pinpoint the issue and find a solution.
Regards,
Himalay
Given:
- I have an AjaxControlToolKit TabPanel.
- I have a radgrid in a tab with Master Table and Detail Table views. I am using Client hierarchy mode.
- I have having a dropdown in master table ItemTemplate. A selected index changed event is handled in code behind.
- I have a textbox in detailtable ItemTemplate. A javascript function is called on click of the textbox where I send textbox's Client ID. Inside the javascript function, I use document.getElementById() to get the DOM object of textbox.
Problem:
- When grid loads for the first time, everything works fine. I expand child items, click on texboxes and document.getElementById() gets me the textbox object.
- But when I click on dropdown, change the selected item and the grid loads back.
- Now when I open a child item and click on textbox, document.getElementById() throws a null reference error.
- I checked the viewsource, I was able to find the textox with id. But document.getElementById() is not able to locate it.
I believe this has something to do with Ajax and viewstate of DetailTable views but I dont know where the problem. Please help me pinpoint the issue and find a solution.
Regards,
Himalay