Context Menu for add and remove datalist column [migrated]
- by Kadir Ozgur
When I right click on Datalist Columns then a context menu appears whose items are add columns, remove column etc. When I removed a column and if I want to remove one more column then it shows me to remove previous column. Everytime, it shows me to remove the previous ones.
if (mnu.Name.StartsWith("Rem"))
{
//getview();
//datalist.Items.Refresh();
//rows.Clear();
//datalist.ItemsSource = rows;
int id = listwork.dispidx(util.valint(/*mnu.Name.Substring(3)*/util.valint(mnu.Tag)), ListWork.eArtIdx.dispord);
int delid = listwork.delcol(id);
GridViewColumnCollection gw = getview().Columns;
if (delid >= 0 && delid < gw.Count) gw.RemoveAt(delid);
listsortnr = 0; //weil wir ja Colonnen gelöschte haben
showsortlist(listwork.querydef.Sortcol);
//rows.Clear();
DoRefresh();
}