Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi All

I have a column (Time) in the tablestyle collection I want to format it to "00:00" when user enter 1100 it woud format it to 11:00 and also validate if it is a valid input?

 

I tried doing it in the designer propeties for the format something like format: "00:00"

but it didn't work.

 

Thanks for your help.

Posted

Moishe

 

1. Declaration:

Dim colTime As New DataGridTextBoxColumn()

2.Mapping and Formatting

colTime.Mapping = "Time"
colTime.Format = "HH:MM"

3. Add to the DataGrid

MyDataGrid.TableStyles(0).GridColumnStyles.Add()

 

I think these are the core elements of what you need to do, but I haven't tested the "HH:MM" bit.

 

georg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...