.net - delete contents of multiple selected cells datagridview in C++/CLI -


i'm trying delete string contents of selected cells when click on button in windows form. button event hook calls following function:

code:

    void deletehighlightedrows(datagridview^ dgv)      {           if (dgv->selectedcells->count > 0)          {              (int = 0; < dgv->selectedcells->count; i++)              {                  dgv->selectedcells[i]->value = "";              }          }      } 

this function called whenever button clicked, whenever there multiple rows selected, count of selected rows zero.

any help/pointers appreciated!


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -