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.

Lock Grid Row

Thread ID:

Created:

Updated:

Platform:

Replies:

26064 Mar 11,2005 05:14 PM Mar 12,2005 11:16 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 11, 2005 05:14 PM

I am using the grid with a virtual data. I am trying to implement an in-cell editing action. I want to be able to keep the cell being edited in its current position during the edit action. I attempt to do this by changing the top index. When I so this I get a flickering action. Is there a better way of doing this. Is it possible to place the grid in a mode where you say keep data 30 row on grid visible row 12? Thanks.

Administrator [Syncfusion]
Replied On March 11, 2005 05:25 PM

I do not understand. What is causing the grid to scroll? Normally, when you type in a cell, the cell does not scroll vertically.

Administrator [Syncfusion]
Replied On March 12, 2005 07:41 AM

What is happening is that the data tht is being presented in the grid is changing. For example lets say you are editing a dictionary. You are editing the definitiaon of the word "Hello" which is on item 25 of the data and on line 10 of the grid (top index of grid = 15). While you are editing the database gets changed and now the word "GoodBye" is entered. Due to this addition the, word "Hello" is now index 26. In normal grid processing this would shift it to line 11 on the grid (Top Index still = 15). I am not sure but I belive that the CurrentCell will remain at line 10. What I would like to happen is that the edit box remains active and in it current state, with the row "Hello" and not move from visible row 10 in the grid. This is a simplified version of what happens in my applications. In my application the number of inserts/removals can be 100''s per second. And if the edit box is jumping around, it would be very difficult for the user. >I do not understand. What is causing the grid to scroll? Normally, when you type in a cell, the cell does not scroll vertically.

Administrator [Syncfusion]
Replied On March 12, 2005 08:03 AM

What kind of grid are you using? GridControl, GridDataBoundGrid or a GridGroupingControl? With a virtual GridControl, any updating you do on the outside data source should not affect anything in the grid. In fact, the grid will not actually show the change until you explicitly call grid.refresh or grid.RefreshRange or grid.Invalidate/Update or soemthing else to trigger a paint message. Are you listening to some kind of change event on your external datasource, and then doing some kind of call to trigger the draw. If so, exactly what are you doing in your code at that point? The code at that point might be causing the behavior you are seeing? Try commenting it out. Does the problem go away?

Administrator [Syncfusion]
Replied On March 12, 2005 11:16 AM

Steve, check out also the GridControlBase.InternalSetTopRow method. It lets you change the top row index without scrolling the grid, e.g. if a record gets inserted before the current display. Stefan

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.

;