This is a migrated thread and some comments may be shown as answers.

Cannot like the example grouping

3 Answers 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hengky
Top achievements
Rank 1
Hengky asked on 10 Oct 2019, 08:02 AM

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()

 

 

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 Oct 2019, 10:39 AM

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.
0
Hengky
Top achievements
Rank 1
answered on 10 Oct 2019, 10:50 AM

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

0
Accepted
Dimitar
Telerik team
answered on 11 Oct 2019, 06:13 AM

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.
Tags
GridView
Asked by
Hengky
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Hengky
Top achievements
Rank 1
Share this question
or