First Grid Template Field :
<asp:templatefield xmlns:asp="#unknown">
<edititemtemplate>
<<asp:Button ID="Update" runat="server" CommandName="Update" Text="Update" />
<<asp:Button ID="Cancel" runat="server"
ommandName="Cancel" Text="Cancel" />
</edititemtemplate>
<itemtemplate>
<<asp:Button ID="Edit" runat="server"
ommandName="Edit" Text="Edit" />
</itemtemplate>
<footertemplate>
<asp:button id="Insert" runat="server" commandname="Insert" text="Insert" />
</footertemplate>
</asp:templatefield>
Second Grid Template Field:
<asp:templatefield xmlns:asp="#unknown">
<edititemtemplate>
<<asp:Button ID="UpdateS" runat="server" CommandName="Update" Text="Update" />
<<asp:Button ID="CancelS" runat="server"
ommandName="Cancel" Text="Cancel" />
</edititemtemplate>
<itemtemplate>
<<asp:Button ID="EditS" runat="server"
ommandName="Edit" Text="Edit" />
</itemtemplate>
<footertemplate>
<asp:button id="Search" runat="server" commandname="Insert" text="Insert" />
</footertemplate>
</asp:templatefield>
And all the other columsn are the same except my footer which is different in controls type but still has no code so the controls wont matter
my Load Function
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GridView1.DataSourse = DataSet1
GridView1.DataBind()
GridView2.DataSourse = DataSet1
GridView2.DataBind()
End Sub
The rowEditing for the first Grid
Protected Sub GridView1_RowEditing(sender As Object, e As System.Wev.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
GridView1.EditIndex = e.NewEditIndex
GridView1.DataSourse = DataSet1
GridView1.DataBind()
End Sub
The rowEditing for the Second Grid
Protected Sub GridView2_RowEditing(sender As Object, e As System.Wev.UI.WebControls.GridViewEditEventArgs) Handles GridView2.RowEditing
GridView2.EditIndex = e.NewEditIndex
GridView2.DataSourse = DataSet1
GridView2.DataBind()
End Sub
I've solved the first problem so now it recognize the Edit Command but after that it wont see the other buttons command such as update or cancel .. i solved the first problem by binding the grid to the data at Page_load instead of a button click but now i need to bind at RowEditing level which makes a problem , what would be the problem ?
Note : Only one grid has to be shown at a time