If there is no data in the database and you're wanting the GridView to display controls to allow the client to insert data you'll need to modify the EmptyDataTemplate to include a button (could also be a LinkButton if you prefer) and a textbox (or another control like the dropdownlist depending on the situation) for each value you want to insert
<EmptyDataTemplate>
<table>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Insert" CommandName="EmptyInsert" />
</td>
<td><asp:TextBox ID="TextBox1" runat="server" Text=''></asp:TextBox></td>
<td><asp:TextBox ID="TextBox2" runat="server" Text=''></asp:TextBox></td>
<td><asp:TextBox ID="TextBox3" runat="server" Text=''></asp:TextBox></td>
</tr>
</table>
</EmptyDataTemplate>
Notice that I have the CommandName Property set on the Button control. You'll need to use the OnRowCommand event of the gridview and in the code behind it should look something like
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.CompareTo("EmptyInsert").Equals(0))
{
GridView gv = sender as GridView;
Table tbl = gv.Controls[0] as Table;
string input1 = (tbl.Rows[0].FindControl("TextBox1") as TextBox).Text;
string input2 = (tbl.Rows[0].FindControl("TextBox2") as TextBox).Text;
string input3 = (tbl.Rows[0].FindControl("TextBox3") as TextBox).Text;
SqlDataSource1.InsertParameters.Clear();
SqlDataSource1.InsertParameters.Add(new Parameter("column1", TypeCode.String, input1));
SqlDataSource1.InsertParameters.Add(new Parameter("column2", TypeCode.Int32, input2));
SqlDataSource1.InsertParameters.Add(new Parameter("column3", TypeCode.Boolean, input3));
SqlDataSource1.Insert();
gv.DataBind();
}
}
Here we check that the current command name is equal to the command name from the insert button control. Next we find the textbox controls in the gridview's childtable control and pull the Text value from each one. After that we clear the existing insert parameters and enter our new ones ( I used random types here as an example). Finally, we use the SqlDataSource to insert the data and rebind our gridview to show the updated database values.