.net - XtraGrid Disable repository item button on specific cell's mouse move -
i want disable buttonedit editor cell whenever mouse entered in other specific cell. how can achieve functionality?
like, whenever mouse hovers on ammar cell remove button must disabled in 1st , 3rd row.
note: select column repositoryitembuttonedit
column.
this mousemove
event:
private sub gridviewlevel1_mousemove(sender object, e mouseeventargs) ' view @ current point. dim view baseview = gridcontrol.getviewat(e.location) ' retrieve information on current view element. dim basehi basehitinfo = view.calchitinfo(e.location) dim gridhi gridhitinfo = trycast(basehi, gridhitinfo) 'get field value dim fieldname string = gridhi.view.getrowcellvalue(gridhi.rowhandle, gridhi.column) dim row datarow = nothing if not gridhi nothing lblhitinfo.text = fieldname row = gridhi.view.getdatarow(gridhi.rowhandle) else end if end sub
in way, got datarow
next?
it not absolute clear me try achive, try use customrowcelledit
event influence editor depending on rows data. in event can set e.repositoryitem
corresponding logic, e.g. set readonly instance of buttonedit or not-readonly one.
in general can cast row object actual datatype this:
var mydata = gridview.getrow(rowhandle) mydata; if(mydata.foo) e.repositoryitem = myreadonlyeditor; else e.repositoryitem = mynormaleditor;
Comments
Post a Comment