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
1420
xamGrid and ColumnLayout columns
posted

Ok, so I am opening a new topic with this issue

Hi, I am Marko

I am having a problem understanding how this works:

http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/handling-hierarchical-data-sets

Can someone please put here some sample project with Access database (I am using SQL 2008) so that I can see how do I get data from the database into the class objects and the into grid. I am asking this cause I can't understand this part with binding data to the columns:

Text="{Binding Source={StaticResource Strings} , Path=XWG_OrderDetails_Discount}"

This is how I load data into grid from database: I make new class "Users" and make method in service "GetUsers" that executes sql query and gets data from db onto list of objects of "Users" class and returns that list. When execution of the service method is completed I do this xamGrid1.ItemsSource = e.Result; and grid displays data.

How is this "http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/handling-hierarchical-data-sets" different ? comparing to the my method described above??

PS.  Can someone please put here some sample project with Access database.

Please help me resolve this issue,

Best regards,

Marko

Parents Reply
  • 1420
    posted in reply to Ekaterina Staneva

    Hi.

    That worked, thanks.

    Here is how it looks:

     Now, my problem is all those white gaps between expansion indicator cells and among parent rows. How do I get rid of those? Is there some padding to be set to 0 in style of expansion indicator cells ?? maybe ? Both heights are set  to 14px (parent row height and expansion indicator height). Here is how I set the style of parent rows:

    Style styleKomentarNaslov = new Style(typeof(CellControl));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.BackgroundProperty, new SolidColorBrush(Colors.Red))); //230, 255, 230 84, 255, 244
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.ForegroundProperty, new SolidColorBrush(Color.FromArgb(255, 255, 255, 255))));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.PaddingProperty, "0,0"));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.FontFamilyProperty, new FontFamily("Arial")));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.FontSizeProperty, "11"));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.VerticalAlignmentProperty, "Top"));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.VerticalContentAlignmentProperty, "Center"));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.HeightProperty, "14"));//20
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.CursorProperty, "Hand"));
    styleKomentarNaslov.Setters.Add(new Setter(CellControl.FontStretchProperty, "SemiCondensed"));

    So padding among parent rows is set to 0. I think only problem now is padding of those indicator cells.

    Marko

     

     

Children