Is there a way to disable specific rows in webgrid?
I have a condition check in the InitializeRow event. Based on that i have to disable the row and not cells.
Any help is appreciated!
Thanks.,
What exactly would "disabling a row" accomplish that "disabling all of the cells in a row" wouldn't? This might help usto determine how to accomplish what result you're after.
Yeah., disabling all the cells in a row would do for me. Need the simplest, less performance overhead way to do that. Something like grid.row(1).Disabled = true or in the InitializeRow e.Row.Disabled = true.
Turning off editing for all cells in the row is the best solution. The best way to turn off editing for a cell is to set its AllowEditing equal to No (Infragistics.WebUI.UltraWebGrid.AllowEditing.No).
A WebGrid cell or row has no concept of having a "disabled" state, where it becomes unable to be interacted with and its appearance changes.
If you want the appearance of all cells of the row to change, you should set properties on the row's Style object accordingly. The most efficient way to do this is to define a CSS class that represents a "disabled" state, and use the row's Style.CssClass property to refer to that CSS class's name.