![]() |
sort dataview by column index
is it possible to sort a dataview by a column index?
Instead of this: dv.Sort = "Id"; I'd like to do this: dv.Sort = 0; // where 0 is column index /M |
RE: sort dataview by column index
Hi wapsiii,
Dataview sort Expression is similar to sql query sort (without ORDER BY). It takes column name (or names). If you really want to use column index, I suggest you use following way: dv.Sort = dv.Table.Columns[col_index].ColumnName; HTH Elton Wang "wapsiii" wrote: > is it possible to sort a dataview by a column index? > > Instead of this: > dv.Sort = "Id"; > > I'd like to do this: > dv.Sort = 0; // where 0 is column index > > /M > |
| All times are GMT. The time now is 07:52 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.