Reputation: 373
I have a datagrid in my page which shows data after a display button is pressed. Code in my xaml:
<DGrd:DataGrid Grid.Row="1"
ItemsSource="{Binding LeaveBalances}"
SelectionEnabled="False" HeaderLabelStyle="{StaticResource HeaderlabelStyle}">
<DGrd:DataGrid.Columns>
<DGrd:DataGridColumn Title="Leave" PropertyName="LeaveName" />
<DGrd:DataGridColumn Title="Opening" PropertyName="Opening" StringFormat="{}{0:N1}" />
<DGrd:DataGridColumn Title="Availed" PropertyName="Availed" StringFormat="{}{0:N1}" />
<DGrd:DataGridColumn Title="Balance" PropertyName="Balance" StringFormat="{}{0:N1}" />
</DGrd:DataGrid.Columns>
</DGrd:DataGrid>
My Viewmodel:
private async Task RefreshView()
{
BusyStatus = "Loading Leave Balance";
await InvokeAsync(() => oLeaveService.GetCurrentLeaveYear(), (lvYear) => { LeaveYear = lvYear; });
await InvokeAsync(() => oLeaveService.GetEmpLeaveBalance(User.CurrentUser.PKID), LeaveBalanceGet_Completed);
}
My application works fine in debug mode. But the button doesn't give any response in release mode. What can I do in this matter ?
P.S. : I have tried making the linker properties none in release mode. But in that case my archiving fails.
Upvotes: 0
Views: 91
Reputation: 373
Just found out I was using styling in my datagrid which resulted it not giving any response in release mode. No idea why. It works fine after I commented out this part:
<Style TargetType="DGrd:DataGrid">
<Setter Property="FontFamily">
<Setter.Value>
<OnPlatform x:TypeArguments="x:String">
<OnPlatform.iOS>Lato-Regular</OnPlatform.iOS>
<OnPlatform.Android>Lato-Regular.ttf#Lato-Regular</OnPlatform.Android>
<OnPlatform.WinPhone>Assets/Fonts/Lato-Regular.ttf#Lato</OnPlatform.WinPhone>
</OnPlatform>
</Setter.Value>
</Setter>
<Setter Property="HeaderHeight" Value="50" />
<Setter Property="FontSize" Value="15" />
<Setter Property="HeaderFontSize" Value="15" />
<Setter Property="HeaderBackground" Value="{x:Static constants:SystemColors.ListHeaderBackColor}" />
<Setter Property="BorderColor" Value="{x:Static constants:SystemColors.GridBorderColor}" />
</Style>
Upvotes: 1