Columns could not be resized

Posted by: hennig on 14 February 2019, 11:13 pm EST

  • Posted 14 February 2019, 11:13 pm EST

    Hallo.

    I'm using Spread.Net for WPF 12.
    I have set a worksheet protected and now, for all columns the size could not be changed in the application. Although I have set all columns to CanUserResize = true.
    The symbol for changing size will also be shown, but draging and pulling has no effect.
    With Protect = false there is no problem.

    What could I do?

    Best regards,

    Sascha
  • Replied 17 February 2019, 8:25 pm EST

    Hello Sascha,

    This is the default behavior of Spread WPF.
    When the sheet is protected, it does not allow any actions on column/row.
    This is inline with MS Excel.

    Thanks,
    Deepak Sharma
  • Replied 17 February 2019, 11:43 pm EST

    Hello Deepak.

    Thanks for your answer.

    How could a cell be locked / read-only without setting the work sheet protected?

    Best regards,

    Sascha
  • Replied 18 February 2019, 8:57 pm EST

    Hello,

    You may cancel the editing event for that particular cell.
    private void gcSpreadSheet1_EditStarting(object sender, GrapeCity.Windows.SpreadSheet.UI.EditCellStartingEventArgs e)
    {
    if(e.Column==1 && e.Row==1)
    {
    GcSpreadSheet1.View.StopCellEditing(true);
    }

    }

    Thanks,
    Deepak Sharma
  • Marked as Answer

    Replied 20 February 2019, 12:03 am EST

    Hello Deepak.

    Thanks! This works.

    Best regards,

    Sascha
Need extra support?

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

Learn More

Forum Channels