|
-
Apr 16th, 2002, 03:58 AM
#41
Originally posted by WiseGuy
Muddy code does work, I'm just trying to find out when to trigger the code :S
WiseGuy
Try mine
-
Apr 16th, 2002, 04:46 AM
#42
Thread Starter
Lively Member
Everything works fine now, This is how my code looks like right now:
VB Code:
Set cn = New ADODB.Connection
cn.ConnectionString = "Data Source=spijsDB;User ID=spijs;Password=spijs;"
cn.Open
Set rs = New ADODB.Recordset
grdDataGrid.Refresh
cn.CursorLocation = adUseServer
strSQL = "select a.artikelID, a.productcode, a.artikelnaam, b.typecode,
TO_CHAR(a.tolerantiepluskg), c.celnaam, TO_CHAR(a.natdroogverh)
from artikelen a, artikeltype b, cellen c"
rs.Open strSQL, cn
Set grdDataGrid.DataSource = rs
grdDataGrid.Refresh
grdDataGrid.TextMatrix(0, 1) = "Nummer"
grdDataGrid.TextMatrix(0, 2) = "Product Code"
grdDataGrid.TextMatrix(0, 3) = "Artikel"
grdDataGrid.TextMatrix(0, 4) = "Artikeltype"
grdDataGrid.TextMatrix(0, 5) = "Tolerantie (KG)"
grdDataGrid.TextMatrix(0, 6) = "Celnaam"
grdDataGrid.TextMatrix(0, 7) = "Nat/Droog verhouding"
I stuck my head out of the window and got arrested for mooning!
This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
O/S: Windows XP Professional (dutch)
Internet: Cable (1Mbit connection)
-
Apr 16th, 2002, 07:36 AM
#43
PowerPoster
Originally posted by mendhak
I mean
how can you bind a flexgrid.
(forget the runtime part)
Sir Frog,
When the Datasource property is set, I consider the grid "bound". Of course I could very well have my terminology screwed up.
I mean, after all, I am just a bluesman impersonating a programmer.
-
Apr 16th, 2002, 07:40 AM
#44
-
Apr 16th, 2002, 07:54 AM
#45
PowerPoster
-
Apr 16th, 2002, 08:01 AM
#46
Originally posted by Muddy
Sir Frog,
After reading your post and sig I am convinced of 2 things:
1) you are stoned
2) i am stupid
LOL
My MSFlexGrid has a datasource property. So does WiseGuy's ... check out the code he posted
Answer: 1. I'm stoned. (just a bit)
I checked AGAIN... and for some strange reason, it's THERE!!! (conspiracy?????)
Just one more quick question, if you're still looking at this post...
the datasource applies for things like ADODC and the normal datacontrol, right?
Hope you're looking, otherwise, I'll put up a new post after 10 minutes if you don't answer.
-
Apr 16th, 2002, 08:07 AM
#47
PowerPoster
Originally posted by mendhak
(btw, lara stays here! )
Hang on and I'll wake her up and give her the message 
[QUOTE]Originally posted by mendhak
(Just one more quick question, if you're still looking at this post...
the datasource applies for things like ADODC and the normal datacontrol, right?
those or an ADO Recordset ...
-
May 2nd, 2003, 09:09 PM
#48
Muddy, the below works fine but it doens't save any changes I make in the MSFlexGrid. How do you save any changes??
Lintz.
Originally posted by Muddy
hmm, this works ... got if off a thread ... dont remeber from who
but you can edit the msflexgrid ... give it a try
VB Code:
Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
With MSFlexGrid1
Select Case KeyAscii
Case 8: 'IF KEY IS BACKSPACE THEN
If .Text <> "" Then .Text = _
Left$(.Text, (Len(.Text) - 1))
Case 13: 'IF KEY IS ENTER THEN
Select Case .Col
Case Is < (.Cols - 1):
SendKeys "{right}"
Case (.Cols - 1):
If (.Row + 1) = .Rows Then
.Rows = .Rows + 1
End If
SendKeys "{home}" + "{down}"
End Select
Case Else
.Text = .Text + Chr$(KeyAscii)
'write your own keyascii Validations under
'commented lines
Select Case .Col
Case 0, 1, 2:
'if (your condition(s)) then
'accept only charectors
'Else
' keyascii=0
'End If
Case Else:
End Select
End Select
End With
End Sub
-
May 2nd, 2003, 10:48 PM
#49
PowerPoster
I suppose you would have to write the cells to some sort of file (delimited text, mdb, csv. etc)
-
May 3rd, 2003, 12:26 PM
#50
New Member
-
May 4th, 2003, 12:31 AM
#51
The back end of my app is run by an Access DB. Once I populate the MSFlexGrid how do I then save any changes to a particular record in my DB??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|