|  | 
| adding control - please help | 
| Post Reply   | 
| Author | |
| rishal01   Newbie   Joined: 16 July 2011 Location: Indonesia Status: Offline Points: 2 |  Post Options  Thanks(0)  Quote  Reply  Topic: adding control - please help Posted: 17 July 2011 at 12:21am | 
| 
   Hi everybody, i'm trying using report control... to add my custom date control within cells. i dont want using date picker. uploads/6904/UserControl1.rar  . but it seem codejock report control would allow it. can any body give some clue ? ... later i'm trying some code that mimics my usercontrol like this : Private Sub ListEntries_InplaceEditChanging(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, NewValue As String, Cancel As Boolean) ' If Len(NewValue) = 2 Then SendKeys "{-}" If Len(NewValue) = 5 Then     If InStr(6, NewValue, "-", vbTextCompare) = 0 Then SendKeys "{-}" End If End Sub but this code looks ugly when user entered backspace... is there better idea ?? Thanks. | |
|  | |
| Aaron   Senior Member   Joined: 29 January 2008 Status: Offline Points: 2192 |  Post Options  Thanks(0)  Quote  Reply  Posted: 19 July 2011 at 3:01pm | 
| 
   Hi,
 Here's a small demo for positioning DateTimePicker and your own UserControl.  First you have to decide what you want to use because you need some 'workaround' to save value to reportItem. Let me know which one you like best and I will see what I can do. Good luck   | |
| 
     Product: Xtreme SuitePro (ActiveX) version 15.0.2 
 Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... | |
|  | |
| rishal01   Newbie   Joined: 16 July 2011 Location: Indonesia Status: Offline Points: 2 |  Post Options  Thanks(0)  Quote  Reply  Posted: 20 July 2011 at 4:45am | 
| 
    hi  Aaron, i dont know what to say ... you help me a lot .... thank you so much ... many ... many thank you          I did not realize was a solution to this problem is very simple. but for those who do not know like me that will make the headache. once again thank you very much Private Sub wndReportControl_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean)    Dim l As Long     Dim t As Long     Dim b As Long     Dim r As Long   Me.wndReportControl.Rows(NewRow.Index).GetItemRect NewItem, l, t, r, b   With Me.DateTimePicker1         .Move l, t, r - l, b - t         .ZOrder 0         .Visible = NewColumn.Index = 2 'only use third column for showing datepicker         .Value = NewItem.Value     End With  End Sub  just add this code then the problem is resolved. Private Sub DateTimePicker1_Change()      wndReportControl.FocusedRow.Record(2).Value = DateTimePicker1.Value      wndReportControl.Populate End Sub | |
|  | |
| JamGodz   Groupie     Joined: 25 February 2010 Status: Offline Points: 67 |  Post Options  Thanks(0)  Quote  Reply  Posted: 12 October 2011 at 7:26pm | 
| 
   it take me two days to find this solution thanks to you guys! But i have a problem... when i scroll down/up the DatePicker did not go with item. thanks... | |
|  | |
| 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 |