开发者

Only allow one edit or insert in a RadGrid?

开发者 https://www.devze.com 2023-01-08 05:23 出处:网络
I\'m using the Telerik rad grid and I\'m allow the user to enter data directly to the grid. I am using the \"EditForms\" edit mode and I also allow inserts using the same.

I'm using the Telerik rad grid and I'm allow the user to enter data directly to the grid.

I am using the "EditForms" edit mode and I also allow inserts using the same.

If the user edits a row, then I don't want to allow any other edits or inserts until the current one is complete or cancelled.

I'm totally new to Radgrids and I've recently been working in MVC... so any help would be开发者_StackOverflow社区 great!


I would choose this way:

  • Listen for the Edit/Insert command inside the ItemCommand grid server handler and check whether the EditIndexes or EditItems collection of the grid is not empty. If so, cancel subsequent edit/insert by setting e.Canceled = true.

Check out this topic for some heads-up.

Dick


Add this property to your RadGrid: AllowMultiRowEdit="false"

0

精彩评论

暂无评论...
验证码 换一张
取 消