Hi abarham,
The process which you have specified works only for the datagrid which has only ItemCommand event handler.
but if we have the SortCommand also, then this is not working as the sortcommand event is fired after ItemCommand and the datagrid is rebinded in the sortcommand.
one problem with the SortCommand Event is the parameter e is of type DataGridSortEventArgs as oppossed to that of DataGridCommandEventArgs of the ItemCommand Event, so we cannot identify the column header which invoked the event.
Is there any process to overcome this...
anyways thanks for the help :)