UserComboBox with DataGridView and Column AutoSizeMode issue

Answered
0
0

Hi guys.

I am using a UserComboBox with a DataGridView to show multiple columns. In order to have the columns resize proportional to the UserComboBox Width, I am setting the DataGridView Columns AutoSizeMode to “Fill”.
When doing this, the DataGridView shows up quite a bit larger than the UserComboBox itself.


        dataGrid.Columns.Add("Name");
        dataGrid.Columns["Name"].AutoSizeMode = Wisej.Web.DataGridViewAutoSizeColumnMode.Fill;

Could you think of a workaround for this one?

I have attached a sample and an image.

Thanks.

Ivan
(Wisej 2.2.52.0 – VS 2019 – C#)

  • Ivan Borges
    Another thing, I need to add a tool icon to the UserComboBox Tools. It shows OK in the Designer, but nothing shows up at Run Time.
  • You must to post comments
Best Answer
0
0

Hi Ivan,

the fix is now included in our latest development build (2.2.54).

Best regards
Frank

  • You must to post comments
Best Answer
0
0

It’s a strange issue caused by the dgv being measured before the theme is applied when it’s in a popup. It’s fixed internally already. As a workaround you can set  the Fill mode when handling the Appear event of the dgv. In the appear handler you can also detach from the event so it’s executed only once.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.