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
close icon

Regarding scroll event in Grid Grouping Control

Kindly Tell me how do i know while scrolling in Grid grouping Control that i reached to the end of grid. Please reply me as soon as possible
Regards

5 Replies

JJ Jisha Joy Syncfusion Team November 24, 2009 09:15 AM UTC

Hi Rohit,

You could handle the TableControlHScrollPixelPosChanged event to achieve the desired behavior.

int leftCol, rightCol;
void gridGroupingControl1_TableControlHScrollPixelPosChanged(object sender, GridTableControlScrollPositionChangedEventArgs e)
{
if (e.Inner.Success)
{
leftCol = this.gridGroupingControl1.TableControl.LeftColIndex;
rightCol = this.gridGroupingControl1.TableControl.ViewLayout.LastVisibleCol;
if (leftCol == 0)
Console.WriteLine("LeftVisibleColumn: " + this.gridGroupingControl1.TableDescriptor.Columns[leftCol].Name + " " + "RightVisibleColumn: " + this.gridGroupingControl1.TableDescriptor.Columns[rightCol - 1].Name);
else
Console.WriteLine("LeftVisibleColumn: " + this.gridGroupingControl1.TableDescriptor.Columns[leftCol - 1].Name + " " + "RightVisibleColumn: " + this.gridGroupingControl1.TableDescriptor.Columns[rightCol - 1].Name);
}
}


Please let me know if this helps.

Regards,
Jisha


RK Rohit Kumar November 24, 2009 10:17 AM UTC

i want to do it while scrolling vertically. Kindly Reply asasp.


JJ Jisha Joy Syncfusion Team November 24, 2009 11:03 AM UTC

Hi Rohit,
One way you can identify when the scrollbar is at the bottom is to test by using the following code:

void gridGroupingControl1_TableControlVScrollPixelPosChanged(object sender, GridTableControlScrollPositionChangedEventArgs e)
{

if (e.Inner.Success)
{

if(this.gridGroupingControl1.TableControl.ViewLayout.LastVisibleRow == this.gridGroupingControl1.Table.DisplayElements.Count - 1)
{
Console.WriteLine("Reached");
}

}

}

Regards,
Jisha


RK Rohit Kumar November 26, 2009 07:34 AM UTC

Thanx It worked for me..


JJ Jisha Joy Syncfusion Team November 26, 2009 08:40 AM UTC

Hi Rohit,

Thank you for your update.

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon