Comments (2)
Page code
<ContentPage.Content>
<StackLayout>
<Label Text="Welcome to Xamarin.Forms!"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" />
<dg:DataGrid FontSize="12" ItemsSource="{Binding Path=_cashBoxOperations}" SelectionEnabled="True" SelectedItem="{Binding Path=SelectedOperation}"
RowHeight="80" HeaderHeight="50" BorderColor="#CCCCCC" HeaderBackground="#E0E6F8"
PullToRefreshCommand="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}">
<dg:DataGrid.HeaderFontSize>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Tablet>15</OnIdiom.Tablet>
<OnIdiom.Phone>13</OnIdiom.Phone>
</OnIdiom>
</dg:DataGrid.HeaderFontSize>
<dg:DataGrid.Columns>
<dg:DataGridColumn Title="Дата" PropertyName="Date" Width="2*"/>
<dg:DataGridColumn Title="Взято" PropertyName="Taken" Width="2*"/>
<dg:DataGridColumn Title="Тип" PropertyName="Type" Width="2*"/>
<dg:DataGridColumn Title="До" PropertyName="LessIn" Width="2*"/>
<dg:DataGridColumn Title="После" PropertyName="Less" Width="2*"/>
</dg:DataGrid.Columns>
<dg:DataGrid.RowsBackgroundColorPalette>
<dg:PaletteCollection>
<Color>#F2F2F2</Color>
<Color>#FFFFFF</Color>
</dg:PaletteCollection>
</dg:DataGrid.RowsBackgroundColorPalette>
<dg:DataGrid.Resources>
<ResourceDictionary>
<conv:StreakToColorConverter x:Key="StreakToColorConverter"/>
</ResourceDictionary>
</dg:DataGrid.Resources>
</dg:DataGrid>
</StackLayout>
</ContentPage.Content>
</ContentPage>
VM of Page
public class SecondPageVM : BaseViewModel
{
private CashBoxOperations _SelectedOperation;
public CashBoxOperations SelectedOperation
{
get => _SelectedOperation;
set
{
SetProperty(ref _SelectedOperation, value);
Application.Current.MainPage.DisplayAlert("Error",$"{SelectedOperation.Id + " " + SelectedOperation.Date}","Ok");
}
}
private ObservableCollection<CashBoxOperations> _cashBoxList;
public ObservableCollection<CashBoxOperations> _cashBoxOperations
{
get => _cashBoxList;
set => SetProperty(ref _cashBoxList, value);
}
public Controller _controller;
private Salons _selectedSalon;
public Salons SelectedSalon
{
get => _selectedSalon;
set => SetProperty(ref _selectedSalon, value);
}
public SecondPageVM(Salons _sel)
{
SelectedSalon = _sel;
_controller = new Controller();
_cashBoxOperations = _controller.GetOperations(SelectedSalon);
}
}
from xamarin.forms.datagrid.
should be fixed with latest package
from xamarin.forms.datagrid.
Related Issues (20)
- Xamarin forms Datagrid retrieve data
- It cannot center long texts HOT 1
- Rows show but without text ONLY in production (iOS, Android) HOT 1
- froze first column HOT 2
- Having a decimal Input Column HOT 1
- Formatting date/Number DataGridColumn
- Support for BindingList? HOT 1
- How do you clear the list ? HOT 2
- Swipe View HOT 1
- grid title in IOS is not working HOT 1
- DataGrid's ItemsSoure not showing on first load. I have to sort the grid by tapping on header to show the data. HOT 1
- Vertical grid lines slightly misaligned on iOS HOT 1
- How to create DataGridColumn consisting DataTemplate progamatically? HOT 1
- MAUI Support HOT 3
- Selection does not work with the new nuget HOT 2
- How insert a dg:DataGrid in Grid
- Rows not visible when DataGrid is inside a StackLayout HOT 1
- Hide the column in the DataGridColumn HOT 1
- Any Support for MAUI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamarin.forms.datagrid.