No Fields in XamDataGrid - xamdatagrid

Good day!
I have datasource, which is 100% pupulated. I'm sure in it because when AutoGenerateFields property is set to True all availble data is received and successfully displayed. But, what i really need to achieve is to display only fixed set of fields. If i set AutoGenerateFields to False i receive all record the same way, but NO columns at all.
Here is my XAML code:
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout >
<igDP:FieldLayout.Settings>
<igDP:FieldLayoutSettings AutoArrangeCells="Never"/>
</igDP:FieldLayout.Settings>
<igDP:FieldLayout.Fields>
<igDP:Field Name="Article" Label="Article" Row="0" Width="Auto" IsScrollTipField="True" Column="0"/>
<igDP:Field Name="Condition" Label="Condition" Row="0" Width="Auto" Column="1"/>
<igDP:Field Name="Description" Label="Description" Row="0" Width="Auto" Column="2"/>
<igDP:Field Name="Standartprice" Label="St. price" Row="0" Width="Auto" IsScrollTipField="True" Column="3"/>
<igDP:Field Name="Listprice" Label="List price" Width="Auto" Row="0" Column="4" />
<igDP:UnboundField Name="RowDetails" Row="1" Column="0" ColumnSpan="4">
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
I can't understand where is the trouble in my XAML markup.
I will be grateful for any help.

You must make sure that the Name you give the field matches exactly to the bound datasource's properties. If one of them is wrong it will not display any, remember that it is also case sensitive.
Should Standartprice be StandardPrice?

DarkIce's comment is probably right. To help with locating the specific Field involved, you can also check the Output tab in Visual Studio, where incorrectly named bindings will be reported.
That said, that hasn't always solved the problem for me when the mysterious "blank grid" appears, but it's the first place I look.

Related

Is there a way to display a details view in .NET MAUI, like you do with the <details> tag in html?

Hello I am trying to display data on labels and I want to provide extra details about the data, when the user clicks on a button e.g. .
I know there is the tag in html, where you can define a summary and the details below.
Is there a way, or even better a ContentView, which can do that in .NET MAUI?
I've thought about adding a temporary label under the summary label, with the details, but that looks weird and is not intuitive.
If by details you mean a collapse / expander (which seem to be what details is in html) you can use the expander from the .net maui community toolkit :
<Expander>
<Expander.Header>
<Label Text="Baboon"
FontAttributes="Bold"
FontSize="Medium" />
</Expander.Header>
<HorizontalStackLayout Padding="10">
<Image Source="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Papio_anubis_%28Serengeti%2C_2009%29.jpg/200px-Papio_anubis_%28Serengeti%2C_2009%29.jpg"
Aspect="AspectFill"
HeightRequest="120"
WidthRequest="120" />
<Label Text="Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae."
FontAttributes="Italic" />
</HorizontalStackLayout>
</Expander>
Otherwise if you just want to provide some additional texte about an element I would go with tooltips.
<Button Text="Save"
ToolTipProperties.Text="Click to Save your data" />

how to design superscript in nativescript

I'm trying to display how many items are there in cart. on top of the cart symbol. but I'm facing an issue using grid layout. since, nativescript wont support superscript. is there any better way to design.
i tried something like below. but the number of items is not properly displaying on top right of the cart symbol.
<GridLayout col="2" rows="auto" columns="*,*">
<Label col="0" text="" fontSize="28" class="fas" textWrap="true" />
<Label col="1" text="{{ line_item_no }}" fontSize="10" textWrap="true" margin="0 5 0 5" class="fcw" />
</GridLayout>
i need a cart symbol of 25 font size. on top right i need a 10 font size number surrounded by a round background. kindly give me some ideas.
you can use text-decoration: line-through; property, see the references below:
https://docs.nativescript.org/api-reference/modules/ui_enums.textdecoration
https://docs.nativescript.org/ui/styling

How to align text inside list view to the right instead of the default left?

I am creating an Arabic app with NativeScript. I want each row inside list view to be viewed in rtl direction so the text in the row is aligned to the right.
I tired using text-align:right and horizontal-align:right but didn't worked.
How can I do this?
Thank you.
As there is no code snippet of what you have tried so far we can only speculate what is your code structure.(see here)
However here is a very basic example on how to align all list-view cell templates to the right by default.
<ListView.itemTemplate>
<GridLayout rows="*" columns="*">
<Label row="0" col="0" text="right aligned text" textAlignment="right" textWrap="true" />
</GridLayout>
</ListView.itemTemplate>

NativeScript Floating Button

I just recently started with NativeScript and ran into a roadblock.
I have a AppBuilder/NativeScript project (iOS only for now) in which I want to implement a floating action button. I have seen plenty of examples where the FAB is positioned above a ListView however my scenario is different:
I have 3 repeaters (displaying unrelated data).
each repeater may or may not be visible on the page (if there is no data to display, I am hiding it)
I would like to place the FAB on the bottom right regardless of what the content is
The whole page is wrapped in a ScrollView
I tried using nativescript-floatingactionbutton, but I cannot compile with this module installed. I keep getting "Cannot build project because module nativescript-floatingactionbutton contains insecure code. Remove the module and try again."
I also tried an AbsoluteLayout on the page level, but it seems that the layout overlays the rest of the page and I cannot even see the content, just the FAB.
Here is the markup
<Page id="MainPage" xmlns="http://schema.nativescript.org/tns.xsd" actionBarHidden="true" loaded="pageLoaded" xmlns:drawer="nativescript-telerik-ui/sidedrawer" xmlns:sharedDrawers="widgets/drawers">
<drawer:RadSideDrawer id="mainDrawer">
<drawer:RadSideDrawer.mainContent>
<ScrollView id="wrapper" opacity="0">
<DockLayout stretchLastChild="false">
<GridLayout id="mainHeader" cssClass="header" dock="top" columns="50, *, 50">
<Label class="icomoon-icon" text="" row="0" col="0" horizontalAlignment="center" tap="openDrawer" fontSize="18" />
<Label horizontalAlignment="center" text="{{ pageTitle }}" row="0" col="1" />
<Label class="icomoon-icon" text="" row="0" col="2" horizontalAlignment="center" tap="notifications" fontSize="18" />
</GridLayout>
<GridLayout cssClass="main" rows="auto, *" >
<StackLayout row="0">
<StackLayout cssClass="{{arr.length ? '' : 'hidden' }}">
<label cssClass="section-title" text="{{strings.activeLoans}}"></label>
<Repeater items="{{ arr }}" >
<Repeater.itemTemplate cssClass="item">
...
</Repeater.itemTemplate>
</Repeater>
</StackLayout>
<StackLayout cssClass="{{arr2.length ? '' : 'hidden' }}">
<label cssClass="section-title" text="{{strings.history}}" marginTop="20" />
<Repeater items="{{ arr2 }}">
<Repeater.itemTemplate>
...
</Repeater.itemTemplate>
</Repeater>
</StackLayout>
<StackLayout cssClass="{{arr3.length ? '' : 'hidden' }}">
<label cssClass="section-title" text="{{strings.data}}" marginTop="20" />
<Image src="~/images/pic.jpg" />
<Repeater items="{{ arr3 }}">
<Repeater.itemTemplate>
...
</Repeater.itemTemplate>
</Repeater>
</StackLayout>
</StackLayout>
</GridLayout>
</DockLayout>
</ScrollView>
</drawer:RadSideDrawer.mainContent>
<drawer:SideDrawer.drawerContent>
<sharedDrawers:mainDrawer />
</drawer:SideDrawer.drawerContent>
</drawer:RadSideDrawer>
<!--<AbsoluteLayout cssClass="fabContainer">
<Image src="res://fab_add" tap="newLoan" cssClass="fab" />
</AbsoluteLayout>-->
</Page>
I have truncated and changed some of the non-relevant code.
Any help is greatly appreciated.
Thank you.
Аs Brad Martin says, the plugin cannot be built inside Telerik Platform as not all of its maintainers are white listed. To be more precise, when an iOS build of a plugin containing a pod file is initiated in Telerik Platform, the service checks its maintainers. As a pod file can contain post build scripts, Telerik Platform is currently flagging plugins as safe by keeping a list of white listed maintainers.
This plugin has 5 maintainers - Brad Martin being only one of them. Brad’s email is white listed but ‘gabrielbiga’ and ‘lazaromenezes’ are not yet whitelisted. #Brad Martin- can you please let us know whether we should whitelist these users emails as well?
The other approach would be to replace the pod file with frameworks instead.
One last thing, moving forward with Telerik Platform releases Telerik Platform team will be working on improving the support for plugins containing pods. They will probably remove the "whitelisting” approach with sandboxing instead but we couldn’t yet comment on any specifics. 

Put the two images in single control in wp7

I want to put the one image on left corner and another on right corner of Control(ex :button) and need click event for that.
please tell me....
What have you tried?
Something like this should work but it depends on exactly what you're after:
<Button Click="myClickHandler">
<Grid>
<Image Source="image1.jpg" HorizontalAlignment="Left" Stretch="None" />
<Image Source="image2.jpg" HorizontalAlignment="Right" Stretch="None" />
</Grid>
</Button>
Disclaimer: the above is untested and written freehand. I make no guarantees of it compiling, etc.

Resources