DataGrid - sorting/paging problem

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default DataGrid - sorting/paging problem

    Hi.

    I have created a datagrid (datagrid1) without any columns on a aspx page.
    Then aspx.vb adds columns from a database.

    It is somthing like this ....
    ==================================
    Dim myBoundColumnEntryBy As New BoundColumn()
    myBoundColumnEntryBy.DataField = "Entry By"
    myBoundColumnEntryBy.SortExpression = "Entry By"
    myBoundColumnEntryBy.HeaderText = "Entry By"
    DataGrid1.Columns.Add(myBoundColumnEntryBy)

    DataGrid1.DataSource = dv ' dv is a dataview.
    DataGrid1.CurrentPageIndex = 0
    DataGrid1.DataBind()
    ==================================

    Everything working except Sorting/Paging features.
    When I click the sorting or paging the whole datagrid disappear.

    Any idea?

    Thanks.
    Haji


    Hajime Kusakabe Guest

  2. Similar Questions and Discussions

    1. What's the easiest way to..user define class...datagrid..paging..sorting..
      I have a large number of user define class objects and want display in a datagrid and able to perform paging and column sorting. It seems using...
    2. Datagrid does not respond to any sorting, dataview filtering, or paging events
      This is my third VB.NET forum to try and help me with my problems and several people have failed so I am hoping someone here is a TRUE GURU on...
    3. Help with simple datagrid paging and sorting issue
      Please help! I have a simple web app that displays some search fields, posts back to itself onclick of the search button, and shows the results...
    4. Dynamic columns in DataGrid, Paging/Sorting and Data Caching
      Hi, I have a DataGrid that has no columns and that is populated with columns based on data obtained from DB during PageLoad in the following way:...
    5. How to bring paging, sorting and hyperlinking functioanlities in a datagrid?
      Hi there, I just started asp.net code 3 days ago from now. I have a situation in one of my pages that i need to provide all three...
  3. #2

    Default Re: DataGrid - sorting/paging problem

    Sorry ... I forgot to mention this ...

    When I click for sorting it does not get the subroutine
    "DataGrid1_SortCommand" at all.

    If I create the column in design mode (not runtime) then when I click for
    sorting it calls the subroutine and do sorting.

    Haji

    "Hajime Kusakabe" <hajime.kusakabe@eimcoprocess.com> wrote in message
    news:OMOhaBuVDHA.424@TK2MSFTNGP11.phx.gbl...
    > Hi.
    >
    > I have created a datagrid (datagrid1) without any columns on a aspx page.
    > Then aspx.vb adds columns from a database.
    >
    > It is somthing like this ....
    > ==================================
    > Dim myBoundColumnEntryBy As New BoundColumn()
    > myBoundColumnEntryBy.DataField = "Entry By"
    > myBoundColumnEntryBy.SortExpression = "Entry By"
    > myBoundColumnEntryBy.HeaderText = "Entry By"
    > DataGrid1.Columns.Add(myBoundColumnEntryBy)
    >
    > DataGrid1.DataSource = dv ' dv is a dataview.
    > DataGrid1.CurrentPageIndex = 0
    > DataGrid1.DataBind()
    > ==================================
    >
    > Everything working except Sorting/Paging features.
    > When I click the sorting or paging the whole datagrid disappear.
    >
    > Any idea?
    >
    > Thanks.
    > Haji
    >
    >

    Hajime Kusakabe Guest

  4. #3

    Default Re: DataGrid - sorting/paging problem

    Can you send your codebehind file code, actually where you are creating
    columns for datagrid.

    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Hajime Kusakabe" <hajime.kusakabe@eimcoprocess.com> wrote in message
    news:OMOhaBuVDHA.424@TK2MSFTNGP11.phx.gbl...
    > Hi.
    >
    > I have created a datagrid (datagrid1) without any columns on a aspx page.
    > Then aspx.vb adds columns from a database.
    >
    > It is somthing like this ....
    > ==================================
    > Dim myBoundColumnEntryBy As New BoundColumn()
    > myBoundColumnEntryBy.DataField = "Entry By"
    > myBoundColumnEntryBy.SortExpression = "Entry By"
    > myBoundColumnEntryBy.HeaderText = "Entry By"
    > DataGrid1.Columns.Add(myBoundColumnEntryBy)
    >
    > DataGrid1.DataSource = dv ' dv is a dataview.
    > DataGrid1.CurrentPageIndex = 0
    > DataGrid1.DataBind()
    > ==================================
    >
    > Everything working except Sorting/Paging features.
    > When I click the sorting or paging the whole datagrid disappear.
    >
    > Any idea?
    >
    > Thanks.
    > Haji
    >
    >

    Saravana Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139