This is a migrated thread and some comments may be shown as answers.

[Solved] RadGrid Hierarchy - Set Column from Modal Window

1 Answer 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sue
Top achievements
Rank 1
Sue asked on 02 Dec 2009, 03:09 PM
Hi,

I have a hierarchy grid with 3 levels.  On line click of the 3rd level, I have a modal window showing where the user can select values for a specific column.  The column has complex selection criteria and must be retrieved from the modal window.

I have the modal window displaying and can return the selected value to the calling page, but can not get the value selected to populate on 3rd level hierarchy line and column that needs to be populated.

Can you tell me how to set a reference to the exact row in the 3rd level that executed the rconfirm function, before opening the modal window, and how to use this reference to set the new value of the column once the modal window is closed?

This is the javascript part of the code I am using to open the window and the function that is run at closing
Function rConfirm is running when the heirarchy grid level 3 line is clicked.
Function clientClose is run when the modal window is closed

 

 

 

 

function rConfirm(arg1, arg2, arg3) {

 

 

 

var cValue = "Selected Item: " + arg1;

 

argument1 = arg1;

reqg = arg2;

lineg = arg3;

 

 

 

alert(

 

" Input field value was '" + inputField + "'");

 

alert(

 

" Current line value was '" + lineg + "'");

 

 

 

 


//open window
var oWnd = window.radopen(null, "VendorDialog");

 

oWnd.setUrl(oWnd.get_navigateUrl());

 

 

}

 

 

 

 

function clientClose(sender, args) {

 

 

 

if (args.get_argument() != null) {

 

alert(

 

"'" + sender.get_name() + "'" + " was closed and returned the following argument: '" + args.get_argument() + "'");

 

alert(

 

" Input field value was '" + inputField + "'");

 

alert(

 

" Current Req value was '" + reqg + "'");

 

alert(

 

" Current line value was '" + lineg + "'");

 

 

}

 

 

//need to update row from level 3 of heirarchy for this column

}

Thanks

 

 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 07 Dec 2009, 02:33 PM
Hi Sue,

I assume that you handle the OnRowClick client-side event of RadGrid to open the modal window. If so you can save a reference of the row object carried by the sender argument of the event into a global variable, and use it later when the window is closed to perform additional operation with it.
Check it out and let me know if this works for you.

Kind regards,
Iana
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Sue
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or