How to set cell properties from rowselected in gridview Devexpress? -


i'm newbie devexpress. when work gridview in have problem :

private void grditem_selectionchanged(object sender, devexpress.data.selectionchangedeventargs e)     {         receivecontroller _rc = new receivecontroller();         datarow r = null;         int[] selectedrows = grditem.getselectedrows();         if (selectedrows.length != 0)         {             (int = 0; < selectedrows.length; i++)             {                 grditem.getdatarow(selectedrows[i]);                 // set cell properties here             }                         }     } 

in event selectionchanged row, need set few cells properties in it, may : bordercolor, allowedit = false, or disable..... don't know how can ?

you cannot set appearance properties specific cell that. gridcontrol not maintain internal collection of rows/columns, it's not easy saying grid.rows[3].cells[2].backcolor = color.blue;.

instead, need handle 1 of gridview's drawing events; in case, seem rowcellstyle event best choice.

typically, within rowcellstyle event handler check see if current cell meets specific condition based on rule. if so, can apply formatting cell.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -