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.

scrolling grid using cursor keys

Thread ID:

Created:

Updated:

Platform:

Replies:

46827 Jul 21,2006 06:41 AM Oct 2,2006 05:46 AM Windows Forms 5
loading
Tags: Grouping
Ajay Bhalegar
Asked On July 21, 2006 06:41 AM

Hi,

I have a grid grouping control with more than 1000 records in it,but when i scroll it using cursor keys(arrow keys).The grid gets locked for a while and after that we can again scroll it.
The same scrolling works fine if we do scrolling by mouse.

Is there any solution to it

Thanks & Regards
Ajay

Ajay Bhalegar
Replied On July 21, 2006 12:02 PM

Hi,

I found the cause of the problem
if we set ShowCurrentCellBorderBehavior property to GridShowCurrentCellBorder.HideAlways
then while scrolling we get the above mentioned problem.
Is this is a defect in grid grouping control

grid1.TableModel.Options.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;

Thanks & Regards
Ajay

Administrator [Syncfusion]
Replied On July 24, 2006 03:15 AM

Hi Ajay,

We are able to see the mentioned problem here and will get back to you with more details on this soon.
Thanks for your patience.

Thanks,
Rajagopal


Administrator [Syncfusion]
Replied On July 24, 2006 07:27 AM

Hi Ajay,

You can workaround this problem by handling the CurrentRecordContextChange event of the gridgroupingcontrol. Here is the code snippet.

private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if(e.Action == CurrentRecordAction.EnterRecordComplete)
{
int row = e.Table.FilteredRecords.IndexOf(e.Record as Record);
if(this.gridGroupingControl1.TableControl.ViewLayout.HasPartialVisibleRows)
{
this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(row + 5, this.gridGroupingControl1.TableControl.CurrentCell.ColIndex);
this.gridGroupingControl1.TableControl.ScrollCellInView(GridRangeInfo.Row(row + 5));
}
else
{
this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(row + 4, this.gridGroupingControl1.TableControl.CurrentCell.ColIndex);
this.gridGroupingControl1.TableControl.ScrollCellInView(GridRangeInfo.Row(row + 4));
}
}
}

Let us know if you need any further assistance.
Thanks,
Rajagopal

Ajay Bhalegar
Replied On July 25, 2006 07:45 AM

Thanks Rajagopal
by your solution my problem is solved.

>Hi Ajay,

You can workaround this problem by handling the CurrentRecordContextChange event of the gridgroupingcontrol. Here is the code snippet.

private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if(e.Action == CurrentRecordAction.EnterRecordComplete)
{
int row = e.Table.FilteredRecords.IndexOf(e.Record as Record);
if(this.gridGroupingControl1.TableControl.ViewLayout.HasPartialVisibleRows)
{
this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(row + 5, this.gridGroupingControl1.TableControl.CurrentCell.ColIndex);
this.gridGroupingControl1.TableControl.ScrollCellInView(GridRangeInfo.Row(row + 5));
}
else
{
this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(row + 4, this.gridGroupingControl1.TableControl.CurrentCell.ColIndex);
this.gridGroupingControl1.TableControl.ScrollCellInView(GridRangeInfo.Row(row + 4));
}
}
}

Let us know if you need any further assistance.
Thanks,
Rajagopal

Ajay Bhalegar
Replied On October 2, 2006 05:46 AM

Hi,

Since i am using the grid grouping control at many places i always have to write above code to avoid the scrolling problem using cursor key

is it not possible to modify the syncfusion grid grouping control properties to handle this problem

Please let me know regarding it.

Thanks & Regards
Ajay

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.

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.

;