I have a large text field that I only want to show the first 60 characters of on a grid.
How do I do that?
Alternatively the question might also be, how do I keep the row to only one line instead of expanding to fit all of lines of text in the attribute?
Thanks,
Jim
Show only first part of a large text field on a grid
-
- Posts: 303
- Joined: Wed Apr 22, 2015 11:44 pm
Re: Show only first part of a large text field on a grid
that must be an html field?
maybe 1 of these will work:
either have a copy of it in another field (using a rule) thats not marked as HTML, or use the new 8.1 function to make a calculated column and show that?
but an html field shown in regular text field will show all the html markup (looks ugly maybe to a user). a PATTERN_REPLACE could remove tags.
jaymer...
maybe 1 of these will work:
either have a copy of it in another field (using a rule) thats not marked as HTML, or use the new 8.1 function to make a calculated column and show that?
but an html field shown in regular text field will show all the html markup (looks ugly maybe to a user). a PATTERN_REPLACE could remove tags.
jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Show only first part of a large text field on a grid
if your using custom query you can use css style to show only part of the text
-
- Posts: 303
- Joined: Wed Apr 22, 2015 11:44 pm
Re: Show only first part of a large text field on a grid
Does the CSS Style only work with a custom query?
I am running this from a Tabbed section of a BO form.
I tried putting the following into the CSS Style for the Grid:
.k-grid tbody tr{ height: 50px;} .k-grid td{white-space: nowrap;}
But it didn't seem to have any effect.
I am running this from a Tabbed section of a BO form.
I tried putting the following into the CSS Style for the Grid:
.k-grid tbody tr{ height: 50px;} .k-grid td{white-space: nowrap;}
But it didn't seem to have any effect.
-
- Posts: 2418
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Show only first part of a large text field on a grid
In 8.1 I think you could use a dynamic column.
CHARS_FROM_LEFT(MyBO.MyString,60)
just a thought
CHARS_FROM_LEFT(MyBO.MyString,60)
just a thought
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 7532
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: Show only first part of a large text field on a grid
You can do it with a CSS for a standard query. But I forget the actual values off the top of my head - you can Google for them. The CSS you have tried doesn't seem right. It has something to do with "ellipsis"
Aware IM Support Team
Re: Show only first part of a large text field on a grid
Code: Select all
white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;
-
- Posts: 303
- Joined: Wed Apr 22, 2015 11:44 pm
Re: Show only first part of a large text field on a grid
mrbdrm, should this be entered in the custom css file or will it work by entering it directly into the CSS Style property of the Query?
-
- Posts: 303
- Joined: Wed Apr 22, 2015 11:44 pm
Re: Show only first part of a large text field on a grid
Mark, your dynamic column suggestion worked.
I think I still want to see if I can get the CSS Style suggestion to work too though because I can see some other uses for it.
I think I still want to see if I can get the CSS Style suggestion to work too though because I can see some other uses for it.
Re: Show only first part of a large text field on a grid
it will work directly with inline style .