访问数据框内部的组合框的文本属性 [英] Accesseing Text property for combo box which is inside datagridview
本文介绍了访问数据框内部的组合框的文本属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友;
我在表单中使用Datagridview并在该网格中添加了combobox但是当我想从该组合框中访问Text时我无法访问它。它没有显示Text属性。我想选择该文本以进行进一步编码。那么我如何访问该文本?
感谢高级
Hello friends;
I am Taking Datagridview in form and add combobox in that grid but when i want to access Text from that combobox I can not access it. It don''t shows Text property. And I want to Select that Text for further coding. So How I can access that Text ?
Thanks in Advanced
推荐答案
我在< a href =http://stackoverflow.com/questions/13418354/how-to-get-the-text-of-datagridview-combobox-selected-item> StackOverFlow [ ^ ] ..
I found similar solution on StackOverFlow[^]..
string SelectedText = Convert.ToString((DataGridView1.Rows[0].Cells["dgcombocell"] as DataGridViewComboBoxCell).FormattedValue.ToString());
int SelectedVal = Convert.ToInt32(DataGridView1.Rows[0].Cells["dgcombocell"].Value);
这篇关于访问数据框内部的组合框的文本属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文