c# - Multiple time executing cell paint event in datagridview view (Winform) -
i wanted keep functionality search , highlight data row cell content in datagridview row.
i using cellpaint event same.
i setting search matching cell content again , time on event highlighting cell.
i need suggestion whether alternative event can used same purpose. because have noticed event executing cells, above cell modified cell.
below code snaps
//re setting cell content highlight datagridview1.rows[rowindex].cells[0].value = ""; datagridview1.rows[rowindex].cells[0].value = "test"; void datagridview1_cellpainting(object sender, datagridviewcellpaintingeventargs e) { //highliting here if match search content }
Comments
Post a Comment