DataTable with Datagridview [Resolved]

Posted by MF-13693 under VB.NET on 2/5/2012 | Points: 10 | Views : 2207 | Status : [Member] | Replies : 2
Hi to all,

I have a datatable with the following Columns fetched from the sql table:

ID                     INT (AutoIncrement)
FullName VARCHAR(200)
MType SMALLINT
RType SMALLINT


I have assigned this datatable to a DataGridView datasource, everything works fine. Currently i have stored integer values in MType and RType which are the ID's linked to Some text values in another table. I want to display those values instead of ID's in my datagrid.

What will be best option to do this : (One of them which i think is add another two columns to this datatable and update this column with the text values after a database lookup from the other table (will this be performance intensive?))

Kindly suggest !!!

Thanks

M@F
Index was outside the bounds !!!



Responses

Posted by: Blessyjees on: 2/5/2012 [Member] Bronze | Points: 50

Up
0
Down

Resolved
Hi,

Write join query to fetch data from these tables and execute this query and store data to a dataset or datatable. Then set this dataset or datatable as a datasource of data grid. If you need more help, let me know.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

MF-13693, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: MF-13693 on: 2/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Blessyjees,

That's the right solution, thanks for helping.
Working perfectly.



M@F
Index was outside the bounds !!!

MF-13693, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response