473,799 Members | 3,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Flaky results when loading win form tab control

Hi,

I am loading a tab control on a form.

The code loads textboxes and comboboxes and checkboxes, normal
data entry form that loads a table row of data.

I have a combo on the form above the tab control that filters the form
for me.

But I am finding that it is hit or miss whether the comboboxes
have the selected item set from the underlying table when filtering

Sometimes it works sometimes they are set at the first item in the list.

Textboxes seem fine.

If the tabpage is not visible would this cuase this???

Any ideas??

rotsey
Jun 23 '07 #1
7 1706
re: Sometimes it works sometimes they are set at the first item in the list.

Most probably it's bad logic. Can you post code demonstrating problem?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:uZ******** ******@TK2MSFTN GP06.phx.gbl...
Hi,

I am loading a tab control on a form.

The code loads textboxes and comboboxes and checkboxes, normal
data entry form that loads a table row of data.

I have a combo on the form above the tab control that filters the form
for me.

But I am finding that it is hit or miss whether the comboboxes
have the selected item set from the underlying table when filtering

Sometimes it works sometimes they are set at the first item in the list.

Textboxes seem fine.

If the tabpage is not visible would this cuase this???

Any ideas??

rotsey


Jun 23 '07 #2
The problem seems to be that the tabs that aren't visible aren't
selecting the combo items, because when I click on a tab and then
reselect the filter the combos are fine.???

How much code would you like to see?
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
re: Sometimes it works sometimes they are set at the first item in the
list.

Most probably it's bad logic. Can you post code demonstrating problem?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:uZ******** ******@TK2MSFTN GP06.phx.gbl...
>Hi,

I am loading a tab control on a form.

The code loads textboxes and comboboxes and checkboxes, normal
data entry form that loads a table row of data.

I have a combo on the form above the tab control that filters the form
for me.

But I am finding that it is hit or miss whether the comboboxes
have the selected item set from the underlying table when filtering

Sometimes it works sometimes they are set at the first item in the list.

Textboxes seem fine.

If the tabpage is not visible would this cuase this???

Any ideas??

rotsey



Jun 23 '07 #3
Demonstrating the problem. Bare bones.
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:ua******** ******@TK2MSFTN GP06.phx.gbl...
The problem seems to be that the tabs that aren't visible aren't
selecting the combo items, because when I click on a tab and then
reselect the filter the combos are fine.???

How much code would you like to see?
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>re: Sometimes it works sometimes they are set at the first item in the
list.

Most probably it's bad logic. Can you post code demonstrating problem?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:uZ******* *******@TK2MSFT NGP06.phx.gbl.. .
>>Hi,

I am loading a tab control on a form.

The code loads textboxes and comboboxes and checkboxes, normal
data entry form that loads a table row of data.

I have a combo on the form above the tab control that filters the form
for me.

But I am finding that it is hit or miss whether the comboboxes
have the selected item set from the underlying table when filtering

Sometimes it works sometimes they are set at the first item in the list.

Textboxes seem fine.

If the tabpage is not visible would this cuase this???

Any ideas??

rotsey




Jun 23 '07 #4
Alex

i have discovered a problem with it.
When I intiialise the combo with a datatable the datatable
has 20 rows in it. The form displays fine as in I see the items
in the combo but when it goes to set the item in the combo
the number of items in the collection is zero. Weird

If this code helps here is 2 methods. First one is
the creation of the combo and the other a method to
set the selected item.

private void CreateComboBox( ControlDef ctl, Control.Control Collection
controls)

{

TBRComboBox cmb = new TBRComboBox();

string classname;

ILookUpObject obj;

DataSet ds;

cmb.Name = ctl.FieldName;

cmb.Top = ctl.Top;

cmb.Left = ctl.Left;

cmb.Width = ctl.Width;

if (ctl.LookUpSql != "NIL")

{

if(ctl.LookUpSq l.StartsWith("S elect",StringCo mparison.Curren tCultureIgnoreC ase))

{

classname = "TBR.NET." + ExtractText.Get ClassName(ctl.L ookUpSql);

obj = (ILookUpObject) Activator.Creat eInstance(Type. GetType(classna me));
if (obj == null)

throw new ApplicationExce ption("Cannot create object for type " +
classname);

ds = obj.GetLookupDa ta(ExtractText. ParseSQL(ctl.Lo okUpSql));

if (ctl.FieldName == "PayFrequen cy")

Console.WriteLi ne("");
switch (ctl.ColumnCoun t)

{

case 2:

cmb.DisplayMemb er = "Descriptio n";

cmb.ValueMember = "ID";

cmb.DataSource = ds.Tables[0];

break;

case 1:

foreach (DataRow dr in ds.Tables[0].Rows)

{

cmb.Items.Add(d r[0]);

}

break;

default:

break;

}
if (ctl.IsRowLooku p == true)

{

cmb.ForeColor = TBRSettings.Ins tance.Settings. FilterFieldFore Color;

cmb.BackColor = TBRSettings.Ins tance.Settings. FilterFieldBgCo lor;

cmb.SelectedInd exChanged += delegate(Object s, EventArgs e)

{

LoadData((int)c mb.SelectedValu e);

};

}

}

else

{

string[] words;

List<ComboIteml ist = new List<ComboItem> ();

words = ctl.LookUpSql.S plit(';');

cmb.Items.Clear ();

if (ctl.ColumnCoun t == 1)

{

foreach (string word in words)

{

cmb.Items.Add(w ord.Replace("\" ", ""));

}

}

else if(ctl.ColumnCo unt == 2)

{

for (int i = 0; i <words.Length ; i += 2)

{

list.Add(new ComboItem(Conve rt.ToInt32(word s[i]), words[i+1].Replace("\"",
"")));

}

cmb.DisplayMemb er = "Descriptio n";

cmb.ValueMember = "ID";

cmb.DataSource = list;

}

}

}

cmb.SelectedInd ex = -1;

controls.Add(cm b);

}

public void FindByValue(str ing value, string columnname)

{

int aIndex;

DataRowView drv;

ComboDebug.Inst ance.list.Add(t his.Name + " ---- NumItems: " +
this.Items.Coun t);

for (aIndex = 0; aIndex < this.Items.Coun t; aIndex += 1)

{

try

{

drv = (DataRowView)th is.Items[aIndex];

if (drv.Row[columnname].ToString() == value)

{

ComboDebug.Inst ance.list.Add(t his.Name + " ---- " + columnname + " ----- " +
value);

this.SelectedIn dex = aIndex;

return;

}

}

catch (Exception)

{

if(this.Items[aIndex].ToString() == value)

{

ComboDebug.Inst ance.list.Add(t his.Name + " ---- " + columnname + " ----- " +
value);

this.SelectedIn dex = aIndex;

return;

}

}

}

this.SelectedIn dex = -1;

return;

}
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:eS******** ******@TK2MSFTN GP03.phx.gbl...
Demonstrating the problem. Bare bones.
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:ua******** ******@TK2MSFTN GP06.phx.gbl...
>The problem seems to be that the tabs that aren't visible aren't
selecting the combo items, because when I click on a tab and then
reselect the filter the combos are fine.???

How much code would you like to see?
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2******* *********@TK2MS FTNGP03.phx.gbl ...
>>re: Sometimes it works sometimes they are set at the first item in the
list.

Most probably it's bad logic. Can you post code demonstrating problem?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:uZ****** ********@TK2MSF TNGP06.phx.gbl. ..
Hi,

I am loading a tab control on a form.

The code loads textboxes and comboboxes and checkboxes, normal
data entry form that loads a table row of data.

I have a combo on the form above the tab control that filters the form
for me.

But I am finding that it is hit or miss whether the comboboxes
have the selected item set from the underlying table when filtering

Sometimes it works sometimes they are set at the first item in the
list.

Textboxes seem fine.

If the tabpage is not visible would this cuase this???

Any ideas??

rotsey




Jun 23 '07 #5
Do you dispose your lists between Create and Find?

Can you step through and see when collection disappears?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:OB******** ******@TK2MSFTN GP06.phx.gbl...
Alex

i have discovered a problem with it.
When I intiialise the combo with a datatable the datatable
has 20 rows in it. The form displays fine as in I see the items
in the combo but when it goes to set the item in the combo
the number of items in the collection is zero. Weird

If this code helps here is 2 methods. First one is
the creation of the combo and the other a method to
set the selected item.

private void CreateComboBox( ControlDef ctl, Control.Control Collection
controls)

{

TBRComboBox cmb = new TBRComboBox();

string classname;

ILookUpObject obj;

DataSet ds;

cmb.Name = ctl.FieldName;

cmb.Top = ctl.Top;

cmb.Left = ctl.Left;

cmb.Width = ctl.Width;

if (ctl.LookUpSql != "NIL")

{

if(ctl.LookUpSq l.StartsWith("S elect",StringCo mparison.Curren tCultureIgnoreC ase))

{

classname = "TBR.NET." + ExtractText.Get ClassName(ctl.L ookUpSql);

obj = (ILookUpObject) Activator.Creat eInstance(Type. GetType(classna me));
if (obj == null)

throw new ApplicationExce ption("Cannot create object for type " +
classname);

ds = obj.GetLookupDa ta(ExtractText. ParseSQL(ctl.Lo okUpSql));

if (ctl.FieldName == "PayFrequen cy")

Console.WriteLi ne("");
switch (ctl.ColumnCoun t)

{

case 2:

cmb.DisplayMemb er = "Descriptio n";

cmb.ValueMember = "ID";

cmb.DataSource = ds.Tables[0];

break;

case 1:

foreach (DataRow dr in ds.Tables[0].Rows)

{

cmb.Items.Add(d r[0]);

}

break;

default:

break;

}
if (ctl.IsRowLooku p == true)

{

cmb.ForeColor = TBRSettings.Ins tance.Settings. FilterFieldFore Color;

cmb.BackColor = TBRSettings.Ins tance.Settings. FilterFieldBgCo lor;

cmb.SelectedInd exChanged += delegate(Object s, EventArgs e)

{

LoadData((int)c mb.SelectedValu e);

};

}

}

else

{

string[] words;

List<ComboIteml ist = new List<ComboItem> ();

words = ctl.LookUpSql.S plit(';');

cmb.Items.Clear ();

if (ctl.ColumnCoun t == 1)

{

foreach (string word in words)

{

cmb.Items.Add(w ord.Replace("\" ", ""));

}

}

else if(ctl.ColumnCo unt == 2)

{

for (int i = 0; i <words.Length ; i += 2)

{

list.Add(new ComboItem(Conve rt.ToInt32(word s[i]), words[i+1].Replace("\"",
"")));

}

cmb.DisplayMemb er = "Descriptio n";

cmb.ValueMember = "ID";

cmb.DataSource = list;

}

}

}

cmb.SelectedInd ex = -1;

controls.Add(cm b);

}

public void FindByValue(str ing value, string columnname)

{

int aIndex;

DataRowView drv;

ComboDebug.Inst ance.list.Add(t his.Name + " ---- NumItems: " +
this.Items.Coun t);

for (aIndex = 0; aIndex < this.Items.Coun t; aIndex += 1)

{

try

{

drv = (DataRowView)th is.Items[aIndex];

if (drv.Row[columnname].ToString() == value)

{

ComboDebug.Inst ance.list.Add(t his.Name + " ---- " + columnname + " ----- "
+ value);

this.SelectedIn dex = aIndex;

return;

}

}

catch (Exception)

{

if(this.Items[aIndex].ToString() == value)

{

ComboDebug.Inst ance.list.Add(t his.Name + " ---- " + columnname + " ----- "
+ value);

this.SelectedIn dex = aIndex;

return;

}

}

}

this.SelectedIn dex = -1;

return;

}
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:eS******** ******@TK2MSFTN GP03.phx.gbl...
>Demonstratin g the problem. Bare bones.
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:ua******* *******@TK2MSFT NGP06.phx.gbl.. .
>>The problem seems to be that the tabs that aren't visible aren't
selecting the combo items, because when I click on a tab and then
reselect the filter the combos are fine.???

How much code would you like to see?
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2****** **********@TK2M SFTNGP03.phx.gb l...
re: Sometimes it works sometimes they are set at the first item in the
list.

Most probably it's bad logic. Can you post code demonstrating problem?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:uZ***** *********@TK2MS FTNGP06.phx.gbl ...
Hi,
>
I am loading a tab control on a form.
>
The code loads textboxes and comboboxes and checkboxes, normal
data entry form that loads a table row of data.
>
I have a combo on the form above the tab control that filters the form
for me.
>
But I am finding that it is hit or miss whether the comboboxes
have the selected item set from the underlying table when filtering
>
Sometimes it works sometimes they are set at the first item in the
list.
>
Textboxes seem fine.
>
If the tabpage is not visible would this cuase this???
>
Any ideas??
>
rotsey
>
>




Jun 23 '07 #6
Alex,

The list shows 0 items after I assign the datatable to the datasource
property.

rotsey

"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Do you dispose your lists between Create and Find?

Can you step through and see when collection disappears?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:OB******** ******@TK2MSFTN GP06.phx.gbl...
>Alex

i have discovered a problem with it.
When I intiialise the combo with a datatable the datatable
has 20 rows in it. The form displays fine as in I see the items
in the combo but when it goes to set the item in the combo
the number of items in the collection is zero. Weird

If this code helps here is 2 methods. First one is
the creation of the combo and the other a method to
set the selected item.

private void CreateComboBox( ControlDef ctl, Control.Control Collection
controls)

{

TBRComboBox cmb = new TBRComboBox();

string classname;

ILookUpObjec t obj;

DataSet ds;

cmb.Name = ctl.FieldName;

cmb.Top = ctl.Top;

cmb.Left = ctl.Left;

cmb.Width = ctl.Width;

if (ctl.LookUpSql != "NIL")

{

if(ctl.LookUpS ql.StartsWith(" Select",StringC omparison.Curre ntCultureIgnore Case))

{

classname = "TBR.NET." + ExtractText.Get ClassName(ctl.L ookUpSql);

obj = (ILookUpObject) Activator.Creat eInstance(Type. GetType(classna me));
if (obj == null)

throw new ApplicationExce ption("Cannot create object for type " +
classname);

ds = obj.GetLookupDa ta(ExtractText. ParseSQL(ctl.Lo okUpSql));

if (ctl.FieldName == "PayFrequen cy")

Console.WriteL ine("");
switch (ctl.ColumnCoun t)

{

case 2:

cmb.DisplayMem ber = "Descriptio n";

cmb.ValueMembe r = "ID";

cmb.DataSour ce = ds.Tables[0];

break;

case 1:

foreach (DataRow dr in ds.Tables[0].Rows)

{

cmb.Items.Add( dr[0]);

}

break;

default:

break;

}
if (ctl.IsRowLooku p == true)

{

cmb.ForeColo r = TBRSettings.Ins tance.Settings. FilterFieldFore Color;

cmb.BackColo r = TBRSettings.Ins tance.Settings. FilterFieldBgCo lor;

cmb.SelectedIn dexChanged += delegate(Object s, EventArgs e)

{

LoadData((int) cmb.SelectedVal ue);

};

}

}

else

{

string[] words;

List<ComboItem list = new List<ComboItem> ();

words = ctl.LookUpSql.S plit(';');

cmb.Items.Clea r();

if (ctl.ColumnCoun t == 1)

{

foreach (string word in words)

{

cmb.Items.Add( word.Replace("\ "", ""));

}

}

else if(ctl.ColumnCo unt == 2)

{

for (int i = 0; i <words.Length ; i += 2)

{

list.Add(new ComboItem(Conve rt.ToInt32(word s[i]),
words[i+1].Replace("\"", "")));

}

cmb.DisplayMem ber = "Descriptio n";

cmb.ValueMembe r = "ID";

cmb.DataSour ce = list;

}

}

}

cmb.SelectedIn dex = -1;

controls.Add(c mb);

}

public void FindByValue(str ing value, string columnname)

{

int aIndex;

DataRowView drv;

ComboDebug.Ins tance.list.Add( this.Name + " ---- NumItems: " +
this.Items.Cou nt);

for (aIndex = 0; aIndex < this.Items.Coun t; aIndex += 1)

{

try

{

drv = (DataRowView)th is.Items[aIndex];

if (drv.Row[columnname].ToString() == value)

{

ComboDebug.Ins tance.list.Add( this.Name + " ---- " + columnname + " -----
" + value);

this.SelectedI ndex = aIndex;

return;

}

}

catch (Exception)

{

if(this.Item s[aIndex].ToString() == value)

{

ComboDebug.Ins tance.list.Add( this.Name + " ---- " + columnname + " -----
" + value);

this.SelectedI ndex = aIndex;

return;

}

}

}

this.SelectedI ndex = -1;

return;

}
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:eS******* *******@TK2MSFT NGP03.phx.gbl.. .
>>Demonstrati ng the problem. Bare bones.
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:ua****** ********@TK2MSF TNGP06.phx.gbl. ..
The problem seems to be that the tabs that aren't visible aren't
selecting the combo items, because when I click on a tab and then
reselect the filter the combos are fine.???

How much code would you like to see?
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2***** ***********@TK2 MSFTNGP03.phx.g bl...
re: Sometimes it works sometimes they are set at the first item in the
list.
>
Most probably it's bad logic. Can you post code demonstrating problem?
>
>
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:uZ**** **********@TK2M SFTNGP06.phx.gb l...
>Hi,
>>
>I am loading a tab control on a form.
>>
>The code loads textboxes and comboboxes and checkboxes, normal
>data entry form that loads a table row of data.
>>
>I have a combo on the form above the tab control that filters the
>form
>for me.
>>
>But I am finding that it is hit or miss whether the comboboxes
>have the selected item set from the underlying table when filtering
>>
>Sometime s it works sometimes they are set at the first item in the
>list.
>>
>Textboxe s seem fine.
>>
>If the tabpage is not visible would this cuase this???
>>
>Any ideas??
>>
>rotsey
>>
>>
>
>




Jun 25 '07 #7
When the DataSource property for combo box is set, the items collection
cannot be modified

Is your table having any data? Are you changing item list after setting
Datasource? If yes, you will need to remove it.
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:OB******** ******@TK2MSFTN GP03.phx.gbl...
Alex,

The list shows 0 items after I assign the datatable to the datasource
property.

rotsey

"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>Do you dispose your lists between Create and Find?

Can you step through and see when collection disappears?
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:OB******* *******@TK2MSFT NGP06.phx.gbl.. .
>>Alex

i have discovered a problem with it.
When I intiialise the combo with a datatable the datatable
has 20 rows in it. The form displays fine as in I see the items
in the combo but when it goes to set the item in the combo
the number of items in the collection is zero. Weird

If this code helps here is 2 methods. First one is
the creation of the combo and the other a method to
set the selected item.

private void CreateComboBox( ControlDef ctl, Control.Control Collection
controls)

{

TBRComboBox cmb = new TBRComboBox();

string classname;

ILookUpObje ct obj;

DataSet ds;

cmb.Name = ctl.FieldName;

cmb.Top = ctl.Top;

cmb.Left = ctl.Left;

cmb.Width = ctl.Width;

if (ctl.LookUpSql != "NIL")

{

if(ctl.LookUp Sql.StartsWith( "Select",String Comparison.Curr entCultureIgnor eCase))

{

classname = "TBR.NET." + ExtractText.Get ClassName(ctl.L ookUpSql);

obj = (ILookUpObject) Activator.Creat eInstance(Type. GetType(classna me));
if (obj == null)

throw new ApplicationExce ption("Cannot create object for type " +
classname);

ds = obj.GetLookupDa ta(ExtractText. ParseSQL(ctl.Lo okUpSql));

if (ctl.FieldName == "PayFrequen cy")

Console.Write Line("");
switch (ctl.ColumnCoun t)

{

case 2:

cmb.DisplayMe mber = "Descriptio n";

cmb.ValueMemb er = "ID";

cmb.DataSourc e = ds.Tables[0];

break;

case 1:

foreach (DataRow dr in ds.Tables[0].Rows)

{

cmb.Items.Add (dr[0]);

}

break;

default:

break;

}
if (ctl.IsRowLooku p == true)

{

cmb.ForeCol or = TBRSettings.Ins tance.Settings. FilterFieldFore Color;

cmb.BackCol or = TBRSettings.Ins tance.Settings. FilterFieldBgCo lor;

cmb.SelectedI ndexChanged += delegate(Object s, EventArgs e)

{

LoadData((int )cmb.SelectedVa lue);

};

}

}

else

{

string[] words;

List<ComboIte mlist = new List<ComboItem> ();

words = ctl.LookUpSql.S plit(';');

cmb.Items.Cle ar();

if (ctl.ColumnCoun t == 1)

{

foreach (string word in words)

{

cmb.Items.Add (word.Replace(" \"", ""));

}

}

else if(ctl.ColumnCo unt == 2)

{

for (int i = 0; i <words.Length ; i += 2)

{

list.Add(ne w ComboItem(Conve rt.ToInt32(word s[i]),
words[i+1].Replace("\"", "")));

}

cmb.DisplayMe mber = "Descriptio n";

cmb.ValueMemb er = "ID";

cmb.DataSourc e = list;

}

}

}

cmb.SelectedI ndex = -1;

controls.Add( cmb);

}

public void FindByValue(str ing value, string columnname)

{

int aIndex;

DataRowView drv;

ComboDebug.In stance.list.Add (this.Name + " ---- NumItems: " +
this.Items.Co unt);

for (aIndex = 0; aIndex < this.Items.Coun t; aIndex += 1)

{

try

{

drv = (DataRowView)th is.Items[aIndex];

if (drv.Row[columnname].ToString() == value)

{

ComboDebug.In stance.list.Add (this.Name + " ---- " + columnname + " -----
" + value);

this.Selected Index = aIndex;

return;

}

}

catch (Exception)

{

if(this.Ite ms[aIndex].ToString() == value)

{

ComboDebug.In stance.list.Add (this.Name + " ---- " + columnname + " -----
" + value);

this.Selected Index = aIndex;

return;

}

}

}

this.Selected Index = -1;

return;

}
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:eS****** ********@TK2MSF TNGP03.phx.gbl. ..
Demonstratin g the problem. Bare bones.
"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
news:ua***** *********@TK2MS FTNGP06.phx.gbl ...
The problem seems to be that the tabs that aren't visible aren't
selecting the combo items, because when I click on a tab and then
reselect the filter the combos are fine.???
>
How much code would you like to see?
>
>
"AlexS" <sa***********@ SPAMrogers.comP LEASEwrote in message
news:%2**** ************@TK 2MSFTNGP03.phx. gbl...
>re: Sometimes it works sometimes they are set at the first item in
>the list.
>>
>Most probably it's bad logic. Can you post code demonstrating
>problem?
>>
>>
>"Rotsey" <ma***********@ RemoveThis.optu snet.com.auwrot e in message
>news:uZ*** ***********@TK2 MSFTNGP06.phx.g bl...
>>Hi,
>>>
>>I am loading a tab control on a form.
>>>
>>The code loads textboxes and comboboxes and checkboxes, normal
>>data entry form that loads a table row of data.
>>>
>>I have a combo on the form above the tab control that filters the
>>form
>>for me.
>>>
>>But I am finding that it is hit or miss whether the comboboxes
>>have the selected item set from the underlying table when filtering
>>>
>>Sometim es it works sometimes they are set at the first item in the
>>list.
>>>
>>Textbox es seem fine.
>>>
>>If the tabpage is not visible would this cuase this???
>>>
>>Any ideas??
>>>
>>rotsey
>>>
>>>
>>
>>
>
>




Jun 25 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3185
by: Cro | last post by:
Dear Access Developers, The 'Allow Additions' property of my form is causing unexpected results. I am developing a form that has its 'Default View' property set to 'Continuous Forms' and am displaying records that match an SQL statement entered in the 'Record Source' property of the form. The form behaves correctly and displays the records as expected. The
9
1499
by: MLH | last post by:
open form in design view then allow it to be opened into form view from code. then set its visible propery to false then open into design view from code then set its visible propery to false then open into design view from code then set its visible propery to false then open into design view from code
2
3012
by: Aaron Queenan | last post by:
Is there any way to know whether the OnItemCheck is being called in response to a user action (mouse or keyboard) as opposed to the form loading? I have a class which derives from System.Windows.Forms.ListView. Among other features, it enables the checkboxes and overrides the OnItemCheck() method. I have placed this ListView on a form and use form.ShowDialog() to display it whenever the user presses a certain button. If the user...
0
1482
by: Kitchen Bin | last post by:
HELP PLEASE!! The C# Visual Studio IDE is failing to load an inherited form into the IDE from a base form when I add items to an array property of a user control on the base form. That sounds confusing but let me explain: I have a UserControl, let's call it "ButtonArrayControl", and also a separate class for holding various properties: public class MyButtonProperties
6
1090
by: Shock | last post by:
Hello all, I made a post yesterday about the flakiness of asp.net datagrids. I was under the impression that this problem was only in regard to datagrids. Apparently our problems are with any aspx page. At random these pages do not want to load, but this only happens once the projects have been deployed, it doesn't happen on development machines. Pages will come up blank and the source will appear cut off and at times pages will...
1
2309
by: José Joye | last post by:
Hello, I'm playing around with dynamically loading user controls ...and having problems I created a really simple userControl (in fact contains a plain text box) and placed it into the MyTestCtrl2.ascx file. In an aspx file I placed the following in the Page_Load method:
0
1318
by: Joe | last post by:
I've a web form that inherits from a BasePage. There is a user control on the web form. Does anyone thinks it's a problem if I've my BasePage loading a user control and my web form loading a different user control. I'm more worry on the sequence as which user control gets loaded first. The user control I've on the web form depends on the user control on the BasePage to load first. Most of the time, it seems everything is ok (BasePage...
3
3531
by: Per Dunberg | last post by:
Hi all, I have to develop a "skinned" application and I have a problem with the graphics. When a form is loaded and displayed there's aways a flicker where all the controls are located on the form. It seems like the controls erase the background and this cause a flicker everytime a form i loaded. When I hide and show forms that are already loaded there's no flicker, it's just when the form is loaded the first time.
10
10055
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to believe that this has to do with unreleased form component events or event handlers. I'm comparatively new to .net and windows forms, in the sense that though I've been using them for over 2 years now, it's been rather sporadic. I work with...
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10491
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10247
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7571
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.