c# - Hide header Checkbox in DatagridView -


i have requirement in need have checkbox columns in first column of datagaridview. when add checkbox , adds same in header of teh same column well. header checkbox not required me. want hide out. not able achieve this. haev tried cell painitng technique not working out me :(.. pls help

                        ckbox = new checkbox();                         ckbox.size = new size(14, 14);                         //get column header cell bounds                         rectangle rect = dgv_courselist.getcelldisplayrectangle(0,-1, true);                         point opoint = new point();                         opoint.x = rect.location.x + 3;                         opoint.y = rect.location.y + 2;  //check cells of first column , header         if (this.dgv_courselist.columns[0].index == e.columnindex && e.rowindex < 0)         {                  // can change e.cellstyle.backcolor color.gray example                 using (brush backcolorbrush = new solidbrush(e.cellstyle.backcolor))                 {                     // erase cell.                     e.graphics.fillrectangle(backcolorbrush, e.cellbounds);                     e.handled = true;                 }             //}         }     } 


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -