In some use cases it might be helpful to allow a table to be redrawn with new data. For instance, I may want to grab new data every 5 seconds, clear the console and redraw the table with this new data.
It would be great if a we had a method like table<T>.Refresh(IEnumerable<T> NewData).
For this to work well, we would need to preserve everything except the data. I can think of two areas where this may be problematic:
- Column widths - perhaps we'd only preserve these if they'd been explicitly set? Would have to experiment. It might be hard to read a table if the columns keep growing and shrinking.
- Calculated columns - we'd need to mark them as computed and store the function, so we could recalculate the values when we get new data.
So it'd be a fair chunk of work, but I think this would be a really interesting addition.
Any thoughts?
In some use cases it might be helpful to allow a table to be redrawn with new data. For instance, I may want to grab new data every 5 seconds, clear the console and redraw the table with this new data.
It would be great if a we had a method like
table<T>.Refresh(IEnumerable<T> NewData).For this to work well, we would need to preserve everything except the data. I can think of two areas where this may be problematic:
So it'd be a fair chunk of work, but I think this would be a really interesting addition.
Any thoughts?