Regenerating a Datagrid

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Regenerating a Datagrid

    All,

    I am wondering if there is a way to regenerate a datagrid which has already
    been bound to a dataset WITHOUT having to re-query the data source.

    In my page, I have a drop-down control which is populated through a SQL
    query. Once the user selects a value from the drop-down, the datagrid is
    generated. I have included in the datagrid a ButtonColumn to remove
    unwanted rows:

    <asp:ButtonColumn CommandName="Delete" HeaderText="Remove"
    ButtonType="LinkButton" Text="Remove" />

    Now, when the user clicks on "Remove" for any row in the datagrid, I simply
    want to remove the row from the datagrid and regenerate the datagrid without
    having to make another query to the data source. Essentially I want
    manipulate the existing datagrid object and regenerate it without having to
    re-query the database.

    Any assistance would be greatly appreciated.

    Shahir


    Shahir A. Ahang Guest

  2. Similar Questions and Discussions

    1. regenerating the wrapper
      I've done a 'clean project' and now my /bin folder is empty and I'm unable to test my application (the wrapper is gone). Now, how do I regenerate...
    2. UserControl inside of datagrid - loses its viewstate when datagrid is re-bound on postback
      I have a simple usercontrol, a datepicker which contains 3 dropdownlist , it resides inside a datagrid column and i set the selecteddate property of...
    3. To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible?
      Hello, I am searching the whole Internet for a good example how to edit/update a DataGrid in a DataGrid (nested DataGrid). I know how to...
    4. Regenerating ASPNET Login Account
      How do you regenerate the ASP_NET login account? The password got changed which hosed everything. I can no longer see my web services and need to...
    5. Regenerating /var/spool/cups
      Hi. I have a Compaq IJ600 that was working OK with CUPS and a Lexmark driver (Z22). However I sent a pdf file to print and /var/spool/cups got full...
  3. #2

    Default Re: Regenerating a Datagrid

    Save the query result, e.g. DataTable, in Session. The retrieve it from
    Session and cast to datatable (or whatever type it is).

    HTH


    "Shahir A. Ahang" <shahir@nospam.com> wrote in message
    news:2ca3b$43418895$c61dbf94$725@msgid.meganewsser vers.com...
    > All,
    >
    > I am wondering if there is a way to regenerate a datagrid which has
    > already been bound to a dataset WITHOUT having to re-query the data
    > source.
    >
    > In my page, I have a drop-down control which is populated through a SQL
    > query. Once the user selects a value from the drop-down, the datagrid is
    > generated. I have included in the datagrid a ButtonColumn to remove
    > unwanted rows:
    >
    > <asp:ButtonColumn CommandName="Delete" HeaderText="Remove"
    > ButtonType="LinkButton" Text="Remove" />
    >
    > Now, when the user clicks on "Remove" for any row in the datagrid, I
    > simply want to remove the row from the datagrid and regenerate the
    > datagrid without having to make another query to the data source.
    > Essentially I want manipulate the existing datagrid object and regenerate
    > it without having to re-query the database.
    >
    > Any assistance would be greatly appreciated.
    >
    > Shahir
    >
    >

    Elton Wang 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