change column width in list view

285 views
Skip to first unread message

james...@windstream.com

unread,
Feb 13, 2015, 3:34:32 PM2/13/15
to xata...@googlegroups.com
I am new to xataface and have spent a couple days looking through documentation, the forum and the web in general but haven't yet found a resolution. please help. I have a field that can be over 100 chars. When I get the default list view, all columns are the same width which appears to be about 13 chars. I tried to include a screen capture but cannot. It will wrap that long column for up to 6 lines which causes the entire row to be 6 lines long. The 6 lines is not enough to display the entire column value. I've tried the following, one at a time with no luck.
 
fields.ini
 
 [Text]
#widge:atts:size = 80
#widget:atts:style="width: 200px"
vocabulary = Text
 
I tried table delegate with
 
<?php
class tables_Alarms {
        function Text__renderCell (&$record) {
                return '<div style="width: 300px">'.$record->display('Text').'</div>';
        }
}
?>
 
Which caused it to display "2" for each row instead of the Text string that is in the DB.
 
I guess first question is "what did I do wrong in the renderCell attempt?". The second question is how can I widen that column so it shows the entire string with minimal wrapping?
 
Thanks for any hints, tips etc.
 

Steve Hannah

unread,
Feb 13, 2015, 5:36:41 PM2/13/15
to xata...@googlegroups.com
I think your fields.ini file may not be picked up properly because you are using the "#" character -- presumably to comment out the line.  You should use ";" instead for comments.
That will fix the issue with "2" being displayed.

I think you're on the right track for changing the size.  (I think that should work).  You might also want to look at a pure CSS approach. 

Steve

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
Visit this group at http://groups.google.com/group/xataface.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/425f0703-4035-487e-9455-618370fb5473%40googlegroups.com.



--
Steve Hannah
Web Lite Solutions Corp.

Witek, James Jay

unread,
Feb 16, 2015, 11:05:03 AM2/16/15
to xata...@googlegroups.com

Thanks Steve but that didn’t fix it. I changed “#” to “;” but am still getting 2 for the value of Text in the display. I remember reading something about changing CSS. Do you have a nice link for where to change CSS in xataface?

--
You received this message because you are subscribed to a topic in the Google Groups "Xataface" group.


This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.

Witek, James Jay

unread,
Feb 18, 2015, 10:27:17 AM2/18/15
to xata...@googlegroups.com

My bad. The DB field is text not Text. The fields.ini attributes were not needed and the delegate class just needed the case sensitive field name to be correct.

 

From: Witek, James Jay
Sent: Monday, February 16, 2015 11:05 AM
To: xata...@googlegroups.com
Subject: RE: [xataface] change column width in list view

 

Thanks Steve but that didn’t fix it. I changed “#” to “;” but am still getting 2 for the value of Text in the display. I remember reading something about changing CSS. Do you have a nice link for where to change CSS in xataface?

 

From: xata...@googlegroups.com [mailto:xata...@googlegroups.com] On Behalf Of Steve Hannah
Sent: Friday, February 13, 2015 5:37 PM
To: xata...@googlegroups.com
Subject: Re: [xataface] change column width in list view

 

I think your fields.ini file may not be picked up properly because you are using the "#" character -- presumably to comment out the line.  You should use ";" instead for comments.

--
You received this message because you are subscribed to a topic in the Google Groups "Xataface" group.

Reply all
Reply to author
Forward
0 new messages