This example demonstrates how to register and use SVG shapes in DiagramControl. The ShapeDescription.CreateSvgShape method creates a shape from a stream that contains an SVG image.
Icons used in the sample project: IcoMoon's "Free Shapes" pack.
This example demonstrates how to register and use SVG shapes in DiagramControl. The ShapeDescription.CreateSvgShape method creates a shape from a stream that contains an SVG image.
Icons used in the sample project: IcoMoon's "Free Shapes" pack.
ASPxGridView control doesn't send a callback to the server when a GridColumn width is changed. GridColumns' width value will be passed to the server with the next ASPxGridView callback. If a callback is not sent, page reloading will cause losing columns' new widths. The sample illustrates how to save ASPxGridView columns' widths to a cookie at the client side and apply them at the server side.
Note that the SettingsCookies.StoreColumnsWidth property should be assigned to False to disable overwriting our GridColumns' width by default GridColumns' width saved with the help of SaveClientLayout.
This example shows the way to change the visual appearance of a focused editor.
Let's assume that the editor must show an additional border when focused.
To create this feature, it's necessary to create a custom template and place a new border element there, which will be displayed every time the control is focused. There is a template "WPFEditorsFocusFrame" in the resource dictionary in which rectangle named "FocusFrame" is defined. This rectangle is playing the role of the focus border, and it's Visibility property is bound to the IsKeyboardFocusWithin property of the control.
The described template is general for several DXEditors types and is applied automatically to TextEdit, PasswordBoxEdit, ButtonEdit, ComboBoxEdit, LookupEdit and other button-based editors. So, once you define this template, you'll get the same behavior for all of these controls.
Starting with version 16.1, we changed our templates and introduced the new default theme - Office2016White. So, you need to use the HoverBorderTemplate resource to accomplish this task.
The example contains a helper class that can be used to save and load the current expanded / collapsed state of the XtraTreeList nodes. Please refer to How to preserve the expanded state of TreeList nodes when refreshing data article to learn more.
Why don't you save the node.Id's in a List<int> ?
That would be more type safe (instead of seraching by node.GetValue(node.TreeList.KeyFieldName) and safing object types in ArrayList)
Besides, your example doesn't match when you reassign (e.g. after saving and reloading data) the binding source or the KeyFieldName doesn't expect like in the example.
Is there a chance of this being implemented to the XtraTreeList Suite? I can imagine there are large amounts of people who use this code regularly.
Added By: Olejka (DevExpress Support) at: 2/26/2015 4:29:09 AMHello,
Currently, we don't have plans to implement this option out of the box. We've implemented this solution to allow our users to manually save nodes' state.
Nevertheless, thank you for your input. We will consider implementation of this feature in the future.
Hello alvin,
To process your recent post more efficiently, I created a separate ticket on your behalf: How to save state after update. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hello,
I've created a separate ticket on your behalf (T503999: TreeList - where to find the TreeListViewState class?). It has been placed in our processing queue and will be answered shortly.
This example shows how to customize drag&drop in Grid and TreeList controls, so that a dragged row is shown as a cursor. To do so, you need to override the corresponding DragDropManager class to pass RowData to DragElement instead of the row content and change its template to draw rows in the same way as they are drawn in Grid.
Nice solution!
Added By: Berk Yazicioglu at: 4/13/2017 3:44:40 PM How can I show a red background on places that I cannot drop the dragged row?This example demonstrates the ImageSlider control running in the Virtual Mode.
Let me know if you have additional questions.[C#]privatevoidimageSlider1_GetImage(objectsender,DevExpress.XtraEditors.Controls.GetImageEventArgse){if(e.IsStartUp){e.Image=Image.FromFile(images[0]);return;}if(e.IsNext){e.Image=Image.FromFileimages[currentImageIndex+ 1]);if(e.CurrentImageUpdated)++currentImageIndex;}elseif(e.IsPrev){e.Image=Image.FromFileimages[currentImageIndex- 1]);if(e.CurrentImageUpdated)--currentImageIndex;}}
This example demonstrates how to add the "Save As" and "Delete" options to the MVC Dashboard control.
It requires only a few changes to utilize the solution described in the T466716: Web Dashboard - How to work with extensions article in MVC:
1. Use the SetDashboardStorage method to define the default storage:
[C#]protectedvoidApplication_Start(){...DashboardConfigurator.Default.SetDashboardStorage(newDashboardFileStorage(Server.MapPath("~/App_Data/Dashboards")));
2. Handle the client-side Init event using the DashboardExtensionSettings.ClientSideEvents property:
[C#]@Html.DevExpress().Dashboard(settings=>{settings.Name="Dashboard";settings.ClientSideEvents.Init="onInit";}).GetHtml()
3. Define a controller action that should be used to delete dashboards:
[C#]publicActionResultDeleteDashboard(stringDashboardID){ CustomDashboardFileStoragenewDashboardStorage=newCustomDashboardFileStorage(@"~/App_Data/Dashboards"); newDashboardStorage.DeleteDashboard(DashboardID); returnnewEmptyResult();}
4. Customize the DeleteDashboardExtension.deleteDashboard function to call the server-side DeleteDashboard action using AJAX:
[JavaScript]this.deleteDashboard = function(){var dashboardid = _this._designer.dashboardContainer().id; $.ajax({ url: 'Home/DeleteDashboard', data: { DashboardID: dashboardid}, type: 'POST',}).success(function(){ _this._designer.close();});}
WebChartControl does not cache information about Series items and data source initialized at runtime. As a result, the Legend item checkbox state cannot be applied correctly. This example illustrates how to save the Legend state into a Session variable and restore it using the Page_Load event handler. The WebChartControl.LegendItemChecked event is used to obtain the current Legend panel state. Note that it is also required to disable the internal viewstate management using the WebChartControl.EnableViewState and WebChartControl.SaveStateOnCallbacks properties.
See also:
How to preserve the Legend checkbox item state when the Series Template approach is used to generate the Series collection;
How to preserve the Legend checkbox item state in an ASP.NET MVC application.
The sample provides a web user control(ThemeSelector) that can be used in your project. To use this control in your solution, execute these steps:
1. Copy following files, taking into account their location:
a. an xml file with theme groups and themes: Themes.xml.
b. classes that are responsible for getting and presenting data from Themes.xml: ThemeGroupModel.cs, ThemeModel.cs, ThemeModelBase.cs, ThemesModel.cs.
c. Sprite.png with images.
d. ThemeSelector.css with css classes.
e. ThemeSelector.ascx and ThemeSelector.ascx.cs.
2. Register the ThemeSelector web user control in your web.config file:
[ASPx]<pages><controls><addsrc="~/UserControl/ThemeSelector.ascx"tagName="ThemeSelector"tagPrefix="dx"/></controls></pages>
3. In the sample, a chosen theme is written to a cookie. To apply this theme from the cookie, subscribe to the Application.PreRequestHandlerExecute in your Global.asax file and handle it
in the following manner:
[C#]protectedvoidApplication_PreRequestHandlerExecute(objectsender,EventArgse){if(Request.Cookies["CurrentThemeCookieKey"]!=null){DevExpress.Web.ASPxWebControl.GlobalTheme=Request.Cookies["CurrentThemeCookieKey"].Value;}}
4. The ThemeSelector control allows you to show a popup left or right relative to the "Themes" anchor. Use the ThemeSelector.PopupAlign property. The default value is PopupAlign.Right.
[ASPx]<dx:ThemeSelectorrunat="server"ID="ts2"PopupAlign="Left"/>
Starting from v15.2, our SchedulerControl can now indicate the current time by drawing a line in the view out-of-the-box. In the Day, Work-Week, and Full Week views, the horizontal line can go across the entire view, or it can be restricted to the current date. See the DevExpress Scheduler controls: big changes are coming in v15.2 blog for more details. To customize the default Time Indicator painting, use the SchedulerControl.CustomDrawTimeIndicator event.
For versions older than 15.2, use the CustomDrawTimeCell event to draw a horizontal line across the scheduler indicating the current time in the Day and WorkWeek views.
Do you have a sample which works with WPF?
Added By: FieldAssist Development at: 9/25/2013 2:30:29 AMDo you have a sample to draw a vertical line in the timeline view ?
This example illustrates how to draw the Current Time Marker in the Time Ruler. To accomplish this task, handle the SchedulerControl.CustomDrawDayViewTimeRuler Event (calculate the Current Time Marker position and draw it manually in this event handler). Also, set the TimeRuler.TimeMarkerVisibility to Never to suppress drawing of a standard Current Time Marker.
See also:
How to draw a horizontal line indicating current time
This example is an illustration of the KA18686: ASPxGridView - How to implement CRUD operations with a custom data source KB Article. Refer to the Article for an explanation.
See Also:
How to insert, edit and delete data in a data table by ASPxGridView at runtime
This example isn't showing any of the code-behind.
Added By: Helen (DevExpress Support) at: 12/15/2015 9:53:42 AMHello,
I tried to open the example on my side and it displays the code behind for all versions, both VB.NET and C#. See the video. Try to reload the page by pressing Ctrl+F5 and check the example again. If the problem persists, specify your browser family and version.
ShowNewButton="True" for the
DetailRow
i wonder how can that be implemented
Hello,
I've created a separate ticket on your behalf (T384038: E257: Editing an in-memory dataset). It has been placed in our processing queue and will be answered shortly.
The problem is that the popup is not shown if there is[C#]protectedvoidgrid_RowUpdating(objectsender,DevExpress.Web.Data.ASPxDataUpdatingEventArgse){vartext=myTextBox.Text;if(string.IsNullOrEmpty(text)){MyMessageBox.Show(textNummer);e.Cancel=true;}else{grid.CancelEdit();e.Cancel=true;}}
Otherwise I get an exception if I don't set e.Cancel = true.[C#]e.Cancel=true;
Hello Petar,
I've created a separate ticket on your behalf (T453130: ASPxGridView - Batch Edit - How to show a message if data is invalid). It has been placed in our processing queue and will be answered shortly.
In the sample, a web UserControl is created, which allows you to do the following:
1. Get all DevExpress themes' names.
2. Choose what control (ASPxComboBox, ASPxMenu) to use for showing theme names. Use the UserControl.ControlType property.
3. Choose a request method(GET,POST) to reload a page and apply a new theme. Use the UserControl.RequestMethod property.
The selected theme is written to a cookie. The cookie value is got and applied in the Application.PreRequestHandlerExecute event handler.
The following example demonstrates how to create a toolbar similar to the one available in the XtraCharts Web Demo. This toolbar allows you to print a WebChartControl, export it to various formats (PDF, XLS, PNG, JPEG, BMP, TIFF, GIF), as well as change its palette and appearance.
NOTE: To be able to use this toolbar in your application, you need to have a license for the ASPxEditors assembly.
I need it's implementation with v14.2 . Really really urgent.
Also would be glad if you could elaborate<SeriesSerializable> tag.
Hello,
I've created a separate ticket on your behalf (T504847: WebChartControl - How to set Landscape printing mode). It has been placed in our processing queue and will be answered shortly.
This example demonstrates how to add groups to NavBarControl using PRISM. See the Implementation Details section to learn more on how to enable PRISM support in the selected DevExpress version.