Control Grid Active row from outside

2 posts, 1 answers
  1. MOD MOD
    MOD MOD avatar
    13 posts
    Member since:
    Jan 2010

    Posted 04 Mar 2010 Link to this post

    Hi  ,

    I need a help with a following issue : 


    I need to implement a logic similar to outlook. I have a window with a grid and window for displaying a full message.
    when you double click a row in a grid a window will be opened and full message will be displayed.

    Then  you can press up or down keys and current grid row will be changed, so grid will be remotely controlled from outside.
    Also if the message was the last one in the page , I want grid to go to the next page  - something that similar to virtual scrolling feature.


    what I need is an example which will demonstrate this functionality ,

    thank you 


  2. Answer
    Veli
    Admin
    Veli avatar
    2002 posts

    Posted 09 Mar 2010 Link to this post

    Hi MOD MOD,

    This scenario can be implemented using RadGrid, RadWindow and some javascript in RadGrid's parent page. You can find attached a sample demo demonstrating this scenario. The details page that is loaded in RadWindow contains Up and Down links for navigating to the previous and next data item details. Here is some explanation on the javascript used:

    1. RadGrid's RowDblClick client event (openDetails() function) is use to open RadWindow and pass the item id to the query string of the details page

    2. RadWindow's client-side OnClientPageLoaded event (detailsPageLoaded() function) is used for 2 things. First, we check to see if the data item that is currently displayed in the details window is selected in the grid. If not, we select it. This is used in scenarios when the grid pages back and forth and the currently opened item should be selected back after paging. Additionally, the ClientPageLoaded event is used to get a reference to the Up and Down link buttons in the content document. We assign click handlers to these links in the main page, so that the main page is notified when the user wants to navigate back and forth in the details page.

    3. moveItem(), which is the click handler of the Up / Down buttons is, used to update the selected item in RadGrid. We deselect the currently selected item and select the previous or next one. If the edge of the page has been reached, we check if we can page back or forth and do it.

    Sincerely yours,
    Veli
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top