Hi,
I am using Infragistics version 2007 Volume 1 CLR 2.0.
In my project I have bound all the Ultra Combo controls with data table columns. When ever I change the Ultra Combo value this should affect the Data column and vice versa.
My problem is: When I assign a value in the data table that is reflecting in the appropriate Ultra Combo. This combo has 4 columns (in its grid) and whenever the value is changed in the combo it should show the column 2 value from its grid to another text box.
But the selected row is becoming null when I change the value in the data table. The code is below:
void uc_ValueChanged(System::Object sender, System::EventArgs e)
{
UltraGridRow row = ThisDD.SelectedRow;
if(row == nullptr)return;ThisTXT.Text = row.Cells[1].Value.ToString();
}
"row" is becoming null in the above code.
Any suggestions appreciated.
Thanks,
Dhanasekaran G
Hi Dhanasekaran,
Rather than manually maintaining the value of your text editor, you can set up a one-way binding and the UltraTextEditor's value will be automatically updated to match the combo. The code for doing so looks like this:
ultraTextEditor1.DataBindings.Add("Text", ultraCombo1, "Value", false, DataSourceUpdateMode.Never);
I tested out some code to change the value of the data to which the combo is bound. In my test, SelectedRow became null only when changing the value of the column associated with the UltraCombo's ValueMember. However, this is expected as UltraCombo uses that column to identify rows, and it will lose track of the selected row if the data in that identifying column is changed.
Does this describe the behavior you are seeing? If not, can you please provide a sample that I can use to investigate the issue further?