中的DataGridView与原键

中的DataGridView与原键

本文介绍了C#中的DataGridView与原键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个表ItemGroup,其中GroupGroup和GroupName,而Items具有
itemId和ItemName以及ItemGroup以及更多列,我在组表中设置了groupId主键,在项目表中设置了原键,
但是我从程序表中选择了datagridview,但我以编程方式将其称为组ID列而不是组名!
我如何更改该列以从forigen键调用组名称列?
我使用数据集来处理sql server

i have tow tables ItemGroup wich have the GroupId and GroupName , and Items that have
itemId and ItemName and ItemGroup and more columns , i made groupId primary key in group table and forigen key in item table ,
but i made datagridview select from item table whwn i call it programmaticlly it have the group id column not group name !
how can i change that column to call the group name column from the forigen key ?
I use Data Set To deal with the sql server

推荐答案


这篇关于C#中的DataGridView与原键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 11:50