- Home
- Forum
- Xamarin.Forms
- Parameter nulll
Parameter nulll
I'm tying to use thi s parameter "NumberGroupSizes="3" to specify the size of group in order to separate correctly a number.
But i have the esception of paramter null.
So how can i write 1.000,45 fo example?
Alberto C.
SIGN IN To post a reply.
3 Replies
JA
Jayaraman Ayyanar
Syncfusion Team
April 25, 2018 09:17 AM UTC
Hi Alberto,
Thanks for contacting Syncfusion support.
We have checked your query for “Parameter null exception while setting NumberGroupSizes”. The NumberGroupSizes in the GridNumericColumn is the int array property so we need to set the int array for NumberGroupSizes. Please refer the below example to set the NumberGroupSizes property.
If you define the columns in XAML you can use the below example.
|
//ViewModel
public int[] a { get; set; }
public ViewModel()
{
a = new int[3] { 2, 3, 1 };
}
<sfgrid:GridNumericColumn HeaderText="Order ID"
NumberDecimalDigits="0"
NumberGroupSizes="{Binding a,
Source={x:Reference viewModel}}"
MappingName="EmployeeID" /> |
If you define the columns in code behind you can use the below example.
|
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
int[] a = new int[3] { 2, 3, 1 };
GridNumericColumn customerColumn = new GridNumericColumn();
customerColumn.MappingName = "EmployeeID";
customerColumn.HeaderText = "Salary";
customerColumn.NumberGroupSizes = a;
customerColumn.NumberDecimalDigits = 0;
}
} |
We have prepared a sample for your requirement and you can download the same for the below link.
Sample : http://www.syncfusion.com/downloads/support/directtrac/general/ze/NumerGroupSizes1039826191
Regards,
Jayaraman.
AL
Alberto
April 26, 2018 10:28 AM UTC
Hi Jayaraman,
the code works thanks a lot.
Best,
Alberto C.
JA
Jayaraman Ayyanar
Syncfusion Team
April 27, 2018 04:04 AM UTC
Hi Alberto,
Thanks for the confimation of the code works. Let us know if you require any further assistance. As always, We will be happy to assist you.
Regards,
Jayaraman.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AL Alberto
- Apr 24, 2018 08:35 AM UTC
- Apr 27, 2018 04:04 AM UTC