Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Regenerating a Datagrid

Reply
Thread Tools

Regenerating a Datagrid

 
 
Shahir A. Ahang
Guest
Posts: n/a
 
      10-03-2005
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


 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      10-03-2005
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" <(E-Mail Removed)> wrote in message
news:2ca3b$43418895$c61dbf94$(E-Mail Removed) 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regenerating unicodedata for py2.7 using py3 makeunicodedata.py? Vlastimil Brom Python 5 11-19-2010 02:49 PM
Regenerating the *.aspx.designer.vb file Nathan Sokalski ASP .Net 1 09-28-2009 11:12 AM
Regenerating the *.aspx.designer.vb file Nathan Sokalski ASP .Net 0 01-31-2009 03:52 AM
Stop Visual Studio from regenerating Design View GMartin ASP .Net 1 05-04-2005 04:16 PM
problem while regenerating jpg file from swing image. Roja Java 1 01-07-2005 07:10 AM



Advertisments