This is a migrated thread and some comments may be shown as answers.

Help: Create Desktop dynamically with Panorama in C# and MS-Sql

4 Answers 94 Views
Panorama
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 11 Aug 2015, 10:00 AM
Hello,

I am a user of the framework "Telerik" for "C # Winform."

For some time now I try to interface my application with the "Panorama Desktop" module to display "Tiles" according to the connected user.

The objective is to get the name of the groups in the table "GROUPS" in the MS-Sql database and create the dynamically in my application.

Then retrieve the table "ITEMS" all items of a group and include them in the appropriate group.

Table : GROUPS
groupID
groupName
groupOrder

Table : ITEMS
itemID
groupID
itemName
itemOrder
itemImage
itemRow
itemCol
itemSpanWidth
itemSpanHeight

Would someone an idea or example code allows me to set up this feature because then I do not see how.

Thanking you in advance for your answers.

Regards,

Alexandre
alexandre.schouvert@gmail.com

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Aug 2015, 11:29 AM
Hello Alexandre,

Thank you for writing.

In order to achieve your goal, it is necessary to populate RadPanorama with the desired groups and tiles programmatically considering the extracted data. Here is a sample code snippet demonstrating how to add groups and items to these groups:
public Form1()
{
    InitializeComponent();
 
    this.radPanorama1.ShowGroups = true;
    TileGroupElement group1 = new TileGroupElement();
    group1.Text = "Group1";
    RadTileElement tile1 = new RadTileElement();
    tile1.Text = "Tile1";
    group1.Items.Add(tile1);
    this.radPanorama1.Groups.Add(group1);
     
    TileGroupElement group2 = new TileGroupElement();
    group2.Text = "Group2";
    RadTileElement tile2 = new RadTileElement();
    tile2.Text = "Tile2";
    group2.Items.Add(tile2);
    this.radPanorama1.Groups.Add(group2);
}

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Alexandre
Top achievements
Rank 1
answered on 11 Aug 2015, 11:39 AM

 Thanks for your answer.

 TileGroupElement group2 = new TileGroupElement();​

 Then you more simply is it possible to dynamically generate variable "in group2 group3, groupXXX ..." to declare a new object.

for (int i = 0; i < 5; i++)
{
    TileGroupElement group​[i] = new TileGroupElement();​
}

Sorry I started in C # and I do not know how to dynamically register objects instences.

Thanks for your help.

Regards.

 ​

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Aug 2015, 12:14 PM
Hello Alexandre,

Thank you for writing back.

Here is a sample code snippet demonstrating how to dynamically create groups and items:
this.radPanorama1.ShowGroups = true;
this.radPanorama1.RowsCount = 5;
this.radPanorama1.ColumnsCount = 3;
 
for (int i = 0; i < 5; i++)
{
    TileGroupElement group = new TileGroupElement();
    group.ColumnsCount = 3;
    group.RowsCount = 5;
    group.Text = "Group" + i;
    for (int j = 0; j < 3; j++)
    {
        RadTileElement tile = new RadTileElement();
        tile.Row = i;
        tile.Column = j;
        tile.Text = "Tile" + j;
        group.Items.Add(tile);
    }          
    this.radPanorama1.Groups.Add(group);
}

For any further general programming questions, I would recommend you to have a look at the related forums like and

I hope this information helps. If you have any additional questions, please let me know.

Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Alexandre
Top achievements
Rank 1
answered on 11 Aug 2015, 12:26 PM
Thank you for all your help.

I'll see what I can do with these lines of code.

Regards.
Tags
Panorama
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Alexandre
Top achievements
Rank 1
Share this question
or