DataGrid shows no records

A place for users and developers of the Xataface to discuss and receive support.

DataGrid shows no records

Postby gsilvis » Sat Dec 26, 2009 6:51 pm

I'm trying out the DataGrid feature. Followed instructions and see the "Grid" tab. That page shows the a record count matching what was on the list tab. But there is no data displayed. I'm logged in as ADMIN.

What did I miss?

Thanks
George
gsilvis
 
Posts: 20
Joined: Sat Dec 05, 2009 4:52 pm

Re: DataGrid shows no records

Postby gsilvis » Sun Dec 27, 2009 7:41 am

Some more detail on the no-records problem. The error-console shows:

"Not well-formed" and points to the "A" in "Bundle=A" in the first line below:
Code: Select all
<datastore>
   <row id="Cards?Box=11B&Bundle=A&PDF=1&Page=1">
                        <CardImage></CardImage>
                     <Star>HD88189</Star>
                     <StdStar></StdStar>
                     <Class>D</Class>
                     <Notes></Notes>
                     <CardImage_mimetype>image/jpeg</CardImage_mimetype>

                     <other></other>
                     <Box>11B</Box>
                     <Bundle>A</Bundle>
                     <PDF>1</PDF>
                     <Page>1</Page>
            </row>
This might be related to my Cards\Cards.php entry of:
Code: Select all
        // combine Box/Bundle/PDF/Page in the selection lists
   function getTitle(&$record){
      return $record->val('Box').' '.$record->val('Bundle').' '.$record->val('PDF').' '.$record->val('Page');
   }
   function titleColumn(){
      return "CONCAT(Box, ' ', Bundle, ' ', PDF, ' ', Page)";
        }


Where Box and Bundle are text (VarChars and PDF and Page are TinyInts and together the 4 fields combine for the Primary Key. I'm thinking this is the problem, combining the chars and the ints.

- Is this right?
- Is there a work around?
- I have no problem with making PDF and Page varchars. Can that be done without destroying the records already in the database? That is, I would need 24 converted to "24". I'll try an experiment on a scratch db.

Thanks
George
gsilvis
 
Posts: 20
Joined: Sat Dec 05, 2009 4:52 pm

Re: DataGrid shows no records

Postby gsilvis » Tue Dec 29, 2009 4:19 pm

I tried making all 4 fields of the primary key varchars; no joy. Same fault.

Maybe it just doesn't like multi-field primary keys.

George
gsilvis
 
Posts: 20
Joined: Sat Dec 05, 2009 4:52 pm

Re: DataGrid shows no records

Postby gsilvis » Wed Dec 30, 2009 7:30 am

I changed to a single-field primary key and data now displays in the grid. Problem now is that it never saves the entries. The only other anamolies is that it displays 2 integer fields (one which shows values of "false") and it doesn't display a varchar field.

Suggestions?
George
gsilvis
 
Posts: 20
Joined: Sat Dec 05, 2009 4:52 pm

Re: DataGrid shows no records

Postby shannah » Wed Dec 30, 2009 10:49 am

Thanks for doing the research to narrow the first problem down to multi-field primary keys (although this should work).

Check out this thread and see if the solution woks for you.
viewtopic.php?f=4&t=5073&hilit=datagrid
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 19 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved