I am attempting to add items to a combo box, but when I dothey
become blank lines. If I debug and look at the value being used it
appears to be correct.
Code is as follows:
if (ItemsTypeCombo !=null)
{
// Get list of Items from DB.
DataClass dc = new
DataClass(); dc.TableName = "Items";
dc.ReturnAll();
short row = 0;
foreach (DataRow drItem in dc.TableData.Rows)
{
string ItemName = drItem["Name"].ToString();
ItemTypeCombo.InsertItem(row , ItemName);
row++ ;
}
ItemTypeCombo.Height = 50;
}
When debugging when I look at the ItemName string before it isused to add an item to the combo box it is correct. The items areletters only, no special characters of any kind.SolidworksApi macros







become blank lines. If I debug and look at the value being used it
appears to be correct.
Code is as follows:
if (ItemsTypeCombo !=null)
{
// Get list of Items from DB.
DataClass dc = new
DataClass(); dc.TableName = "Items";
dc.ReturnAll();
short row = 0;
foreach (DataRow drItem in dc.TableData.Rows)
{
string ItemName = drItem["Name"].ToString();
ItemTypeCombo.InsertItem(row , ItemName);
row++ ;
}
ItemTypeCombo.Height = 50;
}
When debugging when I look at the ItemName string before it isused to add an item to the combo box it is correct. The items areletters only, no special characters of any kind.SolidworksApi macros