populate a groupbar with item and commands fomr database table

HI all,
is it possibile to view an example code  of populate a group bar with items coming from a db table?
I would like to get together with  the visible items the commands to call for open a window , or a container of some kind , sort of dispatcher to load a part of the app. 
thank you very much in advance for your help
Alessandro


5 Replies 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team November 12, 2020 03:16 AM UTC

Hi Alessandro 
 
Thank you for contacting Syncfusion Support. 
 
Query :I would like to get together with  the visible items the commands to call for open a window , or a container of some kind , sort of dispatcher to load a part of the app.   
 
We little unclear about your requirement, could you confirm whether you want to open a new window or App on clicking the GroupViewItem using Icommand?.  Also please clearly let us know what do you mean by sort of dispatcher to load a part of the app. If possible share any screenshot that shows your exact requirement. So that we could check and update you the prompt solution based on it. 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Vijayalakshmi VR 
 



AL Alessandro November 12, 2020 08:13 AM UTC

thank you very much for your response.
I am totally new to wpf and syncfusion controls set. I am caming as programmer from a totally different world. So what i would like tu understand is
1- how to get the items for the groupbar from a database table
2- how to link the items to a command the opens a new windows or page, should i say, in the application. Sort of menu item.Is it possibile to view a little code snippet?
I understand that this is  a basic issue so , probably , i should study better your documentation. But i often learn by doing or by view sample code...so this is my request.
Thank you very much in advance
Alessandro 



VR Vijayalakshmi Roopkumar Syncfusion Team November 13, 2020 11:03 AM UTC

Hi Alessandro 
 
Thank you for your update. 
 
Query :   how to get the items for the groupbar from a database table 
 
Our GroupBar control is a ItemsControl similar to list control. From your query, we could understood that you want to populate the GroupBar item from Database table. You can populate the list of items in multiple way. However, here we have attached the demo that shows the different type of databinding in our GroupBar control. In which we show how the DataTable, Observablecollection, dynamic object and observable collection type of objects bounded to GroupBar control . Please find the sample from following location: 
 
 
Also refer about how to populate items in GroupBar from following link: 
 
 
 
Query : how to link the items to a command the opens a new windows or page, should i say, in the application. Sort of menu item. Is it possibile to view a little code snippet? 
 
From your update, we could understood that you want to invoke the command with GroupBar. You can invoke the command for GroupBar as shown in the following code example. In this sample, we have used MouseDown event of Groupbar and bound the event using the interaction behavior. 
 
Code:[XAML] 
 
 
<syncfusion:GroupBar ItemsSource="{Binding  GroupItemCollection}" VisualMode="StackMode"  > 
<syncfusion:GroupBar.ItemContainerStyle> 
<Style TargetType="{x:Type syncfusion:GroupBarItem}" > 
<Setter Property="Header" Value="{Binding Header}"/> 
<Setter Property="Content" Value="{Binding Content}"/> 
<Setter Property="IsSelected" Value="{Binding IsSelected}" /> 
</Style> 
</syncfusion:GroupBar.ItemContainerStyle> 
<i:Interaction.Triggers> 
<i:EventTrigger EventName="MouseDown"> 
<command:EventToCommand 
Command="{Binding MouseDownClick}" CommandParameter="{Binding InvokeParameter}" 
PassEventArgsToCommand="True"/> 
</i:EventTrigger> 
</i:Interaction.Triggers> 
</syncfusion:GroupBar> 
 
 
 
Similarly you can bound the commands and achieve your requirement. So please try this suggestion and let us know if you need any further assistance. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer

AL Alessandro November 13, 2020 11:26 AM UTC

Thank you  so much , you have been very kind mwith me.
Alessandro


VR Vijayalakshmi Roopkumar Syncfusion Team November 16, 2020 09:21 AM UTC

Hi Alessandro 
 
Thank you for your update. 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon