|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dependent GridViews And CommandArgumentsI have two gridviews. The first one has a column that contains an
ImageButton with a commandargument that is set in the RowDataBound event for that gridview. What I want to happen is that when a user clicks the ImageButton on a row in the first grid, somehow the commandargument will be read and used as a parameter in a select statement used to populate the second gridview. I've not seen anything like this and it's driving me batty. Thanks, beaudetious Look at examples of a GridView linked to a DetailsView and substitute the
DetailsView for your second GridView. There are examples of this in the ASP.NET Quick Start Tutorials available through www.asp.net and the .NET SDK. -- Show quoteHide quoteChristopher A. Reed "The oxen are slow, but the earth is patient." "beaudetious" <beaudeti***@discussions.microsoft.com> wrote in message news:46EDC9DE-29EF-4569-86F6-2524246461AA@microsoft.com... >I have two gridviews. The first one has a column that contains an > ImageButton with a commandargument that is set in the RowDataBound event > for > that gridview. What I want to happen is that when a user clicks the > ImageButton on a row in the first grid, somehow the commandargument will > be > read and used as a parameter in a select statement used to populate the > second gridview. > > I've not seen anything like this and it's driving me batty. > > Thanks, > beaudetious Christopher,
Most of the examples I've seen use some form of the Select command. My specific case uses the commandargument from an ImageButton as a parameter in a stored procedure. That's the tricky part for me. Brian Show quoteHide quote "Christopher Reed" wrote: > Look at examples of a GridView linked to a DetailsView and substitute the > DetailsView for your second GridView. There are examples of this in the > ASP.NET Quick Start Tutorials available through www.asp.net and the .NET > SDK. > -- > Christopher A. Reed > "The oxen are slow, but the earth is patient." > > "beaudetious" <beaudeti***@discussions.microsoft.com> wrote in message > news:46EDC9DE-29EF-4569-86F6-2524246461AA@microsoft.com... > >I have two gridviews. The first one has a column that contains an > > ImageButton with a commandargument that is set in the RowDataBound event > > for > > that gridview. What I want to happen is that when a user clicks the > > ImageButton on a row in the first grid, somehow the commandargument will > > be > > read and used as a parameter in a select statement used to populate the > > second gridview. > > > > I've not seen anything like this and it's driving me batty. > > > > Thanks, > > beaudetious > > > You might change the control parameter to refer to a hidden TextBox that is
being populated from that button, as I did in this demo:http://www.webswapp.com/CodeSamples/aspnet20/GridView_6c.aspx Show quoteHide quote "beaudetious" wrote: > I have two gridviews. The first one has a column that contains an > ImageButton with a commandargument that is set in the RowDataBound event for > that gridview. What I want to happen is that when a user clicks the > ImageButton on a row in the first grid, somehow the commandargument will be > read and used as a parameter in a select statement used to populate the > second gridview. > > I've not seen anything like this and it's driving me batty. > > Thanks, > beaudetious That looks like an excellent suggestion. I'll play with it tonight. Thanks.
Show quoteHide quote "Phillip Williams" wrote: > You might change the control parameter to refer to a hidden TextBox that is > being populated from that button, as I did in this > demo:http://www.webswapp.com/CodeSamples/aspnet20/GridView_6c.aspx > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "beaudetious" wrote: > > > I have two gridviews. The first one has a column that contains an > > ImageButton with a commandargument that is set in the RowDataBound event for > > that gridview. What I want to happen is that when a user clicks the > > ImageButton on a row in the first grid, somehow the commandargument will be > > read and used as a parameter in a select statement used to populate the > > second gridview. > > > > I've not seen anything like this and it's driving me batty. > > > > Thanks, > > beaudetious
Inheriting from the TreeNode class
CreateChildControls() always returns default property values GridView "visible=False" data items not accessible? programattically Enabling/diusabling child controls Input fields are renamed with runat="server", how do I change it Website on a website. Set visibility of label in itemtemplate of repeater control VS 2005 Validator controls button's OnClick event runs after page databinding... strange question about DropDownList |
|||||||||||||||||||||||