order of fields

Discussion in 'ASP .Net Datagrid Control' started by Laura K, Jan 12, 2005.

  1. Laura K

    Laura K Guest

    I am having a problem with the order of the columns with the datagrid. When
    ever I try to make columns that are not in the same order as the fields in
    the database the datagrid does not show in my live page.

    I have tried to change the order in the select statement but that didn't
    work.

    Laura K
     
    Laura K, Jan 12, 2005
    #1
    1. Advertisements

  2. Laura,

    How do you add columns? Are they autogenerated?

    Eliyahu
     
    Eliyahu Goldin, Jan 13, 2005
    #2
    1. Advertisements

  3. Laura K

    Laura K Guest

    Yes I believe so.

    Also Now I realized that the datagrid is not paging as well.

    Laura K
     
    Laura K, Jan 13, 2005
    #3
  4. Laura K

    Laura K Guest

    Sorry I was wrong..autogenerate is false.

    Laura K
     
    Laura K, Jan 13, 2005
    #4
  5. If it is autogenerated, the order in the select statement should matter.

    Eliyahu
     
    Eliyahu Goldin, Jan 13, 2005
    #5
  6. Laura K

    Laura K Guest

    I have changed to autogenerate and the items were moved around. Still got
    problems.

    1. The order changed but they are still in the wrong order. Different from
    the select statement.
    2. One of the fields I want I needed to put into a template because it had
    three parameter to pass. Because the columns are now autogenerated I get
    the template column AND the same field column. Basically the same column
    twice one as a link (the template) and one as text.

    Ideas?

    Laura
     
    Laura K, Jan 13, 2005
    #6
  7. Then order in what you create the columns should matter, whether in design
    or run time.

    Eliyahu
     
    Eliyahu Goldin, Jan 13, 2005
    #7
  8. Laura K

    Laura K Guest

    OK correction.

    All are in the right order but I am left with the template problem described
    in the previous post. I can not create a template and now I can not change
    the column names as well.

    Also paging does not work.

    Laura
     
    Laura K, Jan 13, 2005
    #8
  9. Laura,

    Looks like you should stick to generating columns in design time. Specify
    exact order of columns in datagrid properties panel in Columns dialog.

    I can't help you with paging since I am not using it in my projects.

    Eliyahu
     
    Eliyahu Goldin, Jan 13, 2005
    #9
  10. Laura K

    Laura K Guest

    Well I completely redid the datagrid from scratch. Now it works...go
    figure.

    Quick question. Excuse my ignorance. How do you build the datagrid in
    design time as opposed to what I am doing now.

    Laura
     
    Laura K, Jan 13, 2005
    #10
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.