I would need to display order data and order lines in Master-Details mode as shown in the attached screenschot
I have prepared an example project, sent in attachment, to allow you to create the form with SfDatagrid that displays the data in the format Master-Detail as shown in the attached screenshot.
The credentials to be used to access the login form are inserted in the attached document
The application plans to be able to manage restaurant orders.
Products ordered by customers can be grouped into two distinct groups:
- Products to be eaten that must be cooked and subsequently delivered;
- Products to drink that only need to be delivered.
To this end I have created specific and separate credentials for the figure of the kitchen manager, who must have access to orders with products for the kitchen (in which there are the stages of cooking and subsequent delivery) and the manager of the beverage department who must have access, within the same order, only the products for drinking (for which there is only the phase of delivery).
In the attached project I visualize the data using two sfdatagrid:
in the upper Sfdatagrid I see the orders;
selecting the order the respective products that meet the prerequisites for the respective cooking and delivery phases are displayed in the sfdatagrid below.
The queries accurately extract the products of the related orders; I would ask you to create a new form that displays the order data and products in Master-Details mode with your modalities as shown in the screenshots that are part of this documentation.
Thank you for your kind attention and availability.
I would then ask you for an explanation of the interventions carried out to allow me to proceed independently if I had other needs of the type.
I hope to have expressed the problem at best and I remain available for all the explanations of the case.
Thank you
Moreno
Attachment: Per_SyncFusion__SfDataGrid_15563787.zip
| Username | Password | Comment |
| userb | userb | to access orders with products - Beverages |
| userc | userc | to be able to access orders with products - Kitchen |
I try to
verify what is indicated in the link attached, but I think using the
credentials that I transmit more clearly, you should be able to access
the demo application sent correctly.
Thank you and good day.
Hello
Moreno
|
{
CommandeList[i].RigheCommandeCucinaList = getDetailsViewData(CommandeList[i].IdCommanda);
}
private ObservableCollection<CommandaRiga> getDetailsViewData(int id)
{
ObservableCollection<CommandaRiga> relaitonalSource = new ObservableCollection<CommandaRiga>();
for(int i =0; i<RigheCommandeCucinaList.Count;i++)
{
if(id== RigheCommandeCucinaList[i].NCommanda)
{
relaitonalSource.Add(RigheCommandeCucinaList[i]);
}
}
return relaitonalSource;
} |
|
<syf:SfDataGrid x:Name="FirstDetailsViewGrid"
AutoGenerateColumns="False"> |
|
<syf:GridTextColumn MappingName="IdRigaCommanda" >
<syf:GridTextColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding IdRigaCommanda}"
PreviewMouseDown="TextBlock_PreviewMouseDown" >
</TextBlock>
</DataTemplate>
</syf:GridTextColumn.CellTemplate>
</syf:GridTextColumn>
private void TextBlock_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
var textBox = (sender as TextBlock).Text;
MessageBox.Show(textBox.ToString());
} |