Hi,
Can anyone tell me how to enter data into VSFlexGrid at runtime? Kindly send me coding of that.
11 4714
The following code will fill the first 5 rows × 4 columns block of cells with numbers from 1 through 20.
[PHP]Private Sub VSFlexGrid1_Click()
With Me.VSFlexGrid1
For i = 1 To 5
For j = 1 To 4
.Row = i
.Col = j
.Cell(flexcpText, i, j) = (i - 1) * 4 + j
Next j
Next i
End With
End Sub[/PHP]
Hi,
Can anyone tell me how to enter data into VSFlexGrid at runtime? Kindly send me coding of that.
I don't know which version of VSFlexGrid you have. But i usually use VSFlexGrid Pro 7.0.
To enter data into VSFlexGrid, you should set EditAble property to 1-flexEDKbd or 2-flexEDKbdMouse.
If that property = 2, you can click mouse on cell, and then enter data.
To enter data by code, you can use TextMatrix(row,col) method
example: VSFlexGrid1.TextMatrix(1,1) = "your data". Remember add at least one row and one col to enable enter data
I don't know which version of VSFlexGrid you have. But i usually use VSFlexGrid Pro 7.0.
To enter data into VSFlexGrid, you should set EditAble property to 1-flexEDKbd or 2-flexEDKbdMouse.
If that property = 2, you can click mouse on cell, and then enter data.
To enter data by code, you can use TextMatrix(row,col) method
example: VSFlexGrid1.TextMatrix(1,1) = "your data". Remember add at least one row and one col to enable enter data
Thanks. Now I am able to enter data in VSFlexGrid. After entering data into Grid, I want to save entered data into table. How to do coding of that? Kindly send me coding
Thanks. Now I am able to enter data in VSFlexGrid. After entering data into Grid, I want to save entered data into table. How to do coding of that? Kindly send me coding
drive to loops one for row and another for col
adjust the qry
and execute it
Thanks. Now I am able to enter data in VSFlexGrid. After entering data into Grid, I want to save entered data into table. How to do coding of that? Kindly send me coding
what kind of table will you save your data.
-
-
conn.begintrans
-
with Flex
-
for i=.fixedrows to .rows-1
-
ssql="Insert into <tblname> (<filed1>,<Filed2>) values (
-
for j=.fixedcols to .cols-1
-
ssql=ssql & .textmatrix(i,j) & ""
-
if j<>.cols-1 then ssql=ssql & " , "
-
next
-
ssql=ssql & " )"
-
conn.execute ssql
-
next
-
end with
-
conn.committrans
-
like it
Try it
Good Luck
Just a note to let you know, I've changed the title of the thread to something more appropriate than "help me soon".
MODERATOR
've u tryed the code?
I am able to enter data by setting its Editable property. Now listen my problem carefully.
I have kept only one row in grid at runtime. Now after entering one record, i want new row to be added dynamically so i can enter more data. How to do that? Plz let me know.
I am able to enter data by setting its Editable property. Now listen my problem carefully.
I have kept only one row in grid at runtime. Now after entering one record, i want new row to be added dynamically so i can enter more data. How to do that? Plz let me know.
Now listen carefully
use flex.rows=flex.rows+1
for that
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Roberto Herrera |
last post by:
Hello all,
I am also having problems with the vsflexGrid.
I can't make work the comboliste that I loaded into the vsFlexGrid
Apparently the combolist is loaded, but when I make a click in the...
|
by: Shailja |
last post by:
Hi,
Can anyone tell me how to add new row dynamically at runtime in VSFlexGrid?
I have only one row in my grid at runtime. Now after adding one row, i want second row to be dynamically add in...
|
by: Shailja |
last post by:
Hi,
Can anyone tell me how to set tab settings in VSFlexGrid? Control should move from one column to other. What property i need to set for that?
Kindly let me know.
|
by: Shailja |
last post by:
Hi,
My form contains VSFlexGrid. There are 10 columns in it. I want to put combobox in each cell of column 2. I want to bind that combobox to database also. How to code that?
Kindly help me. I...
|
by: Shailja |
last post by:
Hi,
I have kept combobox in VSFlexGrid. Now I want to make height and width of combo box to same height and width of that cell. How to do that?
kindly help me soon if you know the asnwer.
|
by: Shailja |
last post by:
Hi,
How to lock perticular cell of VSFlexGrid. Suppose I want to lock cell of Row 1 and column 2. How to do that?
Kindly let me know if u know.
|
by: Shailja |
last post by:
Hi,
Please go through the following code:
i = VSFlexGrid.Rows
i = i - 1
I am writting the statment VSFlexGrid.TextMatrix(i,0).
Above statment generates an error "Type Mismatch".
|
by: Shailja |
last post by:
hello,
I want to lock particular cell of VSFlexGrid. How to do that?
I want to lock cell (Row1, Column 2).
Kindly let me know if u know the answer
|
by: Shailja |
last post by:
I am using VB. I have one form in my project. I have following fields in that form
1) Bill No
2) Bill Date
3) Combobox of Customer
4) Address of Customer
5) Drug License No1
6) Drug License...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |