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;
"hdgForecastDetails_ctl00_ResourceProvider").innerHTML = resName;
"hdgForecastDetails_ctl00_ResourceProvider").visibility = true;
else {
"hdgForecastDetails_ctl00_ResourceProvider").innerText = "Select a Resource";
"hdgForecastDetails_ctl00_ResourceProvider").innerHTML = "Select a Resource";
We are not getting any help from Infragistics team. We have to analyze and spend time on using their controls. Waste of time using their controls.
Helping fellow developers like me.
Thanks,
Agilan G
I wrote the below statement in InitializeRow. Set the hidden variables values on mouse click on webdialogwindow and refresh the grid. Set_resource is used to check whther the statement is already executed to minimize the loop of all the rows in the grid(InitializeRow event).
if (set_Resource == 0)
ContainerGrid grid = hdgForecastDetails.GridView;
if (string.IsNullOrEmpty(ResourceName.Value))
ResourceName.Value =
"Select Resource";
grid.Behaviors.EditingCore.Behaviors.RowAdding.Row.Items[1].Text = ResourceName.Value;
grid.Behaviors.EditingCore.Behaviors.RowAdding.Row.Items[4].Text = ResourceNameType.Value;
set_Resource = 1;
Can someone help me on this. I'm struck with this issue for the past 3 days. it needs to be completed immediately.