camdempster
asked on
Why is the selectedtext in the combobox aligned the to the right where every other item is aligned to the left.
Following is a code snippet
cboSystemStatus.DataSource = objRPlayer.GetSystemStatus Descriptio ns(); // <- Datatable prepopulated from stored procedure
cboSystemStatus.ValueMembe r = "systemStatusID".ToString( ).Trim();
cboSystemStatus.DisplayMem ber = "SystemStatusDescription". ToString() .Trim();
//cboSystemStatus.Selected Value = objRPlayer.SystemStatusID;
Now every thing appears perfectly when i drop down my combobox. All Display members appear perfectly. No problem there....
When i select an item in the combobox. The selected displaymember appears to be cut off by the first few characters. As if the trim function is not being preformed correctly and being aligned from the right hand side.
I'm a bit of a newbie with windows forms. Can somebody tell my why only the selected text is out of place?????
Thanks in Advance
cboSystemStatus.DataSource
cboSystemStatus.ValueMembe
cboSystemStatus.DisplayMem
//cboSystemStatus.Selected
Now every thing appears perfectly when i drop down my combobox. All Display members appear perfectly. No problem there....
When i select an item in the combobox. The selected displaymember appears to be cut off by the first few characters. As if the trim function is not being preformed correctly and being aligned from the right hand side.
I'm a bit of a newbie with windows forms. Can somebody tell my why only the selected text is out of place?????
Thanks in Advance
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks dude, worked perfectly. Is there not an easier way of doing it though? I just thought I could trim the column rather than traverse through and trim each cell?