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.

Cols.InsertRange Failing

Thread ID:

Created:

Updated:

Platform:

Replies:

13860 May 12,2004 09:29 AM May 12,2004 02:57 PM Windows Forms 8
loading
Tags: GridControl
Greg Wright
Asked On May 12, 2004 09:29 AM

Cols.InsertRange is failing (not inserting a column) when being called from CurrentCellAcceptedChanges and/or CurrentCellActivated. Is this by design? I need to be able to insert column(s) based on what the user enters. Even the following example fails (gridControl1 has 10 rows, 10 cols). private void gridControl1_CurrentCellAcceptedChanges(object sender, System.ComponentModel.CancelEventArgs e) { int intRow = this.gridControl1.CurrentCell.RowIndex; this.gridControl1.Cols.InsertRange(6, 1); this.gridControl1.Refresh(); }

Administrator [Syncfusion]
Replied On May 12, 2004 12:49 PM

Your sample code seems to work OK for me in version 2.0.5.1. Do I need todo something different than just changing some cell and then tabbing or clicking out of teh changed cell to see the problem? WindowsApplication1_8338.zip

Greg Wright
Replied On May 12, 2004 12:52 PM

>Your sample code seems to work OK for me in version 2.0.5.1. Do I need todo something different than just changing some cell and then tabbing or clicking out of teh changed cell to see the problem? > >WindowsApplication1_8338.zip > > I''m using 1.6.1, and it is happening. v2 is still in beta, isn''t it?

Administrator [Syncfusion]
Replied On May 12, 2004 12:54 PM

No, 2.0 has been in release for about 4 weeks now.

Greg Wright
Replied On May 12, 2004 12:57 PM

>No, 2.0 has been in release for about 4 weeks now. Would it be possible to look at 1.6.1 or 1.6.8 for this issue? I can''t afford to switch versions at this time.

Greg Wright
Replied On May 12, 2004 01:02 PM

Sorry, I didn''t answer your question. I''m just changing the value in a cell and tabbing.

Administrator [Syncfusion]
Replied On May 12, 2004 01:07 PM

Do you see the problem in the sample I posted? If you get any syntax error because the project was done with 2.0, just comment out the offending line.

Greg Wright
Replied On May 12, 2004 01:18 PM

>Do you see the problem in the sample I posted? If you get any syntax error because the project was done with 2.0, just comment out the offending line. Yes. It doesn''t add a column, and the ColCount doesn''t change.

Administrator [Syncfusion]
Replied On May 12, 2004 02:57 PM

Try locking the currentcell (requires 1.6.1.8) while you insert the column. this.gridControl1.CurrentCell.Lock(); int intRow = this.gridControl1.CurrentCell.RowIndex; this.gridControl1.Cols.InsertRange(6, 1); this.gridControl1.CurrentCell.Unlock(); this.gridControl1.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.

;