Cannot like the example grouping

4 posts, 0 answers
  1. Hengky
    Hengky avatar
    7 posts
    Member since:
    Sep 2018

    Posted 10 Oct Link to this post

    Hello all... 

    plz help me i dont know whats wrong with my code ... i tried to follow the example given but my grid can not show like the example 

     

    this the code i write : 

                Using conn As New OleDbConnection(str)
                    conn.Open()

                    'Fill GridDetail
                    daDetail = New OleDbDataAdapter("Select TrProjectDtl.*, MstDetail.NamaDetail, MstBagian.NamaBagian " &
                                                    "FROM (TrProjectDtl INNER JOIN MstBagian ON TrProjectDtl.KodeBagian = MstBagian.KodeBagian) INNER JOIN MstDetail ON TrProjectDtl.KodeDetail = MstDetail.KodeDetail " &
                                                    "WHERE KodeProject='" & GridHeader.Rows(i).Cells(0).Value.ToString() & "' ORDER BY TrProjectDtl.KodeBagian, TrProjectDtl.KodeDetail", conn)

                    dsDetail = New DataSet
                    dsDetail.Clear()
                    daDetail.Fill(dsDetail, "TrDetail")
                    daDetail.Dispose()

                    Me.GridDetail.TableElement.BeginUpdate()

                    GridDetail.DataSource = (dsDetail.Tables("TrDetail"))

                    GridDetail.MasterTemplate.AutoExpandGroups = True
                    GridDetail.MasterTemplate.EnableFiltering = True
                    GridDetail.ShowGroupPanel = True
                    GridDetail.EnableHotTracking = True


                    Me.GridDetail.TableElement.EndUpdate(False)

                    'GridDetail.TableElement.CellSpacing = -1
                    'GridDetail.TableElement.TableHeaderHeight = 35
                    'GridDetail.TableElement.GroupHeaderHeight = 30
                    'GridDetail.TableElement.RowHeight = 25

                    'Me.GridDetail.GroupDescriptors.Clear()
                    Me.GridDetail.GroupDescriptors.Add(New GridGroupByExpression("KodeBagian as KodeBagian format ""{0}: {1}"" Group By KodeBagian"))

                    'GridHasil.BestFitColumns()

                    conn.Close()

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    2807 posts

    Posted 10 Oct Link to this post

    Hello Hengky,

    I have tested this and it works fine on my side. Would it be possible to remove the Begin/End Update methods, remove the line that disposes of the data set, and see if this is still not working?

    In addition, which version of the suite are you using?

    I am looking forward to your reply.

    Regards,
    Dimitar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Hengky
    Hengky avatar
    7 posts
    Member since:
    Sep 2018

    Posted 10 Oct in reply to Dimitar Link to this post

    Hello Dimitar 

    Thanks for reply... 

    i'm using 2016 Q1 .... 

    i have tried your suggestion ... and still doesn't work

     

    waiting for your reply .... 

     

    thanks

  4. Dimitar
    Admin
    Dimitar avatar
    2807 posts

    Posted 11 Oct Link to this post

    Hello Hengky,

    It still works with the specified version. I have attached my test project. Could you please check it and let me know what I need to change in order to reproduce this. 

    I am looking forward to your reply.

    Regards,
    Dimitar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top