DataGrid Display
-
Hi, I have a column in my DataGrid which represents a foreign key. At the moment, it displays the ID for that key. I want it to display another column instead.. For example: User Table has (ID, Title, Firstname, Lastname) Title Table has (ID, Mr, Mrs) I want the data grid to show "title" as "Mr" or "Mrs" instead of "01" or "02", Please help, Thanks!
-
Hi, I have a column in my DataGrid which represents a foreign key. At the moment, it displays the ID for that key. I want it to display another column instead.. For example: User Table has (ID, Title, Firstname, Lastname) Title Table has (ID, Mr, Mrs) I want the data grid to show "title" as "Mr" or "Mrs" instead of "01" or "02", Please help, Thanks!
-
Try this...... go to Datagrid property builder.. select the Bound column for ID and set its Text Field as Mr or Ms but DataField as ID should work
Sanjeev
Sorry I should have been clearer... The Title Table is expandable. So "Ms" and "Miss" and say "Master" can be added at a later date. This means the Column will be able to display the "title" dynamicly by querying the Title Table. Otherwise, the senario would be that I would just be able to input "Mr" and "Mrs" as regular strings. My issue is how exactly to query the table. I know I have to use an SQL View, but my efforts have been in vain :(
-
Hi, I have a column in my DataGrid which represents a foreign key. At the moment, it displays the ID for that key. I want it to display another column instead.. For example: User Table has (ID, Title, Firstname, Lastname) Title Table has (ID, Mr, Mrs) I want the data grid to show "title" as "Mr" or "Mrs" instead of "01" or "02", Please help, Thanks!
put your code in The ItemDataBound Event of the Datagrid. :) Thanks & regards, Suresh Dayma
Everything Is Possible!