Can any one help me in C1TrueDBGrid? I want to add a dropdown column in my C1TrueDBGrid which has different values for each row and on index change it changes value another cell of the row

Thanks in advance

Write this code when you load your c1truedbgrid

dataSet1.Tables[0].Columns.Add("DropDown_Column_name");// adds an empty column in dataset
  C1TDBGrid1.Columns["DropDown_Column_name"].Editor = comboBox1;//
  C1TDBGrid1.Columns["DropDown_Column_name"].ValueItems.Translate = true;
  C1TDBGrid1.Splits[0].DisplayColumns["DropDown_Column_name"].DropDownList = true;
  C1TDBGrid1.Splits[0].DisplayColumns["DropDown_Column_name"].Locked = false;
  C1TDBGrid1.Splits[0].DisplayColumns["DropDown_Column_name"].FetchStyle = true;
  for (int o = 0; o < C1TDBGrid1.RowCount; o++)
          C1TDBGrid1.Columns["DropDown_Column_name"].Text = "Select";

then on comboBox1Selectionchange event write this code

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
            if (comboBox1.SelectedText.Contains("Select"))
                MessageBox.Show("Nothing is selected");
            { //Proceed with your code
                C1TDBGrid1.Columns["Column_to_change_on_click"].Value = "Changed Value";
             //Proceed with your code   }
good post

The reason to load values on mouse click is to update it with every row

void comboBox1_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
          //  Query to values in comboBox1


Thanks abelLazm :) You are really great help for me always :D Thanks again

This question has already been answered. Start a new discussion instead.