changing the template column's position ?

Discussion in 'ASP .Net Datagrid Control' started by Gary, Oct 14, 2003.

  1. Gary

    Gary Guest

    Hi all,

    By default when we create a Template Column, the position of the Template
    Column

    will be 1. Is it possible to change its position at Design Time or Runtime
    i.e if I want a Template Column to be at no. 2,

    then how can we do this?

    Thanks,

    Gary
     
    Gary, Oct 14, 2003
    #1
    1. Advertising

  2. Hi Gary,

    1) If you use Property Builder
    Select the column to be moved and click on the up & down arrows to move it.

    2) Without Property Builder
    Switch to HTML View and you will see something like this:
    <Columns>
    <asp:TemplateColumn HeaderText="One"></asp:TemplateColumn>
    <asp:TemplateColumn HeaderText="Two"></asp:TemplateColumn>
    </Columns>

    Edit this text to place column two above column one.

    Does this answer your question?

    Thank you, Mike
    Microsoft, ASP.NET Support Professional

    Microsoft highly recommends to all of our customers that they visit the
    http://www.microsoft.com/protect site and perform the three straightforward
    steps listed to improve your computer’s security.

    This posting is provided "AS IS", with no warranties, and confers no rights.


    --------------------
    > From: "Gary" <>
    > Subject: changing the template column's position ?
    > Date: Tue, 14 Oct 2003 17:53:09 +0530
    > Lines: 15
    > X-Priority: 3
    > X-MSMail-Priority: Normal
    > X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > Message-ID: <#>
    > Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > NNTP-Posting-Host: 61.11.24.47
    > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
    > Xref: cpmsftngxa06.phx.gbl

    microsoft.public.dotnet.framework.aspnet.datagridcontrol:7039
    > X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    >
    > Hi all,
    >
    > By default when we create a Template Column, the position of the Template
    > Column
    >
    > will be 1. Is it possible to change its position at Design Time or

    Runtime
    > i.e if I want a Template Column to be at no. 2,
    >
    > then how can we do this?
    >
    > Thanks,
    >
    > Gary
    >
    >
    >
     
    Mike Moore [MSFT], Oct 14, 2003
    #2
    1. Advertising

  3. Gary

    Gary Guest

    Yes, thanks a lot.

    - Gary -

    ""Mike Moore [MSFT]"" <> wrote in message
    news:...
    > Hi Gary,
    >
    > 1) If you use Property Builder
    > Select the column to be moved and click on the up & down arrows to move

    it.
    >
    > 2) Without Property Builder
    > Switch to HTML View and you will see something like this:
    > <Columns>
    > <asp:TemplateColumn HeaderText="One"></asp:TemplateColumn>
    > <asp:TemplateColumn HeaderText="Two"></asp:TemplateColumn>
    > </Columns>
    >
    > Edit this text to place column two above column one.
    >
    > Does this answer your question?
    >
    > Thank you, Mike
    > Microsoft, ASP.NET Support Professional
    >
    > Microsoft highly recommends to all of our customers that they visit the
    > http://www.microsoft.com/protect site and perform the three

    straightforward
    > steps listed to improve your computer's security.
    >
    > This posting is provided "AS IS", with no warranties, and confers no

    rights.
    >
    >
    > --------------------
    > > From: "Gary" <>
    > > Subject: changing the template column's position ?
    > > Date: Tue, 14 Oct 2003 17:53:09 +0530
    > > Lines: 15
    > > X-Priority: 3
    > > X-MSMail-Priority: Normal
    > > X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > > Message-ID: <#>
    > > Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > > NNTP-Posting-Host: 61.11.24.47
    > > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
    > > Xref: cpmsftngxa06.phx.gbl

    > microsoft.public.dotnet.framework.aspnet.datagridcontrol:7039
    > > X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > >
    > > Hi all,
    > >
    > > By default when we create a Template Column, the position of the

    Template
    > > Column
    > >
    > > will be 1. Is it possible to change its position at Design Time or

    > Runtime
    > > i.e if I want a Template Column to be at no. 2,
    > >
    > > then how can we do this?
    > >
    > > Thanks,
    > >
    > > Gary
    > >
    > >
    > >

    >
     
    Gary, Oct 15, 2003
    #3
  4. Gary

    Gary Guest

    But the only thing is
    that I have only 1 Template column and i am binding my Datagrid with a
    dataset, I

    am creating a template column to put Text box so the user can enter Qty, but
    by

    default the Template Column comes to the 1st position, actually i want the
    template

    column to be at no.2 or at the end of the grid.

    Please suggest.

    Thanks again,

    Gary


    "Gary" <> wrote in message
    news:...
    > Yes, thanks a lot.
    >
    > - Gary -
    >
    > ""Mike Moore [MSFT]"" <> wrote in message
    > news:...
    > > Hi Gary,
    > >
    > > 1) If you use Property Builder
    > > Select the column to be moved and click on the up & down arrows to move

    > it.
    > >
    > > 2) Without Property Builder
    > > Switch to HTML View and you will see something like this:
    > > <Columns>
    > > <asp:TemplateColumn HeaderText="One"></asp:TemplateColumn>
    > > <asp:TemplateColumn HeaderText="Two"></asp:TemplateColumn>
    > > </Columns>
    > >
    > > Edit this text to place column two above column one.
    > >
    > > Does this answer your question?
    > >
    > > Thank you, Mike
    > > Microsoft, ASP.NET Support Professional
    > >
    > > Microsoft highly recommends to all of our customers that they visit the
    > > http://www.microsoft.com/protect site and perform the three

    > straightforward
    > > steps listed to improve your computer's security.
    > >
    > > This posting is provided "AS IS", with no warranties, and confers no

    > rights.
    > >
    > >
    > > --------------------
    > > > From: "Gary" <>
    > > > Subject: changing the template column's position ?
    > > > Date: Tue, 14 Oct 2003 17:53:09 +0530
    > > > Lines: 15
    > > > X-Priority: 3
    > > > X-MSMail-Priority: Normal
    > > > X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > > > Message-ID: <#>
    > > > Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > > > NNTP-Posting-Host: 61.11.24.47
    > > > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
    > > > Xref: cpmsftngxa06.phx.gbl

    > > microsoft.public.dotnet.framework.aspnet.datagridcontrol:7039
    > > > X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > > >
    > > > Hi all,
    > > >
    > > > By default when we create a Template Column, the position of the

    > Template
    > > > Column
    > > >
    > > > will be 1. Is it possible to change its position at Design Time or

    > > Runtime
    > > > i.e if I want a Template Column to be at no. 2,
    > > >
    > > > then how can we do this?
    > > >
    > > > Thanks,
    > > >
    > > > Gary
    > > >
    > > >
    > > >

    > >

    >
    >
     
    Gary, Oct 15, 2003
    #4
  5. Hi Gary,

    Let me see if I have this correct. You have auto-generate-columns set to
    true and you want a template column to display after the auto column(s). I
    hope I understand this correctly.

    Unfortunately, the auto columns always add to the right. You can re-arrange
    this by adding your columns in advance rather than using auto generate.

    Does this answer your question?

    Thank you, Mike
    Microsoft, ASP.NET Support Professional

    Microsoft highly recommends to all of our customers that they visit the
    http://www.microsoft.com/protect site and perform the three straightforward
    steps listed to improve your computer’s security.

    This posting is provided "AS IS", with no warranties, and confers no rights.


    --------------------
    > From: "Gary" <>
    > References: <#>

    <>
    <>
    > Subject: Re: changing the template column's position ?
    > Date: Wed, 15 Oct 2003 13:11:07 +0530
    > Lines: 96
    > X-Priority: 3
    > X-MSMail-Priority: Normal
    > X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > Message-ID: <#aVwz#>
    > Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > NNTP-Posting-Host: 61.11.24.47
    > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
    > Xref: cpmsftngxa06.phx.gbl

    microsoft.public.dotnet.framework.aspnet.datagridcontrol:7055
    > X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    >
    > But the only thing is
    > that I have only 1 Template column and i am binding my Datagrid with a
    > dataset, I
    >
    > am creating a template column to put Text box so the user can enter Qty,

    but
    > by
    >
    > default the Template Column comes to the 1st position, actually i want the
    > template
    >
    > column to be at no.2 or at the end of the grid.
    >
    > Please suggest.
    >
    > Thanks again,
    >
    > Gary
    >
    >
    > "Gary" <> wrote in message
    > news:...
    > > Yes, thanks a lot.
    > >
    > > - Gary -
    > >
    > > ""Mike Moore [MSFT]"" <> wrote in message
    > > news:...
    > > > Hi Gary,
    > > >
    > > > 1) If you use Property Builder
    > > > Select the column to be moved and click on the up & down arrows to

    move
    > > it.
    > > >
    > > > 2) Without Property Builder
    > > > Switch to HTML View and you will see something like this:
    > > > <Columns>
    > > > <asp:TemplateColumn HeaderText="One"></asp:TemplateColumn>
    > > > <asp:TemplateColumn HeaderText="Two"></asp:TemplateColumn>
    > > > </Columns>
    > > >
    > > > Edit this text to place column two above column one.
    > > >
    > > > Does this answer your question?
    > > >
    > > > Thank you, Mike
    > > > Microsoft, ASP.NET Support Professional
    > > >
    > > > Microsoft highly recommends to all of our customers that they visit

    the
    > > > http://www.microsoft.com/protect site and perform the three

    > > straightforward
    > > > steps listed to improve your computer's security.
    > > >
    > > > This posting is provided "AS IS", with no warranties, and confers no

    > > rights.
    > > >
    > > >
    > > > --------------------
    > > > > From: "Gary" <>
    > > > > Subject: changing the template column's position ?
    > > > > Date: Tue, 14 Oct 2003 17:53:09 +0530
    > > > > Lines: 15
    > > > > X-Priority: 3
    > > > > X-MSMail-Priority: Normal
    > > > > X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > > > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > > > > Message-ID: <#>
    > > > > Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > > > > NNTP-Posting-Host: 61.11.24.47
    > > > > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
    > > > > Xref: cpmsftngxa06.phx.gbl
    > > > microsoft.public.dotnet.framework.aspnet.datagridcontrol:7039
    > > > > X-Tomcat-NG:

    microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > > > >
    > > > > Hi all,
    > > > >
    > > > > By default when we create a Template Column, the position of the

    > > Template
    > > > > Column
    > > > >
    > > > > will be 1. Is it possible to change its position at Design Time or
    > > > Runtime
    > > > > i.e if I want a Template Column to be at no. 2,
    > > > >
    > > > > then how can we do this?
    > > > >
    > > > > Thanks,
    > > > >
    > > > > Gary
    > > > >
    > > > >
    > > > >
    > > >

    > >
    > >

    >
    >
    >
     
    Mike Moore [MSFT], Oct 15, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary
    Replies:
    1
    Views:
    406
    Natty Gur
    Oct 15, 2003
  2. Dexter
    Replies:
    1
    Views:
    440
    Eliyahu Goldin
    Jan 18, 2005
  3. Ken Varn
    Replies:
    1
    Views:
    993
    Ken Varn
    Aug 19, 2005
  4. Rob Edwards

    Changing the binding of a template column

    Rob Edwards, Oct 16, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    114
    Jacob Yang [MSFT]
    Oct 17, 2003
  5. raghunath
    Replies:
    2
    Views:
    333
    Kubuli John
    Apr 29, 2004
Loading...

Share This Page