Yet more data grid issues
-
Hi, I've got a bit of a problem with using a data grid in a window application. The application crash if I try to double click on the resize row height cursor. ie. When my cursor is in between two row headers and the cursor becomes the resize cursor. Usually, when you double click in between columns, it automatically resize the columns. However, when I try to do the same with the rows, it crashes with this error message: "Fatal system error has occured. Index was out of range. Must be non-negitive and less than the size of the collection. Parameter name: startIndex, mscorlib" Is there anyway I can disable the feature of allowing the user to resize the rows?? Thanks in advance.
-
Hi, I've got a bit of a problem with using a data grid in a window application. The application crash if I try to double click on the resize row height cursor. ie. When my cursor is in between two row headers and the cursor becomes the resize cursor. Usually, when you double click in between columns, it automatically resize the columns. However, when I try to do the same with the rows, it crashes with this error message: "Fatal system error has occured. Index was out of range. Must be non-negitive and less than the size of the collection. Parameter name: startIndex, mscorlib" Is there anyway I can disable the feature of allowing the user to resize the rows?? Thanks in advance.
Have you tried overriding the OnResize? Rocky Moore
-
Have you tried overriding the OnResize? Rocky Moore
Hi OnResize would be related to the Datagrid control itself. Rather try overriding OnPreferredRowHeightChanged in the DataGridTableStyle class. Like:
myGrid.Font = new System.Drawing.Font ("Microsoft Sans Serif", 15, System.Drawing.FontStyle.Regular); myGrid.PreferredRowHeight = myGrid.Font.Height;
:) -
Hi, I've got a bit of a problem with using a data grid in a window application. The application crash if I try to double click on the resize row height cursor. ie. When my cursor is in between two row headers and the cursor becomes the resize cursor. Usually, when you double click in between columns, it automatically resize the columns. However, when I try to do the same with the rows, it crashes with this error message: "Fatal system error has occured. Index was out of range. Must be non-negitive and less than the size of the collection. Parameter name: startIndex, mscorlib" Is there anyway I can disable the feature of allowing the user to resize the rows?? Thanks in advance.
Wow, happens on my DataGrids too! Must be a bug in the MS code... no? In any case, exceptions should not reach the user like that!
-Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."