开发者

Problem with Type casting while setting edit mode for radgrid

I have The following code to set the edit mode for Radgrid based on condition but i am getting error saying cannot implcitly convert bool to telerik.web.ui.grideditmode

My Code is

bool EditPrivilege = this.Privilige.CanModify;
 this.FileAdminRadGrid.MasterTableView.Ed开发者_运维问答itMode = EditPrivilege


Error says clearly what is wrong. EditMode is not of type bool. But You try to assign EditPrivilege of type bool to it.


Looks like you are trying to define EditPrivilege as a boolean when it should be of the Telerik type EditMode/Privilige.

Have you tried (something like):

Privilige EditPrivilege = this.Privilige.CanModify; this.FileAdminRadGrid.MasterTableView.EditMode = EditPrivilege

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜