Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Datagrid Navigation?

Back to Forum: Tech Off
  • User profile image


     I have a web application, in which i have a r.a.d datagrid. I also have 2 textboxes for the user to enter. I have enabled paging in the r.a.d datagrid. I have 2 buttons( New and Cancel).

    If the user is clicking the New Button and if the user tries to navigate to the next page, i want to pop a message to the user. Ie, if the user has clicked the button, then page navigation should not be enabled.

    How to do this? Please help

  • User profile image

    You need to use button1.attributes.add("onClick", "Javascript code goes here") in the codebehind.

    There's a good tutorial for this here:

  • User profile image

    If you are talking about RadGrid offered by Telerik corporation, there might be an quicker way to do what you are up to. I say it because I have played with their web grid a while ago (while working for my previous employer Tongue Out) and gained some knowledge on the product. 

    Do you plan to insert a new record when hitting the New button? If so, just intercept the PageIndexChanged event in the code-behind, check whether e.Item.OwnerTableView.IsItemInserted returns true and cancel the page action by setting e.Cancelled = true. After that, to notify the user that the operation was aborted, add the user message to the ResponseScripts collection of the grid object.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.