Archana,
The datatable's defaultview is what get's sorted, which is happening. That
is why it appears sorted in the grid: the grid displays the defaultview.
Kerry Moorman
"Archana" wrote:
> Hi all,
>
> I am having table containing 2 columns and 3 rows.
>
> Col1 contains interger valye. I have records with record1 having 2 in
> col1, record2 having 5 in col1 and record3 having again 2 in col1.
>
> I am trying to sort this datatable. So what i did is
> table.defaultview.sort = 'col1 as'. here i am expecting sorted rows as
> 2,2,5 which is not happening. But when i bind this datatable to
> datagrid on gird sorted table is getting displayed. I am not getting
> why table is not sorting but in datagrid showing sorted table.
>
> Please help me in sorting table.
>
> thanks in advance.
>
>
|