Bind to individual cells -- no collection

Posted by: aaronh-fp on 8 September 2017, 3:21 pm EST

  • Posted 8 September 2017, 3:21 pm EST

    Hello,
    Is there a way to bind individual cells in a sheetview to a single class, instead of a collection? This is an example of the class and the location of each cell that I want the value to display.



    [Serializable()]
    public class Example
    {
    public string FullName { get; set; } //cells[1,1]
    public double AvgSpend { get; set; } //cells[5,3]
    public double TotalSpend { get; set; } //cells[6,3]
    public DateTime Modified { get; set; } //cells[9,1]

    }


    Thanks,

    Aaron
  • Marked as Answer

    Replied 8 September 2017, 3:21 pm EST

    Hi,

    No, that isn't supported with data binding, but you can get the same effect with a code that handles the SheetView.CellChanged event and listens for updates to the data source object with an event handler (to update the cells if needed).

    You could also create a UserControl containing Spread and implement the logic there, then expose properties on the UserControl for binding to the cells.

    Regards,
    -Sean
Need extra support?

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

Learn More

Forum Channels