While on course last week I found time to complete a first version of the DataGrid. Known issues in this version are :
Due to the large number of code lines I will only highlight some of the important parts of the code.
The main idea is starting from the original DataGridTableStyle building an ArrayList with all the possible combinations of DataGridColumn positions and then move between the DataGridTableStyle (us_BuildArrayListOfGridStyles). To accomplish this the custom DataGrid implements a BeforeCellChange event. When the event is raised the Fixed Column Provider checks to see whether or not a fixed DataGridColumn would become (partly) invisible (iI_GridEvents_BeforeCellChange). If so the ArrayList with DataGridTableStyle is searched for the DataGridTableStyle closest to the current which has the DataGridColumn visible. The found DataGridTableStyle is then set as the current DataGridTableStyle of the DataGrid. After that the new current Cell-location is set.
I will try to do the following
-
Find a way to allow scrolling with the horizontal ScrollBar.
-
Make the provider as a class that can be "hooked" to any DataGrid.
If anyone wants the full code or has some tips mail me!
Get Code
9:46:09 PM
|