Ticket T452322
Visible to All Users

Problem with XtraGrid within a PowerPoint VSTO Add-in

created 8 years ago

Hi,

I´m working on an Add-in for MS Power Point 2013 so that my add-in will consist of a CustomTaskPane (Office API) that is a XtraUserControl. Inside, a XtraGrid will present a list of objects. I´m a bit amazed when I realized about your XtraGrid is not showing the rows within the pane. The load of the objects is done by means the normal mechanism, by setting the Datasource property.

Have you ever realised about that? Is it an already known limitation? Is possible to make it work?

I´ve just attached a solution with two projects, one is the VSTO Add-in and one is a normal WinForms one. The XtraGrid is shown is the regular one and not in the Add-in.

Thanks!

Answers approved by DevExpress Support

created 8 years ago (modified 8 years ago)

Hello Eduardo,
I reviewed the attached sample and found the cause of the issue. It occurs since the Grid's BindingContext is null. The issue is not reproducible on a form, only when the Grid is used in CustomTaskPane. The standard DataGridView behaves in the same manner, so I believe that this issue is related to using controls in CustomTaskPane. Please see the attached video that illustrates this.

As a workaround, set the BindingContext property in code:

C#
gridControl1.BindingContext = this.BindingContext;

Attached is the modified sample.

    Comments (1)
    ED ED
    Eduardo Domínguez 8 years ago

      Hi Sasha,

      The workaround you provided me is what i needed.
      Thanks!

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.