Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
585
Populate xamGrid Without Showing to User
posted

I have a Silverlight app that is using the xamGrid v10.3. I need to export this xamGrid to an HTML file. Currently I am doing this by simply walking through the rows and columns, manually writing the tr and td tags.

All is good for now.

I now have to export this xamGrid without ever showing it to the user. My customer just wantsa the ability to quietly create  a report with no UI. As I said, if I show the grid to the user and then output it, no problem. I can create a grid and set it's ItemSource but the data is never filled in if the xamGrid is not rendered. I have manually created the columns and the column headers appear, but none of the bound data shows up.

Is there any way to get the grid to render itself without being shown to the user?

Thank you

 

Steven

  • 40030
    Offline posted

    Hi Steven, 

    Why are you using the XamGrid for this?

    Couldn't you just walk through your data?

    The XamGrid won't initialize it's Data until the control is Loaded. Which means it won't init its data until its added to the VisualTree. Now you could put it in the visualTree in a panel, with a size of (0,0) however, i'm not really sure what you're trying to accomplish, as thats going to be a lot of overhead, than just walking through your data directly. 

    -SteveZ