hi ,
I want to set background of the highlighted clumn,
because if i select a row in grid it gets highlighted but the column on which my cursor is
having some other background and foreground color,also i want to make my grid readonly not edit able , thanks.
Well, just to be clear... if you set AllowUpdate to false and AllowDelete to true, users will be able to delete rows, but not edit them.
But as I said, AllowDelete and AllowAddNew default to off.
Ah... good to know. I assumed that if you set AllowUpdate the grid would still allow add and delete. I had to worry about this recently because I'm using a grid as summary report in my current project that I didn't want users to be able to modify.
Well, deleting is disabled by default, as is adding new rows. So all you would have to do is set AllowUpdate to False.
And there is always the Enabled, property, of course. But that's probably not what you want, since it disabled everything including sorting, scrolling, etc.
If you wanted a grid to be totaly read-only ie. - no adds, updates, or deletes there wouldn't happen to be some sort of global read-only property would there?
That's a good way to do it. Although, personally, I would use the AfterCellActivate event instead of ClickCell. That way, it will work when the ActiveCell changes without clicking - like via the keyboard.
Also, this KB article may help: HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?