judir

We have an application that works fine with a multi-select list box that displays as soon as the Excel workbook opens. We have been asked to replace the list box with a DataGridView and we are having many problems getting the DataGridView to display. We have tried filling the grid before we show the form, but only part of the grid displays on the screen, borders, checkboxes, and gridlines don't show. If we move the form it will eventually draw but as soon as a selection is made the partial redraw resumes.

Any help in this will be appreciated; thanks.



Re: Visual Studio Tools for Office VSTO problem with DataGridView not drawing correctly in VSTO Excel workbook

Andrew Cherry [MSFT]

Hi -

Can you please give us some additional information

Excel 2003/2007

VSTO 2005 SE / VSTO 2005

Thanks,

Andrew






Re: Visual Studio Tools for Office VSTO problem with DataGridView not drawing correctly in VSTO Excel workbook

Tony_From_AMB

Hi,

I am working with Judi on this project. We are using Excel 2003 and VSTO 2005.






Re: Visual Studio Tools for Office VSTO problem with DataGridView not drawing correctly in VSTO Excel workbook

Andrew Cherry [MSFT]

Hi Judi and Tony -

I created a stock Excel 2003 Workbook project. I added a new Windows Form control, and then placed a DataGridView on it. I attached it to a DataSet from the infamous "Northwind" database; simple three columns selected from the Employee Table.

In ThisWorkbook_Startup I inserted the code:

ForegroundForm frm = new ForegroundForm();

frm.Show()

Everything displayed as expected with no issues.

If I did something differently than you are, please provide deeper repro steps so we can establish any issues.

Thanks,

Andrew






Re: Visual Studio Tools for Office VSTO problem with DataGridView not drawing correctly in VSTO Excel workbook

Tony_From_AMB

Hi Andrew,

Apparently it is something on our machines causing this bizare behavior. I made a sample project that has the same problem on our PCs. I tried running it on 2 other PCs and it worked fine. Still not sure what is causing it but looks like it is not a coding problem. Thanks for the help.