I am using a RadGrid as a tool for searching through a table. The table itself has 30 columns. If I bring it directly into the grid (e.g. select *), its width spans three screens, which is unacceptable to the client.
So instead of loading the entire table, I've written the grid's select statement to bring in only the 10 most useful columns for searching. I would like to capture something like an OnClick event on the server side that fires immediately after the user clicks on the grid's edit image (the pencil) or insert command link. These events would fire before there is any attempt to bring up a custom edit/insert form or the default in-place form for edits/inserts.
In that event, I plan to redirect to another page (X) to be used for inserting and updating. Within the event, I would need to know if the edit or insert command had been fired. When editing, I would need to be able to get the record id so I could get all the record's data to display in the edit form. Remember the grid only knows about the 10 columns. I would handle saving back to the DB in X and on success would redirect back to the grid page, which would refresh itself naturally.
Is this possible? I can't find anything like OnClick events for edit and insert, and don't know where and how to determine if I'm in Edit or Insert mode, or if in Edit how to find the current record ID.
Any help would be much appreciated.