Make a simple grid with cell-button |
Post Reply |
Author | |
francamato
Newbie Joined: 25 July 2013 Location: Italy Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 01 August 2013 at 12:08pm |
Good morning,
anyone has an example with sources to implement a very simple grid, like the one in the attached image. Is a few weeks I use this Suite Pro 2013, and this component is really powerful and complete, but I can not find the way to make one or more columns fixed (button with icon) before the 0th column of datagrid... I have made this code, but the result is very disappointing '------------------------------------------------------- Private Sub Form_Load() Dim i As Integer Dim j As Integer With ReportControl .Move 120, 120 .AutoColumnSizing = False .AllowColumnRemove = False .FocusSubItems = True .ShowRowFocus = True .AllowEdit = True .BorderStyle = xtpBorderFlat .EditOnClick = True .PaintManager.FixedRowHeight = False .PaintManager.ColumnStyle = xtpColumnFlat .PaintManager.VerticalGridStyle = xtpGridSolid .PaintManager.FreezeColsDividerStyle = xtpReportFixedRowsDividerBold .PaintManager.FreezeColsDividerColor = RGB(90, 90, 90) .PaintManager.GridLineColor = RGB(140, 140, 140) .PaintManager.GrayIfDisable = False .PaintManager.HighlightBackColor = RGB(120, 130, 100) For i = 0 To 5 .Columns.Add i, "Col " & Chr$(65 + i), 150, False If i = 0 Then .Columns(i).Alignment = xtpAlignmentCenter .Columns(i).Sortable = False .Columns(i).AllowRemove = False .Columns(i).AutoSize = False .Columns(i).Editable = False .Columns(i).Resizable = False .Columns(i).Width = 100 .Columns(i).AllowDrag = False Else .Columns(i).Sortable = True .Columns(i).Editable = True .Columns(i).Resizable = True End If Next i For i = 0 To 20 With .Records.Add .AddItem Chr$(65) & i .Item(0).BackColor = ReportControl.PaintManager.CaptionBackColor Set Button = .Item(0).ItemControls.AddButton(-1) Button.Enable = True Button.Alignment = xtpReportItemControlUnknown For j = 1 To 5 .AddItem Chr$(65 + j) & i Next j End With Next i .Populate .FreezeColumnsCount = 3 .DisableReorderColumnsCount = 1 End With End Sub Private Sub ReportControl_ColumnOrderChangedEx(ByVal Column As XtremeReportControl.IReportColumn, ByVal Reason As XtremeReportControl.XTPReportColumnOrderChangedReason) If Reason = xtpReportColumnOrderChanged Then If Column.Index > ReportControl.FreezeColumnsCount Then Column.Move (Column.ItemIndex) ReportControl.Redraw End If End If End Sub '------------------------------------------------------- I hope it is possible to do this very simple thing , thank you in advance A.Francesco |
|
Product: Xtreme SuitePro (ActiveX) 16.2.0
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |