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

Winforms start change postion of Radtileelement

5 Answers 59 Views
Panorama
This is a migrated thread and some comments may be shown as answers.
Rene
Top achievements
Rank 1
Rene asked on 27 May 2014, 02:48 PM
Hi I have a friend looked at the trail version and now we have a question to the panorama .

We have DemoHub 2-3 creates new tile and these assigned with Row and Column . Then we have saved with a button click event the values ​​of each Radtileelement in the registry .
example:
RegistryKey name = ( Radtileelement.Name )
Value ( group = GroupName )
Value ( row = Radtileelement.row )
Value (Column = Radtileelement.Column )

Now we want to read the registry and then adjust the RadTileElements so with the values ​​of the registry when starting the Winforms .

e.g.
 For Each item As RadTileElement In radPanorama1.Items
                    If item.Name RegistryKey = Name Then
                        item.Column = Column
                        item.Row = row
                    end If
                Next

Unfortunately we did not get it back .

PS: The aim should be that each user as he has relocated with a button we write it in his tile the regedit and then the positions are taken when starting saved it .


Sorry for my bad English

5 Answers, 1 is accepted

Sort by
0
Rene
Top achievements
Rank 1
answered on 27 May 2014, 02:54 PM
We have also tried yet.

  Dim RadGroup As TileGroupElement = radPanorama1.Groups.Item (Regkeygroupname)

                 For Each item As RadTileElement In RadGroup.Items
                     If item.Name = MainKeyName Then
                         item.Column = col
                         item.Row = row
                     end If
                     Console.WriteLine (item.Column)
                 Next


error:
Implicit conversion from 'Telerik.WinControls.RadItem "in" Telerik.WinControls.UI.TileGroupElement
0
Dimitar
Telerik team
answered on 30 May 2014, 06:41 AM
Hi Rene,

Thank you for writing.

If I understand correctly you want to save and restore the tile positions upon application reopening. To show you how this can be achieved I have created a sample application where you can save and load the tiles position in a xml file (you can use another approach for the object serialization if you want). Could you please check it and let me know how it fits in your scenario?

I am looking forward to your reply.

Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Rene
Top achievements
Rank 1
answered on 30 May 2014, 07:00 AM
Yes that's what I look for when I test your programs and click the Load button crashes the software.


An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll.

{"Target of an invocation has caused an exception."}
0
Rene
Top achievements
Rank 1
answered on 30 May 2014, 07:58 AM
Could you give me an example with a group and 4 items.

e.g. so it is not
DirectCast (radPanorama1.Groups ("GroupName). Items (" Radtile1 "), RadTileElement). = Column 1
0
Dimitar
Telerik team
answered on 02 Jun 2014, 07:19 AM
Hi Rene,

Thank you for writing back. 

On my side this works as expected. Nevertheless could you please check the exception details and see what is the inner exception? Also please make sure that you have saved the layout first.

I am looking forward to your reply.

Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Panorama
Asked by
Rene
Top achievements
Rank 1
Answers by
Rene
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or