We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Data Control Row

Thread ID:

Created:

Updated:

Platform:

Replies:

96774 Oct 5,2010 11:46 AM UTC Oct 13,2010 05:19 AM UTC WPF 3
loading
Tags: GridControl
Elisha John
Asked On October 5, 2010 11:46 AM UTC

Hello

Is there any way where I am able to change the height of the row when the user is editing a cell?

Thank you


Elisha John
Replied On October 5, 2010 12:27 PM UTC

Hi

Are there any other ways where I can expand the cell size of what the user wants to edit, and shrink it back to normal when the user is done editing?

Thank you


Jeraldes J [Syncfusion]
Replied On October 13, 2010 05:18 AM UTC

Hi Elisha,

Thanks for using Syncfusion Products.

We have developed a sample for changing the size of the row when it is double clicked for editing and then changing back to the original size when the edit is completed.

Please refer the code snippet and the sample from the following.

[code snippet]

this.dataGrid.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(dataGrid_PreviewMouseLeftButtonDown);
this.dataGrid.CurrentCellEditingComplete += new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(dataGrid_CurrentCellEditingComplete);
}

void dataGrid_CurrentCellEditingComplete(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)
{
GridDataControl grid = sender as GridDataControl;

if (grid != null)
{
GridCurrentCell cc = grid.Model.Grid.CurrentCell;
this.dataGrid.Model.RowHeights[cc.RowIndex] = 20d;
this.dataGrid.Model.InvalidateCell(GridRangeInfo.Table());
this.dataGrid.Model.InvalidateVisual(true);
}
}

void dataGrid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
var index=this.dataGrid.Model.Grid.PointToCellRowColumnIndex(e);
if (e.ClickCount==2 && this.dataGrid.Model[index.RowIndex,index.ColumnIndex].CellType!="HeaderCell")
{
this.dataGrid.Model.RowHeights[index.RowIndex] = 200d;
this.dataGrid.Model.CurrencyManager.BeginEdit(index.RowIndex);
this.dataGrid.Model.InvalidateCell(GridRangeInfo.Table());
this.dataGrid.Model.InvalidateVisual(true);
}

}

[Sample Link]




Let us know if you need any other details.

Regards,
Jeraldes J



Jeraldes J [Syncfusion]
Replied On October 13, 2010 05:19 AM UTC

Hi Elisha,

Sorry for not attaching the sample.

Please find the attached sample from the following link.

http://www.syncfusion.com/uploads/redirect.aspx?file=GDC-RowEdit-HeightChange-96774_8dfde9bc.zip&team=development

Let us know if you need any other details.

Regards,
Jeraldes J



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;