Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
488
Displaying contents of delimited text file
posted

What would be the simplest way of displaying unbound data such as the contents fo a tab delimted text file in the data grid control or a two-dimensional array of strings (read-only)

The only way I can think of so far is to convert the text file contents into xml which seems like a very cumbersome approach. Is there anything neater/more efficient solution than this.

I suspect that the grid control isn't really suitable for such a task and an Excel grid type control would be more suitable but not sure if they is such a control commerically available.

Parents
  • 2426
    posted

    Hello SCurle,

    XML is not the only option you have. You can bind the grid to several different types of collection object. The main requirement for binding to a collection is that it implements the IEnumerable interface.

    You can read more about binding data to the grid here.

Reply Children
No Data