Home Forums WPF controls Xceed DataGrid for WPF Binding to IList<>?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #22553 |

    I’m having trouble binding the grid to an IList<>. I know the Ilist is working because i can bind a label. This is what i have so far:

    <xcdg:DataGridControl x:Name=”storeGrid”>
    <xcdg:DataGridControl.Columns>
    <xcdg:Column DisplayMemberBinding=”{Binding Path=Code}”>
    </xcdg:Column>
    <xcdg:Column DisplayMemberBinding=”{Binding Path=Name}”>
    </xcdg:Column>
    <xcdg:Column DisplayMemberBinding=”{Binding Path=Id}” Visible=”False”>
    </xcdg:Column>
    </xcdg:DataGridControl.Columns>
    </xcdg:DataGridControl>

    I have no more ideas. Please help. thank you. I am very stupid in Xaml. I only been working with it for a little over a month.

    Imported from legacy forums. Posted by deren (had 4174 views)

    Xceed Support
    Member
    Post count: 5658

    You can find the information on how to bind the DataGridControl into the Xceed DataGrid for WPF documentation…

    Particularly in the Basic Concepts \ Manipulating Data section (and in the how-to section).

    <a href=”http://doc.xceedsoft.com/products/XceedWpfDataGrid/”>Here is a link to the documentation.</a>

    Imported from legacy forums. Posted by Marcus [Xceed] (had 302 views)

    User (Old forums)
    Member
    Post count: 23064

    i been looking at it for a while now. Thanks anyways.

    Imported from legacy forums. Posted by deren (had 295 views)

    Xceed Support
    Member
    Post count: 5658

    Sorry then, I’ll give you another pointer:

    <DataGridControl ItemsSource=”{Binding ElementName=myWindow,Path=MyList}”/>

    This assumes that the DataGridControl is contained in a window with x:Name=myWindow and that the window has a property called MyList, which would be your IList<>.

    If you had problems finding the information you needed in the documentation, we are interested in knowing your opinion on how you think we can make it clearer.

    Hope this helped.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 264 views)

    User (Old forums)
    Member
    Post count: 23064

    I think thats what i should be using but im not sure since my ilist is actually refrencing to a web service or somthing.
    if this works :
    <Label.Content>
    <Binding Path=”Name”></Binding>
    </Label.Content>
    shouldnt this work too?:
    <xcdg:DataGridControl x:Name=”storeGrid”>
    <xcdg:DataGridControl.Columns>
    <xcdg:Column DisplayMemberBinding=”{Binding Path=Name}”>
    </xcdg:Column>
    </xcdg:DataGridControl.Columns>
    </xcdg:DataGridControl>

    Imported from legacy forums. Posted by deren (had 571 views)

    User (Old forums)
    Member
    Post count: 23064

    nvm im stupid and it still dont work.

    Imported from legacy forums. Posted by deren (had 5124 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.