c#中的gridview中的下拉列表 [英] Drop down list in in gridview in c#

查看:85
本文介绍了c#中的gridview中的下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai,





我有一个gridview.There名称为MetricType。在该列中有< ; edititemtemplate>。它在下拉列表控件中手动添加了少量项目(即)。如果我想更新特定行,则不会在下拉列表中更新.Plz帮助我。



先谢谢

解决方案

试试这个...



< pre lang =c#> DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn();
column.HeaderText = MetricType;
column.Items.Add( 1);
column.Items.Add( 2);
// etc ..
dgrid_surveyList.Columns.Add(column);





dgrid_surveyList是datagridview


Hai,


I am having a gridview.There is a column name "MetricType".In that column there is <edititemtemplate>.It having few items (ie)added manually in the drop down list control.Suppose if i want to update a particular row it is not updating in drop down list.Plz help me.

Thanks in advance

解决方案

try this...

DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn();
                   column.HeaderText = "MetricType";
                   column.Items.Add("1");
                   column.Items.Add("2");
                   //etc..
                   dgrid_surveyList.Columns.Add(column);



dgrid_surveyList is datagridview


这篇关于c#中的gridview中的下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆