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. Image for the cookie policy date

Scrollable Cell

I need to make a cell scrollable, I am using the following code to achieve this

private void mmpGrid_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridCurrentCell cc = this.mmpGrid.TableControl.CurrentCell;
if(showPreview)
{
for(int count=0;count {
if(e.TableControl.TableDescriptor.Columns[count].MappingName=="psummary" )
{
e.Inner.Style.Enabled =true;
e.Inner.Style.AllowEnter = true;
e.Inner.Style.WrapText = true;
e.Inner.Style.VerticalScrollbar = true;
e.Inner.Style.TextColor =Color.Red ;

e.Inner.Cancel =true;

}
}
}

}



But it works downward only, if I click from top to bottom cells it works properly , if I change the order of clicks it is not showing scroll in the cells except the first cell. Please let me know the solution


1 Reply

AD Administrator Syncfusion Team August 11, 2006 06:47 AM UTC

Hi Sivaiah,

By setting the style.wraptext = true and the style.VerticalScrollbar = true in the QueryCellStyleInfo event handler, a vertical scrollbar will appear as you edit the cell. You need to have sufficient row height, to see the text getting wrapped in the cell.
Try the attached sample, that works fine in displaying the vertical scrollbar properly when the cell content is one more than one line tall.

Here is a sample
http://www.syncfusion.com/Support/user/uploads/GGC_ScrollableCell_8b5e188a.zip

Let me know if you need any further assistance.
Thanks for using Syncfusion Products.

Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon