Solved

FlexGrid additem

Posted on 2000-04-23
4
1,693 Views
Last Modified: 2008-02-26
Hi i am using FlexGrid.additem method and it always results that the first row is always a blank row. Why does that happen ? Can anyone suggest anything ?
0
Comment
Question by:vbRetard
4 Comments
 
LVL 8

Expert Comment

by:stefanx
ID: 2742408
Uhmm, this should not happen. Are you sure that on initialization, your MSFlexgrid does not maybe have its Rows property set to 2?

Assuming that you have at least one Fixedrow, do the following int your Form_Load() sub :

MSFlexGrid1.Rows = 1

Then try you additems as before.
0
 

Author Comment

by:vbRetard
ID: 2742453
Yes i've tried that all but it still adds to the second row and leaves the first one blank.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 2742561
That's the way AddItem works for the flexgrid.  It adds a new row.  If you want to add text to an existing cell, you need to use .TextMatrix or .TextArray properties. These will add to the cell (Row, Col) that you specify.
0
 
LVL 6

Accepted Solution

by:
setiawan earned 15 total points
ID: 2742573
Hi vbRetard,

just try like this :

dim idx
idx = 1
MSFlexGrid1.addItem "abc" & chr(9) & "abc" & chr(9) ...., idx

note : use chr(9) as field delimiter in your grid
good luck

 danny
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question