I want to have a grid that looks and behaves almost exactly like excel. Try to remember this key point.
I want to be able to move around in the grid with my arrow keys (Ignore, I have read the various posts on this)
I want to be able to edit any cell that currently has focus. No, I don't want to click an Edit button first. If I am in the cell and hit a key, I am editing the cell.
**After** I edit a cell, I need to do a partial postback to the server, where I will recalculate several other cells(columns) in the datasource bound to this control, using the updated value in the calling cell. (The caluclations are performed on the server). Then, after the calculations are complete, I want the cell's row to update with the new values in the underlying dataset. ***AND**, surprisingly, I don't want to lose focus of the control that received it after I updated the first cell.
As far as I know, I have looked at all of the examples on your website, so I think this scenario extends a bit beyond the standard examples.
So, is this possible with RadGrid, and if so, could you give me a few hints of how to do it?
6 Answers, 1 is accepted
I want to:
1) After edit of a cell in a row....
2) Do a partial postback of the page
3) Using the newly updated cell value to perform calculations on the server, which will update other columns in the source dataset
4) Return those new values to the appropriate cells in the edited datarow
5) Focus must remain on the proper control (so, if I edited Row 4, Col 5, then tab to Row 4, Col 6, focus will remain on Row 4, Col 6 after the calculations are complete)
Is this type of functionality possible with radGrid?
Hi Trevor ,
Did you find a solution for this ?
By default the RadGrid handles navigating up and down using the arrow keys and right and left using the TAB or SHIFT+TAB keys. This can be seen in the Grid - Batch Editing online demo.
There is also a Code Library sample for an excel like editing at Excel look and feel for RadGrid.
I went throw the links you have given but problem still there.
I am also facing the same issue mentioned.
The problem is i have some serverside validation in a Name Column. So after entering the name postback occur and validate the name and rebind the grid. At that time focus lose and user needs to do a mouse click.
Like while doing the post back keep the row and column name, then after postback based on stored cell details set the focus to next cell. Because during the postback i am rebinding the grid so surely the grid will lose the focus.
Please suggest if there is anything for this issue.
For example, when you selected a row, save the ID of that row in a hidden field that is outside of the Grid. After the postback, when the Grid finished loading, access the hidden field's value, get the row's ID, find the Grid row by this ID and make it selected.
Here are few links that explain several things you will need to know to work with the Grid on client-side:
- Using jQuery
- Get Client-side Reference to a Control Object
- Client-Side Programming Overview
- Accessing Values and Controls Overview
- Batch Editing Overview