TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
try abc
1.4k
306
488.2k
Problem In DATAGRIDVIEWComboBox : datagridviewcomboboxcell value is not valid.
Jan 30 2008 6:37 AM
Hello, all.. I am using one DatagirdviewcomboBox... and Adding data Programatically..
but it give me this error."datagridviewcomboboxcell value is not valid. "..
My code is here.. plz help..
there are two column in grid and the second column type is Comboboxcell.
dgv.Rows.Add(3);
dgv.Rows[0].Cells[0].Value = "Default";
dgv.Rows[1].Cells[0].Value = "Allow ";
dgv.Rows[2].Cells[0].Value = "Show ";
DataGridViewComboBoxCell cmbDefault= new DataGridViewComboBoxCell();
cmb.Items.AddRange(new object[] { "Weighted" , "Last", "Standard" });
dgv.Rows[0].Cells[1] = cmb;
DataGridViewComboBoxCell cmbAllow = new DataGridViewComboBoxCell();
cmbAllow.AddRange(new object[] { "Yes", "No", "Warning" });
dgvRows[1].Cells[1] = cmbAllow;
DataGridViewComboBoxCell cmbShow= new DataGridViewComboBoxCell();
cmbShow.Items.AddRange(new object[] { "Yes", "No" });
dgv.Rows[2].Cells[1] = cmbShow;
// assigning value
for (int i = 0; i < dtInventory_Setting.Rows.Count; i++)
{
dgv.Rows[i].Cells[1].Value ="ABC";
}
Reply
Answers (
0
)
help - out of bound error
String to Byte