Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I add row to the grid and delete row from grid like excel styl

Status
Not open for further replies.

kosta

Programmer
Feb 9, 2001
186
CA
Hi friends,
I have some questions,

1-How can I add row to the grid and delete row from grid like excel style
(I want to design my form without wizard) by the way how should I
write the code for "add" and "delete" button

2-and meanwhile when I want to add a new record to the grid how can I
give autonumber for exp.named refno field (it must be each time ascendig) 1,2,3..

3-what should I write for code to the these buttons (top,prev,next,last,add,delete) with
specially for add and delete button

Kosta,
 
Hi Kosta,

I think the lack of response to your post is due to the fact that you're asking too many questions, and the questions are too general. It's as if you are asking for a programming lesson.

Try being more concise, more specific.

Jim
 
Hello, Kosta!

Glad to meet you here!

1. I'm sure you know that the grid is a "mirror" for undelying table or view. So, if you want to add a row, you have to insert a record in the undelying table, then refresh the grid. If you have an index set, this will make your life worse, because the new, blank record will be first (or last), depending on the index. So, I strongly suggest to remove the order using "SET ORDER TO" then insert the record at the desired position. There are more than one ways to optimize this issue, but is up to you.

2. Sorry, but I really don't understand what you want to do.

3. Try to use the samples (check your help file) or open the Component Gallery and add the class to your project. Subsequently, you can alter the code from the desired buttons.

Hope this helps,
Grigore Dolghin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top