Yes you can add

Sujit Patil replied to Partha Chakraborty at 10-May-08 02:49

text box , ddl and button in footer by using FooterTemplate;

like;

<FooterTemplate>
                        <asp:Button ID="Button1" runat="server" CommandName="Insert" Text="INSERT" OnClick="BtnInsert_Click" />
                        <asp:Button ID="Button2" runat="server" CommandName="Delete" Text="Delete" OnClick="BtnDelete_Click"/>

                        <asp:TextBox ID="txtId" runat="server"/>   

use same to add ddl also
</FooterTemplate>

Use this link for the same;

http://blog.binaryocean.com/2006/01/05/InsertRowsWithAGridView.aspx

Use this to add all the contents into footer of gridview;

And now when you click on Insert handle Btn_insert_click event and in that write code to add value into grid.

Now you dnt want to store these values in db, then first you have to take all the rows of gridview in one ds and then add new row in ds which will have new data.

Store this ds in a view state and then while feeling gridview take a upadted ds from this viewstate and attach all the rows to gridview like;

Dim ds As New DataSet

ds = ViewState("Newds")

gridview1.DataSource = ds

gridview1.DataBind()

Best Luck!!!!!!!!!!!

Sujit.


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  Problem with gridview during add,modification etc. - Partha Chakraborty  10-May-08 02:30 2:30:33 AM
      Yes you can add - Sujit Patil  10-May-08 02:49 2:49:11 AM
      Scrollable grid - sri sri  10-May-08 02:52 2:52:10 AM
      Re: - Chirag Bhavsar  12-May-08 12:33 12:33:54 AM
      See This - Sanjay Verma  12-May-08 12:41 12:41:05 AM
View Posts