473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DataGrid Formating

Hi, I wonder if anyone knows why this does not work:

Dim TelCol As New DataGridTextBoxColumn()

Dim ts1 As New DataGridTableStyle()

TelCol.MappingName = "cPhone"

TelCol.HeaderText = "Phone Number"

TelCol.Format = "(###)###-####"

TelCol.Width = 100

ts1.GridColumnStyles.Add(TelCol)

dgLocal.TableStyles.Add(ts1)

The part that does not work is the format string when run it just shows the
phone number like 1234567890 instead of (123)456-7890. Any ideas on what I'm
doing wrong? or if im missing something. All other lines of code do what its
intended.

TIA

Alvaro
Nov 21 '05 #1
0 717

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

Similar topics

1
by: Will | last post by:
In a Windows form: I need the code to manually set the header name of a column in a datagrid to anything i want. Everytime i retieve records from a database, the coloum header of the datagrid...
0
by: Diogo Alves - Software Developer | last post by:
Hi there, I have a big problem here, I am binding a database table to a dataset and then populate a datagrid the problem is that I have a column that is named TOTALMINUTES and type real.... On...
1
by: Tayo | last post by:
What is best way of having a consistent datagrid format on multiple pages? Any ideas welcome Tayo
3
by: Tina | last post by:
I have a datagrid where I specified {0:###,###,###} at design time. However sometimes I am putting percentages in the grid instead of money and I want to change the formating to {##%}. I've...
1
by: Thomas Beyerlein | last post by:
Hello, I am loading a dataGrid and formatting it with datagridtablestyle, but when it loads different info it does not clear the old. With out the formatting the code works. I have tried clearing...
4
by: BrianDH | last post by:
Hi I have a datagrid that I populate with a web service dataset. All fields are sent to text. However, one field will not show its value. You can click on a row and see that info in the grid's...
1
by: Tor Inge Schulstad | last post by:
Hi. I need to change the fontsize and vertical alignment of the text in a datagrid. It's a Windows forms application, and I'm using tablestyles to format my datagrid. I do not need to format...
3
by: Horselover Fat | last post by:
Hi, I have a column in a database that holds elapsed time in milliseconds and I want to display that column in a DataGrid in a specific format (d.hh:mm:ss.fff). However, the closest I can get...
0
by: musawer | last post by:
Can Someone give a good link for C# Winform DataGrid Text Style Formating (Font,Color,Size etc)... Quick reply will be highly appreciated... Thanks...
1
by: CreativeMind | last post by:
i have a datagrid having a templatecolumn with headertext="CompletionDate".I want to bind it with either column 'CompletionDate'(datetime) or 'IsReady'(bit). If 'Isready' value is false, then Row...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.