problem with displaying categories in data grid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

problem with displaying categories in data grid

Post by keram » Tue Dec 17, 2013 4:18 am

Hello,

I'd like to display text lines according to different categories.
The data grid form for the categories does not display correctly - only check boxes are visible.
But using the same data grid form as for categories all the text lines on a second card are fully displayed.
See the attached stack.

Please let me know how to correct the code to display the categories fully.
Thanks.

keram
Attachments
TextLine Categories.zip
(11.32 KiB) Downloaded 144 times
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: problem with displaying categories in data grid

Post by keram » Tue Dec 17, 2013 12:40 pm

I've got some help with it and now it's solved with this code:

Code: Select all

set the dgData of group "mycategories_compact" to empty
   replace comma with tab in gSelectedCategories
   set the itemDelimiter to tab

   local tIndex = 1,tDataA
   repeat for each line i in gAllLines
      if item 2 of i is among the items of gSelectedCategories then 
         put item 1 of i into tDataA[tIndex]["Text"]
         put item 2 of i into tDataA[tIndex]["Category"]
         add 1 to tIndex
      end if
   end repeat
   set the dgData of group "mycategories_compact" to tDataA
keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Post Reply