I am working on AxMSFlexGridLib as a Girdview, also I have taken a combobox in my application. Now I want to put the data into AxMSFlexGridLib where Id=Combox.
but problem is that I want to set the data where row is focused in AxMSFlexGridLib.
and i did code as:
private void workercombo_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
if (!this.check)
{
this.check = true;
}
else
{
this.combo1.SelectedIndex = this.workercombo.SelectedIndex;
this.lblname2.Text = this.combo1.Text;
this.combo2.SelectedIndex = this.workercombo.SelectedIndex;
for (int i = 1; i
for (int j = 1; j < this.flex1.Cols; j++)
{
if ((this.flex1.get_TextMatrix(i, 5).Length == 0) && ((this.flex1.get_TextMatrix(i, 4).Length > 0) || (this.flex1.get_TextMatrix(i, 8).Length > 0)))
{
this.flex1.set_TextMatrix(i, 5, Convert.ToString(this.workercombo.Text));
this.flex1.set_TextMatrix(i, 6, this.lblname2.Text);
this.flex1.set_TextMatrix(i, 7, Convert.ToString(this.combo2.Text));
return;
}
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message,"Error!");
}
}
but this is working in a series one by one from top to bottom while my requirement is to set the data on focused row. or selected row.
any person help..

Suthish NairRank #92 · 22.8K reputationPosted May 14, 2011, 8:29 AM EDT
Sam HobbsRank #108 · 20.5K reputationPosted May 14, 2011, 3:31 PM EDT
People here are more likely to be familiar with the DataGridView control than the AxMsFlexGrid control.
The easiest solution is to bind the data to the DataGridView and then you can simply set the BindingSource.Filter Property in workercombo_SelectedIndexChanged and then it is done for you. I don't know if you can do that using the AxMsFlexGrid control but probably not.
Kanhialal kkRank #8,477 · 221 reputationPosted May 14, 2011, 11:16 PM EDT
Thanks.. sir
But I have need of multiple values.
I am attaching snaps regarding my requirement.
so kindly keep an eye on my requirement and guide me..
thanks
Suthish NairRank #92 · 22.8K reputationPosted May 15, 2011, 12:31 AM EDT
Refer above msdn reference.
Kanhialal kkRank #8,477 · 221 reputationPosted May 23, 2011, 3:27 AM EDT
sir still i can not solve my problem as mentioned above please help me..