Any clues as to why it could be doing this? Is there a property I can enable/disable to prevent this from happening.
Or workarounds?
Thanks
Anisha
11 Answers, 1 is accepted
Thank you for contacting us. I confirm that this issue appears in our latest release. We plan to address it in our upcoming service pack in the beginning of September. I hope this is not too late.
If you have further questions, please write back.
Jack
the Telerik team


Hello!
It seems that this issue is not fully fixed in v.2010.2.10.914.
I created a form with a grid bound to the BindingSource. All properties are set to default values.
01.
public
partial
class
MainForm : Form
02.
{
03.
public
MainForm()
04.
{
05.
InitializeComponent();
06.
07.
DataTable dt =
new
DataTable();
08.
dt.Columns.Add(
"Group"
,
typeof
(
int
));
09.
for
(
char
c =
'A'
; c <=
'Z'
; c++)
10.
dt.Columns.Add(c.ToString(),
typeof
(
string
));
11.
for
(
int
i = 0; i < 100; i++)
12.
dt.Rows.Add(i / 10);
13.
14.
bindingSource.DataSource = dt;
15.
16.
radGridView.MasterTemplate.GroupDescriptors.Add(
"Group"
, ListSortDirection.Ascending);
17.
}
18.
19.
protected
override
void
OnLoad(EventArgs e)
20.
{
21.
base
.OnLoad(e);
22.
bindingSource.Position = 5;
23.
}
24.
}
Please note, that the bindingSource.Position is set in the OnLoad() method, not immediately in the constructor. This causes the grid be horizontally scrolled to the end.
If I set the breakpoint at line 22 and watch radGridView.CurrentColumn, I see that it is set to the first grouped column "Group". So, it seems that this causes the issue, because setting it to non-grouped column solves the issue:
1.
bindingSource.Position = 5;
2.
radGridView.CurrentColumn = radGridView.Columns[1];
I hope this will help to locate the issue reason.
Thank you.
Thank you for reporting this issue and for the detailed description. We did not managed to include the fix in our last service pack, so it will be addressed in our next major release - Q3 2010. If you have other questions, I will be glad to help.
Greetings,
Jack
the Telerik team

Hello!
JFYI: The same issue with scrolling also occurs if the first grid column is not included into any column group and it becomes the current column after the binding source change.
Thank you.
Regards,
Jack
the Telerik team

I also have the similar question about scrolling. Is there any way to dispable scrolling to the end of the row after clicking the last cell?
I'am using full row selection mode and it is not good for me when gridview scrolls to the end after clicking the last visible cell. I just want
to allow user to scroll gridview using scrollbars only. Right now I'am using
RadGridView.TableElement.ColumnScroller.ScrollToItem(firstColumn); in RadGridView_CellClick() event, but all movings are visible on the screen.
You can do this by replacing the default grid behavior with a custom one. Please consider the following code snippet:
this
.radGridView1.GridBehavior =
new
CustomGridBehavior();
public
class
CustomGridBehavior: BaseGridBehavior
{
public
override
bool
OnMouseDown(MouseEventArgs e)
{
GridCellElement cell = GridControl.ElementTree.GetElementAtPoint(e.Location)
as
GridCellElement;
if
(cell !=
null
&&
(cell.ControlBoundingRectangle.Right > cell.TableElement.ViewElement.ControlBoundingRectangle.Right ||
cell.ControlBoundingRectangle.Left < cell.TableElement.ViewElement.ControlBoundingRectangle.Left))
{
cell.TableElement.BeginUpdate();
int
scrollbarValue = cell.TableElement.HScrollBar.Value;
cell.ColumnInfo.IsCurrent =
true
;
cell.RowInfo.IsCurrent =
true
;
cell.TableElement.EndUpdate(
false
);
cell.TableElement.HScrollBar.Value = scrollbarValue;
return
false
;
}
return
base
.OnMouseDown(e);
}
}
I hope this helps.
Best wishes,
Jack
the Telerik team

Mega Respect!

If anyone has a workaround/quickfix for this it would help alot.
I also looked on the PITS section and only found this "Issue ID 3488 - FIX wrong scrolling when using column groups view in right to left mode" so I've reported the bug.
Should you have any further questions, do not hesitate to write back.
All the best, Jack
the Telerik team