ASP.NET – Format datagrid columns.

There are two ways to modify the format of the data in a Datagrid/GridView.

I have moved my blog from here.

Please visit here for more article detail

http://blog.joggee.com/?p=37

Sorry for any inconvenience.

Rana

Advertisements

4 thoughts on “ASP.NET – Format datagrid columns.

  1. Dear Vijayan,
    I am new to dot.net world. I am a AS/400 programmer. I have date field in CYYMMDD format in AS/400 database (ex: 1080305, being 03/05/2008 is the actual date). How do I display the date 1080305 in correct format 03/05/2008? Any help is highly appreciated.

    Thank you in advance.

    Satyabrata

  2. My name is Rana, Vijayan was one my reader.

    Here is your answer.

    Option 1:

    Directly pull from the database and just bound it with the column.

    use AdventureWorks

    Select Convert(varchar,ModifiedDate,101) from Person.Contact.

    Option Two:

    In “Protected Sub GridView1_RowDataBound(”

    Bound it and use string property

    strDATEVAL.String(“dd/MM/yyyy”)

    If you need a code for this please write.

    I will be writing later, I have to rush and talk to the client.

    regards,
    RANA

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s