I have a Repeater
and inside it a GridView
. Now I want to to fire 开发者_如何学JAVAGridView
's RowCommand. So can any one tell me how can it be?
What it sounds like you want to do is handle the RowCommand
event in each of your GridView
s.
One way to do this would be to create an event handler for the ItemCreated
event in the Repeater
control. In that event handler, you could then add the RowCommand
event handler to each GridView
using +=
syntax. So, if your RowCommand
event handler method is called "GridView1_RowCommand", you could do this:
Repeater1_ItemCreated(Object Sender, RepeaterItemEventArgs e)
{
GridView tempGV = (GridView)e.Item.FindControl("GridView1");
tempGV += GridView1_RowComamnd;
}
Then, each time a RowCommand
event is fired from one of your GridView
s, the GridView_RowCommand
event will be called.
Refer to this site, where a similar discussion is done.
精彩评论