Resize visible cells after scroll

Hello,

How can one resize only the visible cells of a GridControl after a scroll operation? ResizeToFit(m_DataGridView->ViewLayout->VisibleCellsRange) doesn't work if done in the below event when type is endscroll:

gridcontrol->VScrollBar->Scroll

Please respond promptly.

Thanks,
Adam


1 Reply

JP Jeya Preetha M Syncfusion Team April 24, 2012 09:57 AM UTC

Hi Adam,

Thanks for your interest in Syncfusion Products.

To resize only the visible cells after a scroll operation,please make use of "VerticalScroll" event and specify the scrolleventtype as "Endscroll".


this.gridControl1.VerticalScroll += new ScrollEventHandler(gridControl1_VerticalScroll);
void gridControl1_VerticalScroll(object sender, ScrollEventArgs e)
{
if (e.Type == ScrollEventType.EndScroll)
{
//Range()
//Refresh()
}
}


Please let me know if you have any concerns.

Regards,
Jeya Preetha M


Loader.
Up arrow icon