Solved

FlexGrid additem

Posted on 2000-04-23
4
1,695 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

730 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