简体   繁体   中英

Separate table column into multiple GridView columns?

I am retrieving a column from a table using an SqlDataSource in ASP.NET/C#, which contains multiple 'values' separated by commas. I'd like to be able to separate this values into multiple columns in my GridView, and also allow them to update them. Is this easy to accomplish?

Thanks

I would prefer to split the values to multiple columns before retrieving data from SQL.

But if you cant do that then you will have to loop through every row and separate the values in your datatable before you bind your data to the gridview.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM