J
JamesB
OK, so I now have a gridview on my page. Because my data isn't stored in
such a way that I can bind the grid directly to the database, I am creating
a DataTable in code, running some procedures to fill this with data in the
right format from the database, all processed accordingly, then binding the
DataTable to the grid.
This works, but newline characters (i.e. "\n") don't work. I also tried
putting them in as <br> but no joy.
Doing some googling, I have read that I need to use "TemplateFields" on the
grid. If I go to the Column Editor for my grid, I don't have any columns to
edit (they are generated at runtime by the binding to my datatable I guess)
so I can't convert them to template ones.
Any thoughts? I tried adding some columns and setting the
AutoGenerateColumns to false, but then my data doesn't appear so I must be
missing some other step...!
such a way that I can bind the grid directly to the database, I am creating
a DataTable in code, running some procedures to fill this with data in the
right format from the database, all processed accordingly, then binding the
DataTable to the grid.
This works, but newline characters (i.e. "\n") don't work. I also tried
putting them in as <br> but no joy.
Doing some googling, I have read that I need to use "TemplateFields" on the
grid. If I go to the Column Editor for my grid, I don't have any columns to
edit (they are generated at runtime by the binding to my datatable I guess)
so I can't convert them to template ones.
Any thoughts? I tried adding some columns and setting the
AutoGenerateColumns to false, but then my data doesn't appear so I must be
missing some other step...!