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

MasterTemplate.EndInit()

1 Answer 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tyler
Top achievements
Rank 1
Tyler asked on 22 Aug 2016, 03:25 PM

We are using a wrapper to set certain default behavior for the RadGridView.

While debugging a feature we disabled that was not working it appears that the grid.MasterTemplate.EndInit() method is resetting some properties back to their default.

We have also overriden the MasterGridViewTemplate per this article: (http://www.telerik.com/forums/question-about-mastergridviewtemplate-and-mastertemplate).

 

Current Issue and solution we have implemented:

Some properties (namely EnableHotTracking) that we set in the MasterTemplateGridViewElement override, or the GridView wrapper are getting reset to their defaults.  (Even some properties that are set from the designer are getting reset back to their defaults)

Our work around now is to override the EndInit() method and inside, after base.EndInit(), we re-set the properties there were not holding their value.

 

Is there a different way to do this?  Are we missing something?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Aug 2016, 12:10 PM
Hello Tyler,

Thank you for writing.

At the point where the EndInit method is executed a new TableElement is created as well. This is why the properties are reset. Some TableEelemnt properties are exposed on the grid as well and currently these properties will be reset if they are set at design time. This is considered an issue which I have logged in our Feedback Portal. You can track the item for status changes and add your vote for it here.

To workaround this you can continue using your solution and set the properties after the EndInit method call.

Your Telerik Points have been updated for this report.

Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Tags
GridView
Asked by
Tyler
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or