Rajesh Khater
2005-07-05 15:50:03 UTC
hi ,
I have been studying customization of Datagrid columns by subclassing
DataGridColumnStyle. I have created a subclass of DataGridTextBoxColumn which
delegates all method calls to the base class.
But before delegating, it prints some debug statements to show when a
particular method is called by the framework.
The debug output shows that
SetDataGridInColumn is called twice for each column !
Also, whenever you end the editing of the current cell and move to a
different cell in the same row, the Commit method is called 2 times. If you
move to a different cell in a different row, the Commit method is called 3
times !
What is the rationale behind all these ? Isnt the DataGrid highly
un-optimized ? So many methods of the attached DataGridColumnStyle objects
are called multiple times .. looks redundant apparently.
Thanks,
Rajesh.
I have been studying customization of Datagrid columns by subclassing
DataGridColumnStyle. I have created a subclass of DataGridTextBoxColumn which
delegates all method calls to the base class.
But before delegating, it prints some debug statements to show when a
particular method is called by the framework.
The debug output shows that
SetDataGridInColumn is called twice for each column !
Also, whenever you end the editing of the current cell and move to a
different cell in the same row, the Commit method is called 2 times. If you
move to a different cell in a different row, the Commit method is called 3
times !
What is the rationale behind all these ? Isnt the DataGrid highly
un-optimized ? So many methods of the attached DataGridColumnStyle objects
are called multiple times .. looks redundant apparently.
Thanks,
Rajesh.