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

9 posts, 1 answers
  1. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 17 Mar Link to this post

    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

  2. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1795 posts

    Posted 22 Mar Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 27 Mar Link to this post

     
    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

     

  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1795 posts

    Posted 28 Mar Link to this post

    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.
  6. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 28 Mar in reply to Konstantin Dikov Link to this post

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

  7. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 29 Mar in reply to Divya Link to this post

    Any Suggestion ?
  8. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 29 Mar in reply to Divya Link to this post

    Anybody can help on the above please ?
  9. Divya
    Divya avatar
    12 posts
    Member since:
    Mar 2016

    Posted 30 Mar Link to this post

    Is anybody can give any suggestion how I can do this ?
  10. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1795 posts

    Posted 31 Mar Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017