c# 4.0 - How to get count of only visible colums in a WPF datagrid -


how can count of visible columns in wpf datagrid. using count navigate through colums present in datagrid.

 if (getselectedrow().isediting)                     {                         if (datagrid.selectedcells.count != 0)                         {                             int columndisplayindex = datagrid.currentcell.column.displayindex + 1;                              if (columndisplayindex <= datagrid.columns.count)                             {                                 if (columndisplayindex == datagrid.columns.count)                                  {                                     row.movefocus(new traversalrequest(focusnavigationdirection.next));                                      nextcolumn = datagrid.columnfromdisplayindex(nextcol(1) - 1);                                     datagrid.currentcell = new datagridcellinfo(datagrid.selecteditem, nextcolumn);                                  }                                 else                                 {                                     e.handled = true;                                     nextcolumn = datagrid.columnfromdisplayindex(nextcol(columndisplayindex));                                     datagrid.currentcell = new datagridcellinfo(datagrid.selecteditem, nextcolumn);                                 }                              }                         }                          if (isnotcombobox())                         {                             datagrid.commitedit();                         }                      } 


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -