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

Parent Grid Record selection movement with Window next /Prev Last First Button

8 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Divya
Top achievements
Rank 1
Divya asked on 18 Mar 2016, 03:10 AM

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

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 22 Mar 2016, 11:45 AM
Hi Divya,

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
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Divya
Top achievements
Rank 1
answered on 28 Mar 2016, 02:33 AM
 
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

 

0
Konstantin Dikov
Telerik team
answered on 28 Mar 2016, 01:20 PM
Hello Divya,

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
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Divya
Top achievements
Rank 1
answered on 29 Mar 2016, 02:49 AM

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);
 
               }
 
       }

0
Divya
Top achievements
Rank 1
answered on 29 Mar 2016, 11:36 AM
Any Suggestion ?
0
Divya
Top achievements
Rank 1
answered on 30 Mar 2016, 02:00 AM
Anybody can help on the above please ?
0
Divya
Top achievements
Rank 1
answered on 30 Mar 2016, 09:54 PM
Is anybody can give any suggestion how I can do this ?
0
Konstantin Dikov
Telerik team
answered on 31 Mar 2016, 01:14 PM
Hi Divya,

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
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Divya
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Divya
Top achievements
Rank 1
Share this question
or