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

[Solved] Passing a parameter to Usercontrol Popup

2 Answers 205 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Mc
Top achievements
Rank 1
Paul Mc asked on 13 Oct 2009, 01:06 PM
Hi

We're using a Popup User control to edit items on a rad grid.  Everything is working fine.  However, we would like to a pass a parameter from the main page to the user control when the user clicks the select button which is not contained in the underlined dataset.

Is there an easy way to do this?

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
bradley baker
Top achievements
Rank 1
answered on 13 Oct 2009, 03:42 PM
This is what I use to pass a var to a RadWindow.

    <script type="text/javascript">  
           function RowSelected(sender, eventArgs) {  
               var grid = sender;  
               var MasterTable = grid.get_masterTableView();  
               var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];  
               var cell = MasterTable.getCellByColumnUniqueName(row, "mtr_heatcode");  
 
               var oWnd = radopen("mtr_files.aspx?mtr_heatcode=" + cell.innerHTML"Window1");   
           }  
             
</script>  
0
Paul Mc
Top achievements
Rank 1
answered on 13 Oct 2009, 04:06 PM
Hi Bradley

Thanks for taking the time to reply. 

Unfortunately we’re using the user control method  (as a popup though) rather than a RadWindow to display the row data.  Because of that, I think I'm right in saying that there isn’t a way we can pass a query string to the control.

Worst case scenario, I guess we might have to reassess how we are displaying the edit data and use a rad window instead.

Thanks once again.

Paul
Tags
Grid
Asked by
Paul Mc
Top achievements
Rank 1
Answers by
bradley baker
Top achievements
Rank 1
Paul Mc
Top achievements
Rank 1
Share this question
or