Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
760
Add New Row Editor Providers are not displaying the selected value from webdialogwindow
posted

I have a webhierarchical grid and set behaviors for add row for parent band. In the page i have a button, on clicking on the button it will load the webdialogwindow(postback will happen). Where i can select the resource name. The selected resource set in the usersession. But i could not able to set the usersession value in the webhiearchical grid add row column [1]. When I verified the code behind, the last set value was available during debug. but it was not displaying in the add row editor provider column on the grid.

The requirement is selected value in pop-up window needs to be shown on add row 1st column and user can enter remaining columns values and add to the grid. Also the Column 4 will also been displayed with another value from usersession based on the selection.

I can able to persist the value, but for user information, it has to be shown on the add editor add row provider. Even tired some javascript. But it didn't worked. During postback it was showing some value, but after the pop-up closes the value is not showing.

Please provide me a sample. Please treat this as urgent request.

TextBoxProvider ddts = (TextBoxProvider)hdgForecastDetails.EditorProviders["ResourceProvider"];

if (ViewState["ActiveResource"] != null)

{

Resource res = (Resource)ViewState["ActiveResource"];

ddts.EditorControl.Text = res.DisplayName;

//ddts.EditorControl.CssClass = string.Empty;

ResourceName.Value = res.DisplayName;

}

else

{

ddts.EditorControl.Text =

"Selected Resource button";

}

 

BLOCKED SCRIPT

function AddInitialize(sender, eventArgs) {

//debugger;

var resName = document.getElementById("ResourceName").value;

if (resName != "") {

document.getElementById(

"hdgForecastDetails_ctl00_ResourceProvider").innerText = resName;

document.getElementById(

"hdgForecastDetails_ctl00_ResourceProvider").innerHTML = resName;

document.getElementById(

"hdgForecastDetails_ctl00_ResourceProvider").visibility = true;

}

else {

document.getElementById(

"hdgForecastDetails_ctl00_ResourceProvider").innerText = "Select a Resource";

document.getElementById(

"hdgForecastDetails_ctl00_ResourceProvider").innerHTML = "Select a Resource";

document.getElementById(

"hdgForecastDetails_ctl00_ResourceProvider").visibility = true;

}

}