How to remove grid borders in DataGridView for empty cells in Wisej?

0
0

Hello,

I am working on a project in Wisej where I need to customize the appearance of cells in a DataGridView. Specifically, I want to remove the grid borders for cells in the column "group_ngay" when the cell is empty or contains no data.

In Windows Forms, I used the CellPainting event to achieve similar results, but I am having trouble using this approach in Wisej. For example, the e.Bounds and e.Paint methods are not available, and I am unsure how to proceed with customizing the borders.

Is there a recommended way to:

  1. Remove the grid border for specific cells when they are empty?
  2. Customize the cell appearance (e.g., using HTML or CSS) to remove borders or adjust the style?

Any example or guidance would be greatly appreciated!

Thank you!

  • You must to post comments
0
0

Hi Nhan,

You can attach to the CellFormatting event and do the following:

private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 2) {

e.CellStyle.CssStyle = “border-width:0px!important”;
}
}

Best Regards,
Alaa

  • You must to post comments
0
0

Hi Nhan,

You can attach to the CellFormatting event and do the following:

private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 2) {

e.CellStyle.CssStyle = “border-width:0px!important”;
}
}

Best Regards,
Alaa

  • You must to post comments
0
0

Hi Nhan,

We’re actively looking at this issue and we’ll update you ASAP!

Best Regards,

Alaa

  • Nhan Nguyen
    I tried your solution with VB.NET but it reported an error so it couldn’t be used. I really hope you will soon add it to the new version because the Cell Merge feature is very good and useful in the process of managing data on the user’s grid. By the way, I really hope you will add the column filtering feature to the datagridview as a component of the grid.
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.