Hello Team
I have a requirement in gridview where user inserts columns to the grid and also removes when ever he wants, when he removes the column i need to delete the column from database, see the below image
when user clicks the contextmenu Remove Field i need to delete the column from the database table
for this i have written MenuItemRemove.Click += new EventHandler(MenuItemRemove_Click);
void MenuItemRemove_Click(object sender, EventArgs e)
{
string iColName = radgridview1.CurrentColumn.Name;
// delete query to delete the above column from the database
}
my problem here is i selected fifth column in the grid, and the current column is always returning column index as 0 which means column one, how to capture the selected column index or name when clicked the context menu remove in my example
please help me
I have a requirement in gridview where user inserts columns to the grid and also removes when ever he wants, when he removes the column i need to delete the column from database, see the below image
when user clicks the contextmenu Remove Field i need to delete the column from the database table
for this i have written MenuItemRemove.Click += new EventHandler(MenuItemRemove_Click);
void MenuItemRemove_Click(object sender, EventArgs e)
{
string iColName = radgridview1.CurrentColumn.Name;
// delete query to delete the above column from the database
}
my problem here is i selected fifth column in the grid, and the current column is always returning column index as 0 which means column one, how to capture the selected column index or name when clicked the context menu remove in my example
please help me