Can i Sort existing contents of a DataGrid.

R

RSB

Hi Every one,
Here is one more problem. I have two Tables.
table employee and table lookup_countries

so employee table has the employeeiD, employeeName and CountryCode.
where as lookup_countries have CountryCode and CountryName.

Now i have DataGrid in which i am just populating the DataFrom employee
table. and Binding the CountryCode field to the CountryName while painting
the DataGrid.
that is i am not returning the Country Name from the DataBase..
so this is what i have as the part of DataGrid..

<asp:Label id=CountryLabel runat="server"
Text='<%#GetCountryName(DataBinder.Eval(Container.DataItem,
"countryCode").ToString()) %>'>
</asp:Label>


Now the problem is if i want to SOrt the Data then i am only able to Sort
the data based on the COuntryCode not the CountryName. IS there any way by
which i can sort the DataGrid Data instead of sorting the DataSource...

Thanks
RSB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top