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

Deletion of a row

Thread ID:

Created:

Updated:

Platform:

Replies:

18014 Aug 23,2004 02:00 AM UTC Aug 23,2004 08:47 AM UTC Windows Forms 4
loading
Tags: GridControl
arvind
Asked On August 23, 2004 02:00 AM UTC

Hai , I am using GDBG and if I try using the code given the example DeleteContext_5448.zip You have used dt.AcceptChanges in the row leave event and if I do so I will not get the row state .Is there any method to insert and delete row using Context menu without the dt.AcceptChanges and I should be getting the row State .Please help me out Thanks and Regards. hsee

Administrator [Syncfusion]
Replied On August 23, 2004 07:44 AM UTC

I really do not have a good solution for this. The framework just does not support moving rows in a datatable. You can delete easily enough. But a DataTable only adds rows at the bottom of the table. I do not know of a way to actually move the row in the DataTable so it remains where you want it. You can fake it out by constantly calling AcceptChanges on the DataTable, but when the defaultview gets reset for any reason, the row will get placed back where it really is, and that is at the bottom of the table. Here is another approach that uses a GridDataBoundGrid in a virtual manner bound to a DataTable. By using teh virtual event Model.QueryCellInfo, you can let the grid maintain where a row is displayed. SO, you can make a row look like it is inserted at some spot event though it is really at teh bottom of teh DataTable. Here is a sample showing how you might do this. The sample only works with unsorted DataTables. This technique might possibily work with sorted dataviews but it would be complicated. If you want to manage sorted views and appear to insert rows at certain position, then I think you will have to use a technique that adds a column to your datatable that tracks where teh row should be. Here is a thread that discusses this with a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16227

arvind
Replied On August 23, 2004 08:18 AM UTC

Hai If I try to use the http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16227. Here every time I insert a new row all the row state will become as Modified as the Column value has been changed after the insert. I got an example using Wrapper Classes which will solve the problem but it was said tht the latest version of 2.5.0.1 has to be taken to make use the Collection Classes. From ver can I get the latest version . >I really do not have a good solution for this. The framework just does not support moving rows in a datatable. > >You can delete easily enough. But a DataTable only adds rows at the bottom of the table. I do not know of a way to actually move the row in the DataTable so it remains where you want it. You can fake it out by constantly calling AcceptChanges on the DataTable, but when the defaultview gets reset for any reason, the row will get placed back where it really is, and that is at the bottom of the table. > >Here is another approach that uses a GridDataBoundGrid in a virtual manner bound to a DataTable. By using teh virtual event Model.QueryCellInfo, you can let the grid maintain where a row is displayed. SO, you can make a row look like it is inserted at some spot event though it is really at teh bottom of teh DataTable. Here is a sample showing how you might do this. The sample only works with unsorted DataTables. This technique might possibily work with sorted dataviews but it would be complicated. If you want to manage sorted views and appear to insert rows at certain position, then I think you will have to use a technique that adds a column to your datatable that tracks where teh row should be. Here is a thread that discusses this with a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16227 > >

Administrator [Syncfusion]
Replied On August 23, 2004 08:45 AM UTC

You can download the latest releases from your support home page when you log into our Direct Trac Support system.

Administrator [Syncfusion]
Replied On August 23, 2004 08:47 AM UTC

You should also consider the technique used in this sample that I psoted in my previous response to you. http://www.syncfusion.com/support/user/Uploads/InsertRowGDBG_9036.zip

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

;