|
|
|
สอบถามหน่อยค่ะ ว่าหากจะ set selecteditem in DataGridViewComboBoxCell c# ต้องทำยังไงคะ |
|
|
|
|
|
|
|
Code (C#)
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
for (int i = 0; i < dataGridView1.RowCount - 1; i++)
{
switch ((int)dataGridView1[1, i].Value)
{
case 0:
dataGridView1[0, i].Value = "A";
break;
case 1:
dataGridView1[0, i].Value = "B";
break;
default:
dataGridView1[0, i].Value = string.Empty;//"or C"
break;
}
}
}
|
|
|
|
|
Date :
2014-10-21 09:40:19 |
By :
lamaka.tor |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|