Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17



Posted on 2003-11-19
Medium Priority
Last Modified: 2012-08-13
i success insert data into MSFlexgrid field. but leading space occur for each field. how should i remove the leading space and insert data located in left side.

i use LTRIM function to remove leading spaces but not working.
Question by:cyseng10
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

Expert Comment

ID: 9784672
could u provide the code u r using to insert the data ?

LVL 18

Expert Comment

ID: 9786446
Format the field for text only. Will post back later to tell you how you can do this.
LVL 18

Expert Comment

ID: 9788181
If that doesn't work, please post the part of the code where you receive the data, and where you insert it into the grid.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 9792257
i read data from text file and using Additem function insert data into MSFlexGrid Field.

the data might long. when i insert into field. i can't disply full length of data. how do i apply scrollbar to view full length of data?

the CellAlignment function and convert to text format is not working.
LVL 18

Expert Comment

ID: 9796003
This will adjust the size of the cell to two lines (You may have to fine-tune the rowheight property).
You might also want to make checks to see if the 2nd line won't reduce the colwidth from a previous text entry, but basically, that should take care of the display. Note that you can also divide it by 3 lines, etc. Just adjust as desired.
You can also make a variable to test the longest text length being inserted, and in the end adjust the colwidth.
Another possibility is, after testing the longest length being inserted, test it in a switch case statement, and from zero to value x, divide it in 2 lines, from x+1 to y, divide in 3, etc... Again, adjust as you desire.

Now, about the text part, it would be better if you could post the code for getting the text from the file, and for putting into the MSFlexgrid. That way, we could see how you are doing it, correct any possible mistakes along the way, and get a better understanding of how it works. If you could post a sample of the text file as well, it would be helpful (just a few lines should be enough).

Author Comment

ID: 10008980
Please closed the question as found solution by myself.

thank you for replying.

Accepted Solution

Computer101 earned 0 total points
ID: 10025284
PAQed, with points refunded (50)

E-E Admin

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Six Sigma Control Plans

722 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