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");
> }
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement