Hi,
You Need to add Another calculated Column in Select Query
like
string queryString = "
select (SELECT p.[Rows] FROM sys.tables t INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id WHERE t.NAME = tblRes.TableA AND i.OBJECT_ID > 255 AND i.index_id <= 1 ) as RowCount, tblRes.* from JoinTable as tblRes "
Then Sort That Data Table By RowCount Column
datatables1.DefaultView.Sort = "RowCount";
Thanks
Siva Rm K