Skip to content

[WPF] What is the fastest way to load data #545

@juanmanzanero

Description

@juanmanzanero

Hello!

Thank you for your very nice Control for .NET.

I am trying to initialize a large Worksheet (dimension 1,000,000 x 2) with data already loaded in memory.

Can I ask what is the most efficient way to load the data?

For now I am handling the Initialized event of the Control that hosts this Spreadsheet and setting the values one by one

    _Worksheet = _ReoGrid.CurrentWorksheet;
    _Worksheet.Resize(1048576, 2);
    _Worksheet.SuspendDataChangedEvents();
    for (var row = 0; row < Inputs.Count(); row++)
    {
        var Row = row;
        _Worksheet[Row, 0] = x[row]
        _Worksheet[Row, 1] = y[row];
    }
    _Worksheet.ResumeDataChangedEvents();

where x and y are my values. This takes a lot (like 14s), so I wonder if there is a better way I cannot find in the documentation.

Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions