- Home
- Forum
- ASP.NET Web Forms (Classic)
- Increase row height dynamically which has Richtext cell
Increase row height dynamically which has Richtext cell
- Feb 7, 2012 02:41 PM UTC
- Feb 9, 2012 12:32 PM UTC
I am using Grid which is extended from "Winforms Syncfusion GridDataBoundGrid" and gird contains one column(cells) which is of type Richtext. So each and every row height will be different depending on the content of the Rich text cell. I need to re-size the row depending on that content. i am able to increase the height of the row if the cell is not rich text using following code
SIGN IN To post a reply.
2 Replies
VE
venkatesh
February 7, 2012 02:57 PM UTC
i am using following code to resize row height...
_currentGrid.Model.RowHeights.ResizeToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);
This is working when there is now cell of type RichText.. if i change a cell to RichText then above code is not resizing row height.
_currentGrid.Model.RowHeights.ResizeToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);
This is working when there is now cell of type RichText.. if i change a cell to RichText then above code is not resizing row height.
RB
Ragamathulla B
Syncfusion Team
February 9, 2012 12:32 PM UTC
Hi Venkatesh,
Thank you for your interest in syncfusion products
You can resize the RowHeight when the current cell as accept the change by using ‘CurrentCellAcceptedChanges’ event. The following code explains the same.
void grid_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
{
this.grid.Model.RowHeights.ResizeToFit(GridRangeInfo.Cell(this.grid.CurrentCell.RowIndex, this.grid.CurrentCell.ColIndex));
}
Hope this will be helpful for your references.
http://help.syncfusion.com/ug_94/User%20Interface/Windows%20Forms/Grid/Documents/414148resizetofit.htm
Please refer to the following sample which illustrates the same
Thank you for your interest in syncfusion products
You can resize the RowHeight when the current cell as accept the change by using ‘CurrentCellAcceptedChanges’ event. The following code explains the same.
void grid_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
{
this.grid.Model.RowHeights.ResizeToFit(GridRangeInfo.Cell(this.grid.CurrentCell.RowIndex, this.grid.CurrentCell.ColIndex));
}
Hope this will be helpful for your references.
http://help.syncfusion.com/ug_94/User%20Interface/Windows%20Forms/Grid/Documents/414148resizetofit.htm
Please refer to the following sample which illustrates the same