shuchi

shuchi

  • NA
  • 10
  • 0

How to customize a datagrid while printing results??

Nov 28 2006 10:38 AM
I have a SQL query which returns 4 columns from the database. I am able to show the result in datagrid using sqldataadapter, dataset. Right now datagrid column name has same name as the database column name.

In DataGrid display I want to combine two columns and display results separating by a charecter.

I am using Visual Web Developer, C#.NET and SQL Server 2000.  I am using web form.

For Ex. Current DataGrid Result

LName      FName            Zip         ID
-------    -------           ------   -----
Mathew      Sam             12345    001
Martha       Frank            54321    002

Desired DataGrid Result  (LName, FName combined..  AND  print ID="Yes" if ID was 001, and print ID="No" if ID was 002)

Name                           Zip             ID
------------------      ---------   ------
Mathew,Sam                12345       Yes
Martha,Frank                54321       No

Please Help. Thank you.