DataControl selected row height to change

Hi,

Is there a way to set the selected row height with the GridControl? Basically when the row is selected I would like the row to transition to a larger height. I would also like this transition with easing, is this possible.

Also is it possible to when scrolling the data from left to right, is it possible to put a easing effect on this this scroll?

Thanks for you help


1 Reply

JJ Jawahar Jeevanandan J Syncfusion Team November 28, 2011 11:47 AM UTC

Hi Christopher,

Thanks for your patience.

You can achieve your requirement by handling the CurrentCellActivated and CurrentCellDeactivating event in the following ways.

Code snippet [C#]:

this.grid.CurrentCellActivated += new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(grid_CurrentCellActivated);
this.grid.CurrentCellDeactivating += new Syncfusion.Windows.ComponentModel.GridCancelRoutedEventHandler(grid_CurrentCellDeactivating);

void grid_CurrentCellActivated(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)
{
this.grid.Model.RowHeights[this.grid.CurrentCell.RowIndex] = 50;
this.grid.Model.InvalidateVisual();
}

void grid_CurrentCellDeactivating(object sender, Syncfusion.Windows.ComponentModel.SyncfusionCancelRoutedEventArgs args)
{
this.grid.Model.RowHeights[this.grid.CurrentCell.RowIndex] = this.grid.Model.RowHeights.DefaultLineSize;
this.grid.Model.InvalidateVisual();
}

We have prepared a sample based on this and you can find the sample under the following location

Sample : http://www.syncfusion.com/downloads/Support/DirectTrac/86767/CS-1288539346.zip

Please let us know if you have any queries.

Thanks,
Jawahar.



Loader.
Up arrow icon