Just started learning vb. I want to know to directly input data to msflexgrid. can someone please give me a simple sample of it. thanks.
Printable View
Just started learning vb. I want to know to directly input data to msflexgrid. can someone please give me a simple sample of it. thanks.
The MSFlexGrid and MSHFlexGrid controls are meant for displaying output. They do not accept input. People sometimes develop hacks though where they float a TextBox over cells and resize it to simulate Grid input.
The DataGrid is the most up to date grid control that allows user input and editing naturally.
What version of VB are you using? This section of the forum is for VB Classic (not .Net) which has been unsupported for some time. If there is no particular reason why you are learning VB (classic) you might want to consider going for VB.Net instead.
thank you for the replies. I am using vb6 sp6. I really dont know if I am pertaining to msflexgrid but I am pertaining to such grid wherein I can manually and directly input record on one cell and perform or show some calculations on the other cell on another column.
kindly direct me.. I am just beginning to learn vb6 just this week. no plans yet of learning vb.net
You might want to think about switching then. By the time you learn VB6 to be able to do anything more practical with it, demand for it will drop down to a minimum.
guys, I still need a sample about msflexgrid. I want to know in simple way how to perform calculations there and how to add new record, row and delete record/row. kindly help me guys.
I have gone over searching on the code bank but I cant seem to find one. kindly help out guys.
This is how to place text in a cell - in this case, row 1, column 2:
This is just for an unbound FlexGrid, not connected to a datasource.Code:Dim iRow As Integer
Dim iCol As Integer
iRow = 1
iCol = 2
MSFlexGrid1.TextMatrix(iRow, iCol) = "Hello!"
thanks for the reply. how about if it is bound and connected to a datasource? and can I also get sample for sample calculation please. thanks.
You can use TextMatrix to get the values from any of the cells and then do your calculations. To bind the grid to a datasource you could use the ADO data control. If you search the web for ADO and Msflexgrid you will find many examples.
paulg4ije, I have searched the google and here about msflexgrid. also in pscode. but I havent got good results that I wanted about textmatrix. can you possiblly give me another sample for this textmatrix please. thanks in advance.