I have a datagrid that is being populated by a SQL Server dataset (2 Columns), and using the "OnItemCommand" I am updating a database from a LinkButton like so:
LinkButton lnkbtn = ((LinkButton)e.CommandSource);
if (e.CommandName == "Delete")
{
DataGridItem gr = (DataGridItem)lnkbtn.NamingContainer;
string abcd= gr.Cells[0].Text;
//run stored procedure to delete
//rebind data
PopulateGrid();
}
Now as the very last row in my grid, I need to add a dropdownlist that is populated with the results of a SQL Query, and in Column 1 show the dropdownlist and in Column 2 have a different Link Button that shows "Add" and that will run a Sql Server query
that inserts into a table. How can I find the last row of my grid, and how can I programmatically add the drop do ...
Go to the complete details ...