Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Sajan Jacob
  Where is Sajan Jacob?
 mumbai
 India
 Sajan Jacob
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: GRID INIT Event - update
Thread ID: 311074 Message ID: 311085 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Tuesday, June 28, 2011 5:16:55 PM         
   


> > Hi
> > I have a form with GRID with graph settings and a combo box for month selection.
> > I would like to run again the INIT event which defined for grid when the user click on the month combo box.
> > Please find the attached screen shot for more clarifications.
> >
> > Sajan Jacob
> >
> >
>
> Hi Sajan,
>
> I surmise that you have some kind of records filtering (i.e. either SET FILTER TO or SQL SELECT statement) in your Grid.Init procedure, and you want to run this procedure to refresh the grid's contents. There are at least two ways to achieve this goal:
>
> 1. Place THISFORM.MyGrid.Init() call in the cboMonth.InteractiveChange event procedure.
>
> 2. Move the code that fills out this grid control into a custom method of your form (let's call it GridUpdate) and call this method (like THISFORM.GridUpdate(nMonth)) whenever you need it. (I presume that you want to show in this grid some transactions that were closed on a given month.)
>
> I, personally, would rather go with the p. 2, just because there may be some other commands in the Grid.Inite procedure that are, at least, unnecessary for just updating the grid (let alone unwanted from the end user's perspective).
>
> HTH.
>
> Regards,
>
> Ilya



Hi Ilya
Firstly I had tried with your method 2, since its getting error , i tried with method also.
its getting stopped in the particular line i mentioined in the previous reply
 For xx=0 To 200
	Thisform.grid1.column4.AddObject("ctrShape"+Transform(xx),"Container")
	jssObj=Evaluate("thisform.grid1.column4.ctrShape"+Transform(xx))


ENTIRE THREAD

GRID INIT Event - update Posted by Sajan Jacob @ 6/28/2011 4:20:17 PM
RE: GRID INIT Event - update Posted by Cetin Basoz @ 6/28/2011 4:48:50 PM
RE: GRID INIT Event - update Posted by Sajan Jacob @ 6/28/2011 5:02:06 PM
RE: GRID INIT Event - update Posted by Cetin Basoz @ 6/28/2011 11:09:35 PM
RE: GRID INIT Event - update Posted by Sajan Jacob @ 6/29/2011 4:23:37 AM
RE: GRID INIT Event - update Posted by Ilya Rabyy @ 6/28/2011 5:04:29 PM
RE: GRID INIT Event - update Posted by Cetin Basoz @ 6/28/2011 11:04:25 PM
RE: GRID INIT Event - update Posted by Samir H. @ 6/28/2011 7:07:21 PM
RE: GRID INIT Event - update Posted by Cetin Basoz @ 6/28/2011 11:10:17 PM
RE: GRID INIT Event - update Posted by Ilya Rabyy @ 6/28/2011 11:34:13 PM
RE: GRID INIT Event - update Posted by Cetin Basoz @ 6/29/2011 12:35:54 PM
RE: GRID INIT Event - update Posted by Samir H. @ 6/29/2011 4:17:16 AM
RE: GRID INIT Event - update Posted by Mike Gagnon @ 6/28/2011 11:57:13 PM
RE: GRID INIT Event - update Posted by Ilya Rabyy @ 6/29/2011 4:30:16 PM
RE: GRID INIT Event - update Posted by Samir H. @ 6/29/2011 6:01:39 PM
RE: GRID INIT Event - update Posted by Ilya Rabyy @ 6/28/2011 4:55:01 PM
RE: GRID INIT Event - update Posted by Sajan Jacob @ 6/28/2011 5:16:55 PM
RE: GRID INIT Event - update Posted by Ilya Rabyy @ 6/28/2011 6:12:43 PM
RE: GRID INIT Event - update Posted by Tamar Granor @ 6/28/2011 10:40:21 PM