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

GridView - How to display different controls in different cells of a specific column


ASPxFileManager - How to implement a custom document management for different document types

$
0
0

This example is a combination of the Custom Document Management in Rich Text Editor and Custom Document Management in Spreadsheet demo modules. In addition, some extra file formats are supported (.jpg, .pdf). You can easily add additional file formats support if necessary. Note that we use the ASPxPopupControl container and load the require controls to it dynamically based on the selected file path and extension. We need to restore the dynamically generated controls hierarchy in the Page_Init event handler (see KA18606 - How to create controls dynamically).

We handle the ASPxClientFileManager.SelectedFileOpened event to trigger file open operation. Thus, you need to double-click the required file item or press the Enter key to initiate this operation.

See Also:
T318308 - How to open documents using ASPxFileManager 
T298675 - How to show files preview as a thumbnail in ASPxFileManager
 

How to change the Grid's height according to the total height of its rows

$
0
0

The size of each GridView's element is calculated by the GridViewInfo class. The instance of the GridViewInfo class, containing information about a specific GridView instance, can be obtained via the GridView.GetViewInfo method. This method is hidden for IntelliSence, but is public and can be called from external code.

Question Comments

Added By: Gerard Chartier at: 6/16/2014 4:40:32 AM    

I am having problems with this approach. When I set gridControl1.Size to the newly calculated value, it has no effect. Is there a property of the GridControl that could prevent it from being resized? My GridControl is within a LayoutControl, along with a number of LayoutControlItems and their controls. I am using version 13.2.9.

Added By: Uriah (DevExpress Support) at: 6/16/2014 5:29:40 AM    Hello Gerard,

I have created a new ticket on your behalf and passed it to our team for research: Setting the GridControl.Size property to a value has no effect if the GridControl is inside the LaoutControl  Please bear with us. We will get back to you as soon as possible.Added By: Jerther at: 12/10/2015 6:57:31 AM    

Is this still the best and only way, now with 15.1?

Added By: Uriah (DevExpress Support) at: 12/11/2015 5:31:57 AM    Hello Jerther,

Yes, this is the best way. We have not yet added another method or property that can be used for the same purpose.

TabbedView - How to convert the default layout to a table one.

$
0
0

This example demonstrates how the default layout of TabbedView can be converted to a table layout using the FreeLayoutMode feature.

How to create a simple layout of dock panes

$
0
0

This example shows how to create a simple docking application. The application contains the following dock panels:
- Toolbox represents a regular dock panel, docked to the left.
- Properties is an auto-hidden dock panel.
- Messages is a floating dock panel.
- Document 1 and Document 2 are two tab pages, representing the main region of the application.

The step-by-step tutorial on how this application was created is available at How to create a simple layout of dock panes. Please refer to it for more information.

ASPxComboBox - How to change a color of text for certain items

$
0
0

This example illustrates how to customize a style for each item. Since the color is changed for an HTML element, it is necessary to synchronize this settings on each round-trip to the server. For this, handle the client-side combo box' Init and EndCallback event.

Note: the GetItemElement and GetItemRow methods are undocumented and can be changed without any notification with the next release.

Question Comments

Added By: Aris Vlotomas at: 5/12/2014 2:46:54 AM    

Hello,
I'm trying to use the following js code, without the for loop, but the listBox is null and the code is crashing.
var item1 = clientComboBox.listBox.GetItemElement(1).firstElementChild;

What can I do?
I just want to add/change styles for a specific item.

Thanks,
Aris

Added By: Larry (DevExpress Support) at: 5/12/2014 6:53:23 AM    

Hello Aris,

I have created a separate ticket on your behalf to process your inquiry more effectively:

ASPxComboBox - How to change a color of text for certain items (E4100 example)

Please refer to it for further correspondence.

How to create a complex layout of dock panels

$
0
0

This example shows how to create a complex layout of dock panels, by combining the panels into LayoutGroups. The following Layout Groups are created:
- RootGroup (arranges LayoutGroup1 and LayoutGroup3 horizontally)
- LayoutGroup1 (arranges LayoutGroup2 and TabbedGroup vertically)
- LayoutGroup2 (arranges three LayoutPanels horizontally)
- LayoutGroup3 (arranges two LayoutPanels vertically).

How to create a DocumentGroup with two tabs


How to show the Filter Panel on top

$
0
0

 This example illustrates how to show the Filter Panel on top. 



Drag & Drop - Copying rows instead of moving them when the CTRL key is pressed

$
0
0

This example demonstrates how to allow a user to copy dragged rows on the modifier key press. A custom attached property is used to determine whether or not the user wants to copy rows. You can adjust this property in the PreviewKeyDown and PreviewKeyUp event handlers. Then, use it in the DragElementTemplate to modify the drag element appearance accordingly. At last, replace data objects within the DraggedRows collection in the Drop event handler with newly created items.

Question Comments

Added By: Andrew Lee 1 at: 12/12/2015 8:26:52 AM    

It appears the code for this example does not correspond with the title/description. Where is the attached property implementation?

 DashboardDesigner - How to customize data source wizard to display only predefined data connections

$
0
0

This example demonstrates how to use the DashboardDesigner.DataSourceWizardCustomization to replace the default pages of the data source wizard with custom ones:

[C#]
dashboardDesigner1.DataSourceWizardCustomization=newDataSourceWizardCustomization();

 

We use following code to skip first page which allows selecting the data source type, and specify custom a wizard page that allows selecting one of the predefined connections. This custom page does not allow establishing a new connection:

[C#]
publicclassDataSourceWizardCustomization:IDashboardDataSourceWizardCustomization{publicvoidCustomizeDataSourceWizard(IWizardCustomization<DashboardDataSourceModel>customization){customization.StartPage=typeof(ChooseConnectionPage<DashboardDataSourceModel>);customization.Model.DataSourceType=DashboardDataSourceType.Xpo;customization.RegisterPageView<IChooseConnectionPageView,CustomChooseConnectionPageView>();}}

 

To specify default connections in code behind, use the DashboardDesigner.CustomDataConnections Property.  

See Also:
How to define a custom IConnectionStorageService in DashboardDesigner to filter out unnecessary connections from an app.config file  

Question Comments

Added By: mori khazaei 1 at: 7/29/2015 9:23:35 PM    

Hi,

I run this example. first no references is known and I add all again and then this error appear when I compile it:
'WizardCustomizationExample1.DataSourceWizardCustomization' does not implement interface member 'DevExpress.DashboardWin.ServiceModel.IDashboardDataSourceWizardCustomization.CustomizeDataSourceWizzard(DevExpress.DataAccess.UI.Wizard.IWizardCustomization<DevExpress.DashboardCommon.DashboardDataSourceModel>)'

The error is from DataSourceWizardCustomization1.cs line 49 column 18

how can I resolve this error?

Added By: Constant (DevExpress Support) at: 7/30/2015 12:39:46 AM    

The problem likely appears because you use the Dashboard Suite version, which does not support this functionality. This interface and other required members were introduced only in version 15.1.5. If you use an older version, it is necessary to upgrade it to use this functionality. 

Added By: Genesis Supsup 1 at: 12/12/2015 8:52:23 PM    

Does this work in 15.2 or higher versions?

How to work with referenced properties via a simple drop down list instead of the standard LookupPropertyEditor (Example)

$
0
0

See the How to work with referenced properties via a simple drop down list instead of the standard LookupPropertyEditor KB article for more information.

Question Comments

Added By: Carlitos at: 8/18/2012 7:29:01 AM    

I'm not able to see K18169. When I try it says: You can't view this question because it is marked as private.

Added By: Gustavo Marzioni at: 8/27/2012 2:45:42 PM    

it doesn't work when you create several hundred of Demolookup objects

Added By: Hurzi! at: 9/11/2012 10:30:56 PM    

K18169 is still marked as private...

Added By: Jeffrey E at: 12/13/2015 3:50:53 AM    

Hi Support,

I tried this example, but I noticed that when I input in the lookupedit for instance I input letter P, instead letter N appeared. Please see the screenshot - http://screencast-o-matic.com/watch/colIXChv40. I want to make the lookupedit a search text, I removed the arrow button then autofilter.

Thanks.

How to create closed (hidden) panels

$
0
0

The following example shows how to create closed (hidden) panels. To create closed panels, panel objects are added to the DockLayoutManager.ClosedPanels collection.

In the example, the built-in Closed Panels bar is visible (the DockLayoutManager.ClosedPanelsBarVisibility property is set to Auto). It allows closed panels to be restored on the fly.

Question Comments

Added By: Chris Schiefer at: 6/4/2015 8:18:50 AM    

What if you want a panel to be closed initially, but also want to set the initial docking location?  In this example the panel is initially closed, but once it becomes visible it is floating and isn't docked anywhere.

Added By: Alexander Rus (DevExpress Support) at: 6/4/2015 10:06:15 AM    

Hi Chris,
To process your recent post more efficiently, I created a separate ticket on your behalf: T251406: How to create closed panels with predefined location. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Thanks,
Alexander

How to dock a panel to another panel in code

$
0
0

This example shows how to dock a panel in code using the methods provided by the DockLayoutManager.DockController object.

In the Button1_Click event handler, a panel is docked to another panel forming a split container (two panels are displayed side by side). In the Button2_Click event handler, a panel is docked to another panel forming a tabbed group.

How to create auto-hidden panels

$
0
0

This example shows how to create auto-hidden panels in XAML.

To create auto-hidden panels:
1) AutoHideGroup objects are added to the DockManager.AutoHideGroups collection.
2) Panels are added to the corresponding AutoHideGroup object.


How to create floating panels in XAML

How to enable MDI mode for a DocumentGroup

How to build a layout of controls within LayoutPanels

$
0
0

This example shows how to arrange controls within LayoutPanels forming a custom layout.

In the example two LayoutPanels are created with controls arranged in a specific manner. Each control is wrapped into a LayoutControlItem object. The LayoutControlItem objects are combined together using LayoutGroup objects.

How to move a layout item in code

$
0
0

This example shows how to programmatically move a layout item to another position. To move layout items, the DockLayoutManager.LayoutController.Move method is used.
In the example, an item is moved on the left of another item.

How to create MVVM-style Dock UI using IMVVMDockingProperties interface

Viewing all 7205 articles
Browse latest View live


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