I am able to get the LinkButton button type to work in my grid but not the PushButton button type. I am not sure why. I even place a PushButton and LinkButton in the same grid, but only the LinkButton works.
I create a ItemCommand event called mygrid_ItemCommand and when any of the LinkButtons are clicked, my mygrid_ItemCommand event is called. But if a PushButton is pressed in the same grid, nothing happens.
I guess I'll stick with LinkButton instead of PushButtons.
Thanks,
Jerry
>In the grid property window, specify doEdit for EditCommand.
>
>
>private void InitializeComponent()
> {
>this.DataGrid1.EditCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.doEdit);
>this.Load += new System.EventHandler(this.Page_Load);
> }
> #endregion
>
>private void doEdit(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
> {
> Response.Write("editing");
> }
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only