Hi,
I got a grid with a dataset bound to it. Value of one of the hidden columns(Say "Access") in the grid indicates that the row should be made read only.
I am having huge data say around 90000 rows in a grid.
How can I set these row read only in bulk?
If I apply the for-each loop, it takes a lot of time to set the read only rights.
Please advise.
Thanks,
Paresh
Hello Paresh,
There are different approaches to solve this task. Maybe one possible solution could be if you are using suitable event where to cancle or not cell edit. For example:
private void ultraGrid1_BeforeCellActivate(object sender, CancelableCellEventArgs e)
{
if (e.Cell.Row.Cells["Access"].Value == "your condition")
e.Cancel =true;
}
Let me know if you have any questions.
Regards
I want to give visual effect to the user by setting the row activation to No Edit. How can I do it in bulk?
Maybe you could use InitializeRow() event with IF condition and set different appearance to these rows. For example:
if ("your condtion")
e.Row.Appearance.BackColor =Color.Red;
Sorry, I want to give visual effect to the user by setting the row activation to Disabled. How can I do it in bulk and not by iterating through each row?
You cannot. You have to set the property on each row individually.
OK, Thanks Mike.