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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting top row index

Thread ID:

Created:

Updated:

Platform:

Replies:

35982 Oct 18,2005 03:24 AM UTC Oct 18,2005 01:30 PM UTC WinForms 2
loading
Tags: GridControl
Patrick Noble
Asked On October 18, 2005 03:24 AM UTC

I am having some difficulty getting a specific row to appear at the top of a griddataboundgrid. The grid just displays with the row at index position 0 whatever value I set in the code below. gridCalls.DataSource = DsSchedule1.demand gridCalls.SetTopRow(50) Do I need to do something in addition?

Administrator [Syncfusion]
Replied On October 18, 2005 07:58 AM UTC

Are you trying to do this in Form.Load before the grid is displayed? If so, before the initial display, a ListChanged.Reset event is raised for a DataTable DataSource, and this is causing the toprow to reset. One way around this is to set a timer at the bottom of Form.Load to raise an event slightly later so you can reset the TopRowIndex after the ListChanged.Reset event has been handled. ''at bottom of form.load Dim t As New Timer() t.Interval = 1 AddHandler t.Tick, AddressOf t_Tick t.Start() ''the handler Private Sub t_Tick(sender As Object, e As EventArgs) Dim t As Timer = sender '' t.Stop() t.Dispose() t = Nothing Me.gridDataBoundGrid1.SetTopRow(50) End Sub ''t_Tick

Administrator [Syncfusion]
Replied On October 18, 2005 01:30 PM UTC

That was it. Thanks Clay.

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

;