当selectitem在组合框中时,显示在datagridview值中 [英] when selecteditem in combobox ,show in datagridview value
问题描述
例如;
$ b $bı将在5周的组合框中选择,并将带我进入datagridview值week5,
$ b $bı将在组合框中选择6周并将带来我在datagridview值week6
以及它在组合框中显示的值将是datagridview中的值。
感谢您的帮助
for example;
ı will select in combobox week of 5 and will bring me in datagridview value week5,
ı will select in combobox week of 6 and will bring me in datagridview value week6
and what it show in combobox value will be value in datagridview to.
thanks for help
推荐答案
Tr use like ..
Tr use like..
private void ComboBox1_SelectedIndexChanged(object sender,System.EventArgs e)
{
string Val=ComboBox1.SelectedValue;
//get datatable corresponding with the Val e.g 5,6 etc and then fill grid here
}
ref。
https://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindexchanged(v=vs .110).aspx [ ^ ]
http://csharpdotnetfreak.blogspot.com/2009/02/ajax-cascading-dropdownlist-database.html [ ^ ]
http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx [ ^ ]
ref.
https://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindexchanged(v=vs.110).aspx[^]
http://csharpdotnetfreak.blogspot.com/2009/02/ajax-cascading-dropdownlist-database.html[^]
http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx[^]
这篇关于当selectitem在组合框中时,显示在datagridview值中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!