General information
Category:
Forms & Form designer
>>>When I am using a grid with the record source as MYCURSOR, to keep the grid objects from being released when I issue a SELE....INTO CURSOR MYCURSOR statement to requery, I set mygrid.recordsource="" before the SQL , then restore recordsource to "MYCURSOR" after the statement.
>>>
>>>Here's the problem...I have customized columns, but when I set mygrid.recordsource to "", it sets all the columns recordsource to "" as well. I have to reassign them each time. Is there a better way to do this?
>>
>>That's normal. You could write this code into custom method 'RestoreGrid".
>Thats essentially what I did
I do this and I think it's the only way to avoid writing any code.
First I create a grid with the properties I want , then I save it as a class.
Then I run the SQL code I add the grid to my form.
So the only code I have to write is :
If type("myobject") = 'O' and not isnull(myobject)
removeobject('myobject')
endif
Hi, Alessio
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only