Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with using - dashes in Datagrid

Status
Not open for further replies.

DLLHell

Programmer
May 9, 2003
69
US
This is bizarre. I put a datagrid in a DIV area and have the scrollbar on the right side of the DIV area (because another above DIV area contains Header columns. The move from the scrollbar from the traditional right side to the left side (it is wanted) required me to re-adjust my grid columns by reversing the order of these - basically everything (horizontalwidth, etc) had to change to work in the reverse order. Now the grid functions & scrolls perfect in every respect, Except when dashes are used in labels and textboxes. Apparently the grid is confused when '-' dashes show up.

Fields normally 123-45-6789 show up as 6789-45-123 with Wrap=False.

Fields normally 123-45-6789 show up as
-45-123
6789
with Wrap=True.

When I change the dash in the data to something like X, it shows up as 123X45X6789

I am not seeing the above problems with Currency and Date fields which show up fine. No special formatting for SSN is specified, the dash is inserted in the data in the code-behind.

Is there some Property or Controls in Label, ItemStyle, EditItemTemplate textboxes or the DataGrid itself where I can override this dependency on the Dash special character, I've never heard of it? Or some other way out... Thanks for any Help!
 
Is the data type set as string? The X would automatically set it as string but the dashes wouldn't.

Hope everyone is having a great day!

Thanks - Jennifer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top