Deleting dataGrid columns via code

Peter Haworth pete at lcsql.com
Tue Jul 22 18:15:28 EDT 2014


Not sure it is Phil.  The visible columns property is just a list of the
visible column names so there'd still be some sort of repeat loop similar
to yours to get rid of the unwanted stuff.

Hard to know the best way to do it without knowing more about how Skip
wants to export the data but simplest might be adjusting the
dgProps["columns"] as long as he can recover them again.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Tue, Jul 22, 2014 at 2:42 PM, Phil Davis <revdev at pdslabs.net> wrote:

> This is much better than my brute force approach!
>
> Phil
>
>
>
> On 7/22/14, 1:44 PM, Peter Haworth wrote:
>
>> And you might still be able to hide them depending on how you are getting
>> the data to export.  There's a dgProps["visible columns"] property you
>> could use to get only the columns you want for export.
>>
>> Pete
>> lcSQL Software <http://www.lcsql.com>
>> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
>> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
>>
>>
>>
>> On Tue, Jul 22, 2014 at 1:03 PM, Magicgate Software - Skip Kimpel <
>> skip at magicgate.com> wrote:
>>
>>  Mike, can't just hide them as the data will then be exported out to a
>>> file.
>>>
>>> SKIP
>>>
>>>
>>> On Tue, Jul 22, 2014 at 3:56 PM, Mike Kerner <MikeKerner at roadrunner.com>
>>> wrote:
>>>
>>>  the easiest way might be to just hide the columns you don't want to have
>>>> show - use dgColumnIsVisible[column], that way you don't have to screw
>>>> around with your data.
>>>>
>>>>
>>>> On Tue, Jul 22, 2014 at 3:30 PM, Magicgate Software - Skip Kimpel <
>>>> skip at magicgate.com> wrote:
>>>>
>>>>  Good afternoon,
>>>>>
>>>>> I have a datagrid that I am reading into tTempText.  Once it has been
>>>>>
>>>> read
>>>>
>>>>> in, I need to delete column X, column Y and column Z.
>>>>>
>>>>> X, Y and Z constantly change but I have those numbers before I start
>>>>> processing the request.
>>>>>
>>>>> Suggestions to do this properly?
>>>>>
>>>>> SKIP
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>
>>>>>
>>>>
>>>> --
>>>> On the first day, God created the heavens and the Earth
>>>> On the second day, God created the oceans.
>>>> On the third day, God put the animals on hold for a few hours,
>>>>     and did a little diving.
>>>> And God said, "This is good."
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>  _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>>  _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> --
> Phil Davis
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list