I want to sort the Data Table according to specific query and returns the Original Data Table with sorted form.
Here is code i written but returns new data Table.
m_dtCacheSource.DefaultView.Sort = "Size(KB) DESC";
m_dtCacheSource = m_dtCacheSource.DefaultView.ToTable();
any idea how this proble will be solved ?
Regards
Rohidas
Jignesh TrivediPosted Sep 24, 2013, 1:52 AM
hi,
try
var newView = m_dtCacheSource.DefaultView;
newView.Sort = "Size(KB) DESC";
m_dtCacheSource = newView.ToTable();
hiope this will help you.