开发者

How to fire RowCommand for a GridView which is inside a Repeater?

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 GridViews.

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 GridViews, the GridView_RowCommand event will be called.


Refer to this site, where a similar discussion is done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜