FarPoint Forums

The FarPoint Message Boards
Welcome to FarPoint Forums Sign in | Join | Help
in Search

SetColumnWidth does not work

Last post 05-09-2008, 11:40 AM by mario.muja. 2 replies.
Sort Posts: Previous Next
  •  05-09-2008, 10:50 AM 63252

    SetColumnWidth does not work

    Hello,

    I am using Spread for Windows Forms 2.5.

    I try to set the width of some columns to one pixel using the following code:

                    Sheets[0].ColumnHeader.Columns[columnIndex].Width = 1;

    but it does not work. Nothing happens after this statement.

    I tested the method SetColumnWidth without success.

    What do I need to do to make the sheet accept my column width setting?

    Regards, Mario

  •  05-09-2008, 11:08 AM 63255 in reply to 63252

    Re: SetColumnWidth does not work

    Mario -

    If you are bound then you need to set the DataAutoSizeColumns to False.  Otherwise this should be working.

    Bob M.
    FarPoint Technologies, Inc.
  •  05-09-2008, 11:40 AM 63260 in reply to 63255

    Re: SetColumnWidth does not work

    It works as expected. My fault. There was another statement changing the width further down in my code.
View as RSS news feed in XML
     FarPoint Forums Home