Hello,
I know usual command item actions such as add new, edit, delete, refresh are built in with Rad grid. These can be performed on multiple row selection as well with some twists in the aspx and code behind files.
But, I want to acheive a customized command item for multiple row selection such as changing status of the row by selecting multiple rows and click on "Change status" button. I can include this button in the CommandItemTemplate. I can perform basic marching thru selected Items also. How do I convert my selected rows back into DTO - data transfer objections?
Thanks a lot in advance.
I know usual command item actions such as add new, edit, delete, refresh are built in with Rad grid. These can be performed on multiple row selection as well with some twists in the aspx and code behind files.
But, I want to acheive a customized command item for multiple row selection such as changing status of the row by selecting multiple rows and click on "Change status" button. I can include this button in the CommandItemTemplate. I can perform basic marching thru selected Items also. How do I convert my selected rows back into DTO - data transfer objections?
Thanks a lot in advance.
| protected void BuildingItemList_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| if (e.CommandName.ToUpper() == "CHANGESTATUS") |
| { |
| foreach (GridDataItem dataItem in BuildingItemList.SelectedItems) |
| { |
| // Todo - something like below to convert selected items into an object. |
| // MyDTO dto = (MyDTO) dataItem.DataItem; |
| } |
| } |
| } |