none
How do we get rows in a grid with a particuilar column with distinct values only? RRS feed

  • Question

  •  

    Hi,

    I have a data set with data from some table.(say EMPLOYEE table). ( empID, empName, empSalary)

    I have bound this table to a data grid.

     

    Now i want to see distinct salaries in the Grid only..

    How do i do this?

     

     

    Regards

    Basim

     

    Monday, December 17, 2007 10:39 AM

All replies

  • You would need to bind it to the DataTable that already contains distinct values. DataGrid control does not contain built-in functionality to display only distinct values. This link shows how to get distinct values in a DataTable if you need to do it on client side and cannot do it when you retrieve data from the database

     

    http://support.microsoft.com/kb/325684
    Monday, December 17, 2007 11:08 AM
    Moderator