Ok we''ve ran in to a little problem in how we load our grids. When we first started working with loads we always loaded them doing the double for i,j loop data indexer method of loading. After doing some reading in the forum we learned about data object loading and how the time it takes to load a form was more then cut in half if not more on some of our bigger grids. I''ve asked clay some other question about that in the past. This had been working fine we thought until we started doing some extra testing. I have attached or will email a sample. Run the sample and first select a range of cells in col1 starting in row1 for a total of 5 rows. Ok now in the row header notice the rows with the header of " .... ". these are read only cells. Ok now if you click the add to col1 button there is code behind it to add 100 to all the selected cells in the range but it shouldnt do anything to the read only cells but it is. So if you notice after you clicked it added 100 to the read only cell. Now select a range in col2 starting in row one for 5 rows. then click the add to col2 button. this has the same code to add 100 to all the cells but notice after you click it it DOESNT add to the read only cell row4,col2 like it did do in col1. now if you look at my setupgrid code col1 is loaded and calculated using the data object load. col2 is loaded using the data indexer load. so my question is why isnt the readonly stopping something from changing its value like it does in the data indexer slower way of loading??
ADAdministrator Syncfusion Team March 14, 2005 05:20 PM
If you want the ReadOnly setting respected when using the data object directly, you will have to test it.
If Not data(row, col).GetValue(data(row, col).ReadOnlyProperty) Then
data(row, col).SetValue(data(row, col).CellValueProperty, decWorkMax)
PBPhilip BishopMarch 15, 2005 08:37 AM
Why exactly is that? It seems like from our workings with read only all the other times in the past you cant ever make it go away and end up doing things like ignore read only. So why is this different?
ADAdministrator Syncfusion Team March 15, 2005 08:39 AM
You are accessing the GridControl.Data object directly to modify it.
This by-passes all the code that is in GridControl (and GridControl.Model) that checks and respects things like grid.IgnoreReadOnly. If you want these checks, then use the indexer on the GridControl which does not bypass the GridControl code and hits such checks (but is slower because it does not by pass the GridControl code).