Admin-on-REST: How can a label become 2 lines? - admin-on-rest

Is there an (easy) way to split the label in 2 lines? Or that would require a custom component?
<TextField label="This is a very long text label for the datagrid column" source="receptionProtocol" />
Thanks.

I'm no expert but this doesn't appear to be possible without a custom label or component, because label itself is always passed as a string into FieldTitle, with any angle brackets encoded.

Related

Vuetify 3 doesn't pass data-attributes down to the input

I'm trying to use "v-maska" along with "vuetify 3" and have faced the issue.
<v-text-field
v-for="field in fields"
name="foo"
label="Bar"
v-maska
data-maska="##-##"
data-fizz="buzz"
v-model="field.value"
/>
Vuetify doesn't pass the "data-maska" attribute down to the element keeping the "data-maska" attribute in the "v-input" div.
Same fairs for any other data-* attribute. So I'm assuming that it's not just v-maska related issue but how vuetify passes down the attributes excluding data-*.
Does anyone know with a workaround or the proper way to do that?

How to format sfChart DateTimeAxis Label Style so that it contains only capitalized words

I am using SyncFusion for graphics. For that purpose, I am specifically using SfChart component. In this component, I want to be able to format dates as following:
MON,TUE,WED,THU,FRI,SAT,SUN (That means that show only days with capital letters)
To do so, I played with LabelFormat property of ChartAxisLabelStyle in sfChart:
<chart:DateTimeAxis.LabelStyle>
<chart:ChartAxisLabelStyle x:Name="DateAxisLabelStyle" TextColor="{StaticResource HistogramChartAxisLabelColorTheme1}">
<chart:ChartAxisLabelStyle.LabelFormat>
<OnPlatform x:TypeArguments="x:String" iOS="EEE" WinPhone="ddd" Android="EEE" />
</chart:ChartAxisLabelStyle.LabelFormat>
</chart:ChartAxisLabelStyle>
</chart:DateTimeAxis.LabelStyle>
Also, I tried to write converters, but none of them did not work.
Is there a way to overcome this?
Thanks :)

Set textfield to numeric only Nativescript

I trying to do textfield accept numeric only and text align to center, but it no take any effect, Isn't I set wrong properties or another way to set?
<TextField id="btn" android:inputType="number" android:numeric="number" android:textAlignment="center" col="1" backgroundColor="#ffffff" col="2"/>
First. You want to set the keyboardType to number. See the documentation on EditableTextBase
Second, about styling. You really want to set the styling within a CSS file as it helps you separate markup and style. Take a look at the documentation about styling.
But if you want you can use inline styles. However what you've done is that you've tried to pass styling as xml parameters. What you want to do is that you want to pass the styling to the style param like this:
<TextField style="text-align: center;"/>
compare that to what you did:
<TextField textAlignment="center"/>
But as said. You're gonna be a happier developer if you write your style in a separate CSS file, like:
<TextField cssClass="myClass">
and then in your CSS file:
.myClass {
text-align: left;
}
On your submit event you could add in some validation to ensure that the input is a number. You can check this using console.log(typeof var) where var is the value of the text field, it should return integer.
You're best off setting the text-alignment within your CSS file.

Jaspersoft iReport Designer Stretch With Overflow not working if field is a group

Using 4.5.0 for numerous reports, each using the same datafield SVC_METH_NM. Have no problem word wrapping (using Stretch With Overflow) the datafield SVC_METH_NM unless the field is a group. When the field is a Group, the data is truncated instead of wrapped. If I set the Evaluation Time to Now, which blanks out the Evaluation group, it wraps correctly (but the report doesn't display properly). I tried removing the fields in the line immediately below, and have tried playing with the Position Type and Stretch Type options, to no avail.
<group name="ServiceMethodName">
<groupExpression><![CDATA[$F{SVC_METH_NM}]]></groupExpression>
<groupHeader>
<band height="20">
<textField isStretchWithOverflow="true" evaluationTime="Group" evaluationGroup="ServiceMethodName">
<reportElement x="23" y="0" width="180" height="20" printWhenGroupChanges="ServiceMethodName"/>
<textElement>
<font isBold="true" isItalic="false"/></textElement>
<textFieldExpression><![CDATA[$F{SVC_METH_NM}]]></textFieldExpression>
</textField>
Has anyone else run into this?
I am dealing with this issue right now. Did you find a solution? I was hoping to avoid it, but think I'll have to try and solve the problem using subreport(s). Fairly certain I can display the text appropriately that way, but feel like I shouldn't have to overcomplicate things with subreports.
Edit: TESTED SOLUTION - Put a subreport in your group header. Query for the subreport should be "select * from dual" since you will actually be passing all data in from the master report. Pass the field(s) to the subreport as parameters, and display them exactly as you would in the group header, but do it in the detail band. iReport will handle the wrapping of the text since it's in the detail band. Make sure Print When Detail Overflows is set on the subreport, and Stretch With Overflow is set on your subreport field.

Can you disable multiline on Telerik RadEditor?

Is it possible to make a Telerik RadEditor single-line entry only?
For example, in an ASP TextBox there is the Multiline attribute
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" />
Ah, just figured it out...
It's a bit weird, but there is an attribute for NewLineBr in the RadEditor.
<telerik:RadEditor NewLineBr="false">
Single line editing not possible with the RadEditor. It always uses an iframe element for the content area where the asp:textbox uses a textarea/input. Even if you make the height of the iframe be a single line, when the user presses Enter, they will get a new line. If you need a single line input from Telerik, then you can try using the RadInput control.

Resources