Get GridView's datasource after Post Back

P

phil.a.jenkins

Hello

I have a GridView which is bound to a standard DataSet on Page_Load.

E.g

Grid.DataSource = dataSet;
Grid.DataBind();


I have added columns manually in the aspx source, and one of them is a
ButtonField, which is hooked up to a _RowCommand event handler.

What I need to do is to be able to get values out of the original
dataset when the command button is clicked, note they are not displayed
in the gridview itself. Is there a way of doing this?

Apologies if this makes no sense, ASP.NET is still foreign to me :)
 
P

phil.a.jenkins

Thanks Eliyahu for your response

The way the web app has been developed means that we can't use session
variables (any session information is stored in the DB) so any
Context.Session stuff is out of bounds.

I basically need to be able to set the CommandArgument of a LinkButton
in the GridView to have a value which is an ID extracted from the
DataSet, instead of the default, which is the grid's row ID. Is there
an event I can use to handle this?

Many thanks

Phil
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top