Grid DetailTemplate - source cannot be null when showing 2 details
<GridTemplates>
<DetailTemplate Context="FinAccountContext">
@{
var finWritingGrouped = FinAccountContext as GetFinWritingsGroupedResponse;
var QueryDetail = new Query()
.Where("FinAccountId", "equal", finWritingGrouped.FinAccountId)
.Where("FinancialYearId", "equal", currentFinancialYearId)
.Sort("DueDate", null);
<SfGrid ID="FinWritingsByFinAccountGrid" TValue="GetFinWritingsByAccountIdResponse"
AllowPaging="true" AllowResizing="true" AllowSorting="false" AllowFiltering="false"
Query="@QueryDetail">
<SfDataManager Url="/odata/finwritings/" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<GridEvents CommandClicked="OnCommandClicked" TValue="GetFinWritingsByAccountIdResponse"></GridEvents>
<GridPageSettings PageSize="5" PageSizes="5"></GridPageSettings>
<GridColumns>
<GridColumn Field=@nameof(GetFinWritingsByAccountIdResponse.Description)
TextAlign="TextAlign.Left">
</GridColumn>
<GridColumn Field=@nameof(GetFinWritingsByAccountIdResponse.DueDate)
TextAlign="TextAlign.Center" Format="d" Type="ColumnType.Date">
</GridColumn>
<GridColumn Field=@nameof(GetFinWritingsByAccountIdResponse.UnCleared)
TextAlign="TextAlign.Right" Format="N2">
</GridColumn>
<GridColumn Width="100px">
<GridCommandColumns>
<GridCommandColumn ButtonOption="@(new CommandButtonOptions() {
Content = "+" })">
</GridCommandColumn>
</GridCommandColumns>
</GridColumn>
</GridColumns>
</SfGrid>
}
</DetailTemplate>
</GridTemplates>
Hi Hermans,
Based on your code snippet, we prepared simple sample at our end. However, we were unable to replicate
the reported problem on our end. Please find the attached sample for
your reference
If the reported issue still reproduced then kindly share the below details to validate further at our end.
- Share us the entire Grid code snippet along with model class
- Please share if we missed any replication procedure in attached sample
- Share a video demonstration of the issue with a detailed explanation. This will greatly assist us in understanding the problem.
- Please provide a simple sample that reproduces the issue with duplicate data or try to modify the above mentioned sample.
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Naveen Palanivel
The problem occurs when I mistakenly enter the following
Correction: PageSizes="@(new string[] { "5", "10" })"
Sorry to have opened a ticket for these stupid mistake :/
Hi Jean-Francois Hermans,
We are glad to hear that you have resolved your query on your own.
Please get back to us if you need further assistance.
Regards,
Naveen Palanivel.
- 3 Replies
- 2 Participants
-
JH Jean-François Hermans
- Dec 2, 2023 01:17 PM UTC
- Dec 11, 2023 11:13 AM UTC