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

5 posts, 0 answers
  1. Alexandre
    Alexandre avatar
    5 posts
    Member since:
    Aug 2015

    Posted 11 Aug 2015 Link to this post

    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
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 11 Aug 2015 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Alexandre
    Alexandre avatar
    5 posts
    Member since:
    Aug 2015

    Posted 11 Aug 2015 Link to this post

     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.

     ​

     

  5. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 11 Aug 2015 Link to this post

    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 msdn and stackoverflow

    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
  6. Alexandre
    Alexandre avatar
    5 posts
    Member since:
    Aug 2015

    Posted 11 Aug 2015 in reply to Dess Link to this post

    Thank you for all your help.

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

    Regards.
Back to Top
UI for WinForms is Visual Studio 2017 Ready