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.

Row Scroll

Thread ID:

Created:

Updated:

Platform:

Replies:

26037 Mar 11,2005 02:19 PM Mar 11,2005 03:19 PM Windows Forms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 11, 2005 02:19 PM

How do i scroll to the top row ? We have grid that is dynamically updated whenever a new records appear i want the grid to scroll at top most row (the grid is sorted by id in descending order so new record will always appear in top) I treid with currencymanager.position =0 but i don''t see grid scrolling to the top row then i implemented this code this.Binder.CurrentPosition=0; this.ScrollCellInView(1,1); but now i see a painting problem ? any clue..

Administrator [Syncfusion]
Replied On March 11, 2005 02:28 PM

Try setting this.grid.TopRowIndex = 1;

Administrator [Syncfusion]
Replied On March 11, 2005 02:33 PM

i tried that but the arrow pointer which is the column 0 in this case doesn''t point to top row...i still see the ">" pointer displayed on previous selected row not on new row. >How do i scroll to the top row ? We have grid that is dynamically updated whenever a new records appear i want the grid to scroll at top most row (the grid is sorted by id in descending order so new record will always appear in top) > >I treid with currencymanager.position =0 but i don''t see grid scrolling to the top row then i implemented this code > this.Binder.CurrentPosition=0; > this.ScrollCellInView(1,1); > >but now i see a painting problem ? any clue..

Administrator [Syncfusion]
Replied On March 11, 2005 02:45 PM

Also use this.grid.Binder.CurrentPosition = 0;

Administrator [Syncfusion]
Replied On March 11, 2005 02:46 PM

If you also want to move the current cell, also use grid.CurrentCell.MoveTo(1,1);

Administrator [Syncfusion]
Replied On March 11, 2005 02:53 PM

pls find attached bitmap which describes the current behaviour.. we have created our dervied class that extends griddataboudn as u can see the following code is inserted in this class private void Model_RowsInserted(object sender, GridRangeInsertedEventArgs e) { if ( this.Model.RowCount == 1 ) { this.Model.ColWidths.ResizeToFit(GridRangeInfo.Table()); } if (this.Binder.CurrentRowIndex == 2 || this.Binder.CurrentRowIndex == 1) { this.TopRowIndex=1; this.CurrentCell.MoveTo(1,1); } } now we see a painting problem... (note : i cannot uplaod the bitmap because the upload window is taking hell lot of time to appear) for example if the grid contains following rows ID Trader Name 3 AA 2 BB 1 CC and when new records appear the grid will look like as describe dbelow. ID Trader Name 3 AA 3 AA 2 BB 1 CC but now when i go and click on any of the cells of the first two rows redraw happesn properly ID Trader Name 4 DD 3 AA 2 BB 1 CC Also there is a code in PreparviewStyleinfo which does some coloring stuff.. but nothing major ... Hope this explains a bit

Administrator [Syncfusion]
Replied On March 11, 2005 03:19 PM

If you can send a sample project showing teh problem to suppaort@syncfusion.com, we can try to spot the problem here. Something else to try: this.Binder.EndEdit(); this.TopRowIndex=1; this.CurrentCell.MoveTo(1,1); this.Refresh();

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.

;