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

Cols.InsertRange Failing

Thread ID:

Created:

Updated:

Platform:

Replies:

13860 May 12,2004 01:29 PM UTC May 12,2004 06:57 PM UTC WinForms 8
loading
Tags: GridControl
Greg Wright
Asked On May 12, 2004 01:29 PM UTC

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 04:49 PM UTC

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 04:52 PM UTC

>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 04:54 PM UTC

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

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

>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 05:02 PM UTC

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 05:07 PM UTC

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 05:18 PM UTC

>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 06:57 PM UTC

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.

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

;