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.
Syncfusion Feedback

Scrolling

Thread ID:

Created:

Updated:

Platform:

Replies:

26990 Apr 4,2005 08:40 PM UTC Apr 4,2005 09:47 PM UTC Windows Forms 1
loading
Tags: Grouping
Anthony Avella
Asked On April 4, 2005 08:40 PM UTC

A user performs the following actions: 1- Selects the first or second column in a summary row in a grid (via mouse-click, making it the current cell in the grid). 2- Scrolls the grid horizontally to about the grid''s midpoint (width). 3- Expands the summary row by clicking on the ''+'' sign which is a frozen column(hence always visible). The grid then ignores the user''s scrolled position and returns to the selected row (undoing the user''s scrolling). What I''d like to do is move the current cell to the the column the user scrolled to (while staying in the same row) when the user clicks a summary row for expansion. thanks.

Administrator [Syncfusion]
Replied On April 4, 2005 09:47 PM UTC

Anthony, The following code should do it: this.groupingGrid1.TableControlCellButtonClicked += new GridTableControlCellButtonClickedEventHandler(groupingGrid1_TableControlCellButtonClicked); private void groupingGrid1_TableControlCellButtonClicked(object sender, GridTableControlCellButtonClickedEventArgs e) { GridTableCellStyleInfo style = (GridTableCellStyleInfo) e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex]; if (style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionPlusMinusCell) { if (!style.TableCellIdentity.DisplayElement.ParentGroup.IsExpanded) { GridTableControl tc = this.groupingGrid1.TableControl; int leftColIndex = tc.LeftColIndex; bool isFullyVisible = tc.GetCurrentHScrollPixelDelta() == 0; if (!isFullyVisible) leftColIndex++; if (leftColIndex > tc.CurrentCell.ColIndex) { tc.CurrentCell.MoveTo(tc.CurrentCell.RowIndex, leftColIndex); style.TableCellIdentity.DisplayElement.ParentGroup.IsExpanded = true; e.Inner.Cancel = true; } } } } Stefan >A user performs the following actions: >1- Selects the first or second column in a summary row in a grid (via mouse-click, making it the current cell in the grid). >2- Scrolls the grid horizontally to about the grid''s midpoint (width). >3- Expands the summary row by clicking on the ''+'' sign which is a frozen column(hence always visible). > >The grid then ignores the user''s scrolled position and returns to the selected row (undoing the user''s scrolling). > >What I''d like to do is move the current cell to the the column the user scrolled to (while staying in the same row) when the user clicks a summary row for expansion. > >thanks.

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.

Warning Icon 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.Close Icon

;