Row gets readonly

Posted by: eugen-rata on 8 September 2017, 12:39 pm EST

  • Posted 8 September 2017, 12:39 pm EST

    Hi

    just started to use fpSpread in .NET. Before we used in VB6 as COM and everything was OK.
    Now I wanted to bind the spread to a datasource to have less to code to write when working with db table.
    so, I have such a code

          fpSprInv_Sheet1.AutoGenerateColumns = false;
          fpSprInv_Sheet1.DataSource = m_jobsInfoDS.vJobInvoices;
    and
            fpSprInv_Sheet1.Columns.Add(0, 14);

            FarPoint.Win.Spread.CellType.CheckBoxCellType chkType = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
            fpSprInv_Sheet1.Columns[0].CellType = chkType;
            fpSprInv_Sheet1.Columns[0].Label = "View/Print";
            fpSprInv_Sheet1.Columns[0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;

            fpSprInv_Sheet1.Columns[1].DataField = "SpecifiedInvoiceID";
            fpSprInv_Sheet1.Columns[1].Label = "Invoice No.";

            fpSprInv_Sheet1.Columns[2].DataField = "InvoiceDesc";
            fpSprInv_Sheet1.Columns[2].Label = "Description";

    The DB columns are:
    SpecifiedInvoiceID varchar(50)
    InvoiceDesc varchar(200)

    everything works fine, I can see data in the spread, can edit data but ONLY in first 2 columns. Somehow the column 3 (
    InvoiceDesc) gets blocked, so I can't enter to edit mode.

    Any idea why this happens?
    Using: VS 2005
    fpSpread: 2.5.2001.2005

    Thx
  • Replied 8 September 2017, 12:39 pm EST

    Is the Locked property set for that column? Is there anything in the database that would prevent you from editing this column?
  • Replied 8 September 2017, 12:39 pm EST

    All the properties which I set you can in the code. If I use another column from DB everything works ok.
    The data is taken from a simple view, "select * from table", I need only data to be displayed and edited, I'll update it using other classes.

    Thx
  • Replied 8 September 2017, 12:39 pm EST

    If you bind this same field to another basic .net grid control, can you edit it?
  • Replied 8 September 2017, 12:39 pm EST

    Hello,


    I would suggest getting the latest maintenance release of Spread for Windows Forms (2.5.2011) to see if this has been fixed.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels