Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to override (handle) the customization form button click

$
0
0

It is applied only to versions prior to 15.1. If you are using version 15.1 and higher, please refer to the How to override (handle) the customization form button click starting with the 15.1 version example. Starting with the 15.1 version, the LayoutControl.RegisterUserCustomizatonForm method was replaced with LayoutControl.RegisterUserCustomizationForm.

It is possible to accomplish this task by creating your custom Customization Form descendant. In this descendant create a custom ButtonPanel control and override its internal methods:

OnSaveLayoutButtonClick
OnLoadLayoutButtonClick
OnRedoButtonClick
OnUndoButtonClick

Note that inside ButtonPanels methods you can access a parent LayoutControl via the code snippet shown below:

[C#]
protectedoverridevoidOnSaveLayoutButtonClick(objectsender,EventArgse){//((LayoutControl)OwnerControl) - LayoutControl that shows your own Customization formFormform=((LayoutControl)OwnerControl).FindForm();//the form that contains a layout control (Form1 in this sample)base.OnSaveLayoutButtonClick(sender,e);}

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>