ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2015-12-28 02:50:45

asparatu
Member
Registered: 2014-08-20
Posts: 196

Remove column Error

Hello Jing,
    I have notice that when i remove more then one column in the spreadsheet the control looks like this

8dd330fd562000ee8c49813da9ec5be2.jpg

The code

 With rgInputDataSheet
            'checks to see if the column count is greater then 2
            If .ColumnCount > 2 Then
                '*******************************************************************************
                '* Resets the validrange that can be accessed
                '*******************************************************************************
                'Sets the validrange values
                Dim posOne As New ReoGridPos(1, 1)
                Dim posTwo As New ReoGridPos(.RowCount - 1, .ColumnCount - 2)

                'Sets the validrange
                validRange = New ReoGridRange(String.Format("{0}:{1}", posOne.ToAddress, posTwo.ToAddress))

                'Sets the selection range of the validrange
                .SelectionRange = New ReoGridRange(validRange.StartPos)

                '*********************************************************************************
                '* Removes the column from the worksheet
                '*********************************************************************************
                .DeleteColumns(.ColumnCount - 1, 1)

                '*********************************************************************************
                '* Checks to see if the button should be enabled or disabled
                '*********************************************************************************
                If .ColumnCount > 2 Then
                    btnSubtractColumn.Enabled = True
                Else
                    btnSubtractColumn.Enabled = False
                End If

                If rgInputDataSheet.ColumnCount > 21 Then
                    btnAddColumn.Enabled = False
                Else
                    btnAddColumn.Enabled = True
                End If
            End If
        End With

Shane

Offline

#2 2015-12-29 00:30:54

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Remove column Error

Thanks Shane, I'm now going to check this problem.

Offline

#3 2016-01-19 03:28:04

asparatu
Member
Registered: 2014-08-20
Posts: 196

Re: Remove column Error

Hello Jing,
   Did you find a problem with the removing a column in worksheet?

Shane

Offline

#4 2016-01-20 11:39:51

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Remove column Error

No, I can't find problems when deleting columns, could you provide an example rgf?

Offline

Board footer

Powered by FluxBB