Hi
I have a scenario...
1. Grid with data is generated in Parent page.
2. On Double click of the any record in grid its opening details in a rad window.
3. From the window If i have next previous buttons i nee to get id of the next or previous record of the parent grid and same time its need to highlight the next/previous record. Also need to move to next page first record if last record of first page.
Please help with a sample code.
Please see attached image
8 Answers, 1 is accepted
When the user clicks on the Next/Previous buttons you could execute the same logic as when you are opening the RadWindow on the double click of the records and change only the way for retrieving the item. For getting reference to the currently selected item you could use the get_selectedItems() method of the Grid object:
Once you have the selected item you can retrieve its index and get the previous or the next item by index from the GridTableView.get_dataItems() collection. Finally, the data items could be selected with their set_selected(true/false) method.
Hope this helps.
Regards,
Konstantin Dikov
Telerik
function Open() {
var manager = $find('MainWindow');
manager.open(String.format('/health/srch/View/{0}/{1}/{2}/{3}', 1, "xx", "yy", "zz"), null);
}
}
Hi Iam using this method from parent page button to open a Radwindow.. Also Same parent method is calling from Opened rad widow with different parameter values. This time its opens a new window. How can use same window instance to load contents when button clicked on the opened widnow ?
please help
Please refer to the following help article for detailed information and examples regarding the open method of the RadWindowManager and how to open new URL in existing window:
Best Regards,
Konstantin Dikov
Telerik
I was able to try this but problem is that every time its opens window(Showing Window opening animation) again and content is not reloading. So I dont want to do that. I Want to Reload the Window contents With new URL parameters. I can able to get all required parameters to reload the Window
Please see image I am trying to achieve. Please help me to achieve this ?
Here is Window Definition :
<
telerik:RadWindowManager
ClientIDMode
=
"Static"
ID
=
"MainWindow"
Width
=
"1000"
Height
=
"600"
VisibleStatusbar
=
"false"
Behaviors
=
"Close,Move,Resize"
runat
=
"server"
OnClientClose
=
"onClientClose"
EnableViewState
=
"false"
DestroyOnClose
=
"true"
ReloadOnShow
=
"true"
Modal
=
"true"
ShowContentDuringLoad
=
"false"
OnClientShow
=
"showContentForIE"
Animation
=
"None"
>
</
telerik:RadWindowManager
>
Window Opening From Parent
function Open() {
var manager = $find('MainWindow');
manager.open(String.format('/health/srch/View/{0}/{1}/{2}', 1, "xx", "yy", "zz"), null);
}
}
For changing the URL dynamically you can use the setUrl method of the window. Detailed information on the RadWindow client-side object and examples could be found in the following article:
Let me know if that helps.
Regards,
Konstantin Dikov
Telerik