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

OBSOLETE - How to represent a enumeration property via radio buttons or check boxes on the Web

$
0
0

==========================================================
This example is now obsolete. Refer to the How to represent an enumeration property via a drop-down box with check boxes one instead.
==========================================================

This example demonstrates how to implement property editors using our ASPxCheckBox and ASPxRadioButton controls to manage simple enumeration and flags properties:

[C#]
[Flags]publicenumComboboxEnum{None= 0,Value1= 1,Value2= 2 };publicenumRadioButtonEnum{Value1,Value2};[DefaultClassOptions]publicclassSampleObject:BaseObject{publicSampleObject(Sessionsession):base(session){}privateComboboxEnum_comboboxEnumProperty;publicComboboxEnumComboboxEnumProperty{get{return_comboboxEnumProperty;}set{SetPropertyValue("ComboboxEnumProperty",ref_comboboxEnumProperty,value);}}privateRadioButtonEnum_radioButtonEnumProperty;publicRadioButtonEnumRadioButtonEnumProperty{get{return_radioButtonEnumProperty;}set{SetPropertyValue("RadioButtonEnumProperty",ref_radioButtonEnumProperty,value);}}}

See Also:
Display a Property Via the Required Editor
Implement Custom Detail View Item
How to: Implement a Property Editor for a Web Site
How to: Implement a Property Editor for Windows Applications
How to bind a control in EditForm template to XPObject enumerable field

Question Comments

Added By: Sandro Welter (Intelligix) at: 11/8/2012 12:24:10 PM    

How to set this example as favorite?

Added By: Mohamed AIT LAHMID at: 2/21/2013 5:37:39 AM    

Thank you for your help.

I used RadioButtonEnumPropertyEditor :

        [Flags]
        public enum TopRecherche { Taxe = 0, Redevable = 1, LieuImposition = 2 };
         //..
        TopRecherche topRecherche;
        [ImmediatePostData]
        [ModelDefault("PropertyEditorType", "iclRegie.Module.Web.Editors.RadioButtonEnumPropertyEditor")]
        public TopRecherche TopRecherche
        {
            get { return topRecherche; }
            set
            {
                if (!IsLoading && !IsSaving && value != topRecherche)
                {
                    redevable = null;
                }
             }
        }
        p_Redevables redevable;
        [ImmediatePostData]
        public p_Redevables Redevable
        {
            get { return redevable; }
            set
            {
                SetPropertyValue<p_Redevables>("Redevable", ref redevable, value);
            }
        }

But the value of the property 'Redevable' is not changed when i changed the value of 'TopRecherche' in web page.

Added By: Sabine Dijt at: 8/27/2013 2:40:20 AM    

If I add more options to the enum it doesn't save right. It automatically checks every other option.
I'm using v13.1.5 btw. Is there any reason it wouldn't work in this version?

Added By: MohammedFarooq at: 11/20/2013 8:55:09 AM    

Can you post the equivalent code for v2013 vol 1.8?

Added By: Pauline Abou haidar at: 9/3/2014 4:20:12 AM    

Hi,
Please for the lines
radioButton.CheckedChanged += New EventHandler(AddressOf radioButton_CheckedChanged)

radioButton.CheckedChanged -= New EventHandler(AddressOf radioButton_CheckedChanged)

i need the equivalent in vb.net

and why if i put immediatepostdata= true for a property of radiobuttonenumpropertyeditor, it refreshes the selected value to the default every time i try to choose one.

Thanks and best regards

Added By: Dennis (DevExpress Support) at: 9/3/2014 12:43:26 PM    

@Pauline:

Hese is the VB.NET code you are looking for:

[VB.NET]
AddHandler radioButton.CheckedChanged, AddressOf radioButton_CheckedChanged RemoveHandler radioButton.CheckedChanged, AddressOf radioButton_CheckedChanged

  

As for the behavior you described, it looks like an issue in this implementation. However, it is now obsolete and we no longer support this example code. I suggest you refer to the latest example mentioned in example's description.


How to bind a date-time chart range control client to a datasource and customize its common settings

$
0
0

This example demonstrates how to set up a range control with the date-time chart client to display a chart with date-time data in the range control's background.

In order to provide data to a chart date-time range control client, you need to access the ChartRangeControlClientDataProvider object using the ChartRangeControlClientBase.DataProvider property and assign a data source to the ChartRangeControlClientDataProvider.DataSource  property. Then specify the required data fields via the ChartRangeControlClientDataProvider.ArgumentDataMember, ChartRangeControlClientDataProvider.ValueDataMember, and ChartRangeControlClientDataProvider.SeriesDataMember (optional) properties.

In the current example, a date-time chart client is bound to a simple data table containing three columns ("Argument", "Value", and "Series").

In addition, this example shows how to customize chart client common settings (e.g., change the date-time range, customize template view and grid options).

Question Comments

Added By: Al Dyachkov at: 8/20/2014 3:08:54 PM    

There is an error in this sample

This part sets fixed range,

// Change the date-time range of the chart range control client.
dateTimeChartRangeControlClient1.Range.Min = new DateTime(2014, 7, 6);
dateTimeChartRangeControlClient1.Range.Max = new DateTime(2014, 7, 28);

while data generation uses DateTime.Now

row["Argument"] = DateTime.Now.Date.AddDays(pointIndex);

The code should be something like this :

// Change the date-time range of the chart range control client.
dateTimeChartRangeControlClient1.Range.Min = DateTime.Now;
dateTimeChartRangeControlClient1.Range.Max = DateTime.Now.AddDays(50);

Added By: Alexander T (DevExpress) at: 8/21/2014 12:42:31 AM    

Hi Al,

Thank you for the remark. We have corrected the example.

 

Added By: Samson Bassett at: 9/3/2014 2:47:23 PM    

Just wanted to thank you, as the DX docs are pretty terrible and this helped me a ton.

One error you have though is this

'DevExpress.XtraEditors.RangeControlDateTimeGridAlignment' is a 'type' but is used like a 'variable'

Perhaps you meant something like this

dateTimeChartRangeControlClient1.GridOptions.SnapAlignment = DevExpress.XtraEditors.RangeControlDateTimeGridAlignment.Day;

Added By: Alexander T (DevExpress) at: 9/4/2014 1:42:48 AM    

Hello Samson,

The example works correctly on my side. Would you please create a separate ticket for your issue and upload a sample project there?

We will be glad to help you.

Lesson 2 - Binding Commands in the WinForms MVPVM application

$
0
0
Question Comments

Added By: Wade Fleming at: 9/4/2014 4:28:54 AM    

Is there a description/overview to go along with these MVPVM examples?

Added By: Olga (DevExpress Support) at: 9/4/2014 5:44:54 AM    Hello,
You can find these lessons there: WinForms MVPVM
Please let us know if you have further questions.

ASPxGridView - How to sort by multiple columns (as in MS Excel)

$
0
0

This sample illustrates how to sort the ASPxGridView by multiple columns using a custom sort popup.

How to print or export a report from code without first previewing it

$
0
0

This sample illustrates how you can print or export a report from code in a Silverlight application.

Question Comments

Added By: Mukesh Chandra at: 1/2/2014 3:27:43 AM    

Is it possible to print a report from code without previewing it in v2011.1.12

Added By: Igor D (DevExpress) at: 1/3/2014 7:07:06 AM    

I've updated the example and published a version compatible with the DXperience version 11.1.12. I would also strongly recommend upgrading, since version 11.1 is very old.

How to: Print a report without displaying a preview

How to save a layout of LayoutControl together with its child controls

$
0
0

By default, if you save a layout of LayoutControl, settings of layout items are saved (Save and Restore Layout ). When you load the saved layout, layout items will be created with saved settings only if LayoutControl contains child controls, whose names exist in the saved layout. Otherwise, layout items will not be created. 


This example illustrates how to save settings of the child controls, too. For this, we have created two extension methods: SaveLayoutExToXml and RestoreLayoutExFromXml. These methods allow you to save and load child controls' settings. It makes sense to use these methods if it is necessary to re-create child controls from the saved layout with the saved settings. If a child control with the same name exists in LayoutControl, it will be removed and replaced by a new one retrieved from the saved layout. This approach is based on using a custom XmlXtraSerializer class. 

Question Comments

Added By: Ho-Jun Seo at: 9/4/2014 5:42:36 PM    

I am using version 12.1.12. It only has SaveLayoutToXml()  and RestoreLayoutFromXml(). So I cannot restore my layout with childs controls.
How can I use SaveLayoutExToXml()  and RestoreLayoutExFromXml() methods?

Added By: Andrey (DevExpress Support) at: 9/4/2014 11:03:29 PM    

Hello,
As I can see, you have created a separate How to use SaveLayoutExToXml() and RestoreLayoutExFromXml() methods?  thread. 

Since our support policy implies that every ticket is devoted to a separate issue, let's continue our discussion there.

Lesson 1 - Creating a Simple WinForms MVPVM Applicaiton

$
0
0
This example demonstrates how to build a simple WinForms application that follows the MVPVM pattern. A complete step-by-step description for this example is available here .

Lesson 3 - Create a WinForms MVPVM applicaiton with multiple Views

Lesson 4 - Simple Navigation in MVPVM Application

$
0
0
A complete step-by-step description for this example is available here.

XtraForm - How to implement colorful forms

How to add a watermark with a text or image to the document

$
0
0

This example illustrates how you can add a watermark to the document. The main idea is to add a corresponding Floating Object (TextBox or Picture) to the header section (see SubDocument essentials - simple examples). Take special note of the TextRenderer.MeasureText Method, which is used to calculate the correct size of a textual watermark.

See Also:
SubDocument.InsertPicture Method
SubDocument.InsertTextBox Method

Question Comments

Added By: TRAINEAU SOIZIC at: 10/24/2012 3:42:24 AM    

Don't work for me with the last build :
the text on the page (the real one : not the watermark text) disapears from left to right when zooming ... try to set the zoom at 200 %

Added By: TRAINEAU SOIZIC at: 10/24/2012 3:45:14 AM    

in fact it seems that it is a horizontal scrollbar problem ... try to zoom and play with Hscrolling

Added By: Anders Wang at: 9/4/2014 11:57:01 PM    

But, After you save as it to word, You can see the layout is corrupted by the watermark. So how to deal with it?

Added By: Elliot (DevExpress Support) at: 9/5/2014 6:32:17 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T147935: Corrupted document layout. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

How to create fully custom Role, User, Event, Resource classes for use with the Security and Scheduler modules

$
0
0

This example demonstrates how to create fully custom classes for use in our Security Module (Complex Security Strategy) and Schedule Module.
Here is the Activity class, which is an analog of our standard Event class. It is used to represent appointments in the Scheduler Control.
The Employee is an analog of the standard User class. The Group class is an analog of our standard Role class. Two last classes are used as base classes to organize Complex Security Strategy for your application.
Take special note that in addition to security purposes, the Employee class supports the IResource interface, and this allows us to use objects of this class as resources in our custom "appointment" class.
I have also implemented two popular filtering tasks here: filtering appointments by the current logged employee and also filtering resources to show only those owned by the current logged employee.

IMPORTANT NOTES
1. When you implement this solution in your project, do not forget to turn on custom security classes by setting the RoleType and UserType properties for the Security Complex component within the Application Designer.
2. The filtering appointments and resources (plus sorting of resources) is provided by the SchedulerActivityListViewControllerBase class and its descendants. Please take special note that these controllers filter resources as follows:
   a. Administrator account (Sam, to log on, leave the Password field empty) sees all the resources and appointments in the root scheduler view.
   b. Non-Administrator account (John, to log on, leave the Password field empty) sees only his own resources and appointments in the root scheduler view.
   c. Both Administrator and Non-Administrator accounts see their own resources and appointments in the nested scheduler view.

3. You can use these controllers for study purposes, since they demonstrate the most common filtering scenarios in the scheduler view. If you do not need all this specific functionality, remove these controllers and create your own ones (perhaps based on the provided example code) that will do only your specific task. For example, the controllers from this example are not suitable in the nested scheduler view because you miss some part of the default Link/Unlink functionality since the scheduler view is always filtered to show only its own resources and appointments.That may not be desired because you may want to have the capability to link appointments from other resources, but they won't be shown due to the above. Plus, these demo controllers are unnecessary for appointments filtering in the nested scheduler view, because by default, in this view only appointments from the current resources are shown.

See Also:
Security System Overview
Scheduler Module Overview

Question Comments

Added By: Ad de Rijke at: 5/19/2014 4:52:28 AM    

The Web project does not compile: 'The type or namespace name 'WinWebSolutionAspNetApplication' could not be found (are you missing a using directive or an assembly reference?)'

Added By: Dennis (DevExpress Support) at: 5/20/2014 3:31:16 AM    @Ad: For some reason the WebApplication.cs file was emptied. I have attached a working sample for your reference. I will also update this example as well.

How to create a RibbonControl

$
0
0

This example shows how to create a RibbonControl in XAML.

Question Comments

Added By: James Doran at: 9/7/2014 6:55:52 PM    

The "example" download file has a dxsample extension which should be "zip"

How to implement cascaded combo box columns in ASPxGridView without using templates

$
0
0

The example illustrates how to create an editable grid with cascaded combobox columns. The implementation of the example includes the handling of manual callbacks and providing items for appropriate arguments.
By default, the combobox column uses a datasource that displays all records to show a user Text values instead of record keys.

Question Comments

Added By: Deborah Carter at: 5/9/2014 3:45:18 AM    

I looked at the code below and it looks like what I have.  The page just never gets to it.  Here is the complete asp page:

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="mnt_Person.aspx.vb" Inherits="mnt_Person" %>

<%@ Register assembly="DevExpress.Web.v13.2, Version=13.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.2, Version=13.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <script type="text/javascript">
   // <![CDATA[
      var lastServiceDivNo = null;
      function OnServiceDivNoChanged(cmbServiceDivisionNm) {
          if (grid.GetEditor("ServiceAreaNm").InCallback())
              lastServiceDivNo = cmbServiceDivisionNm.GetValue().toString();
          else
              grid.GetEditor("ServiceAreaNm").PerformCallback(cmbServiceDivisionNm.GetValue().toString());
      }
      function OnEndCallback(s, e) {
          if (lastServiceDivNo) {
              grid.GetEditor("ServiceAreaNm").PerformCallback(lastServiceDivNo);
              lastServiceDivNo = null;
          }
      }
   // ]]>
   </script>
   <asp:Label ID="Label2" runat="server" CssClass="pageheader" Width="100%" Text="Supervisor Maintenance"></asp:Label>
   <br />
   <dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" AutoGenerateColumns="False"
       DataSourceID="SqlDataSource1" KeyFieldName="Person_Key">
       <Columns>
          <dx:GridViewCommandColumn ShowClearFilterButton="True" ShowNewButton="True"
               VisibleIndex="1">
           </dx:GridViewCommandColumn>
           <dx:GridViewDataTextColumn FieldName="Person_Key" VisibleIndex="2">
               <EditFormSettings Visible="False" />
           </dx:GridViewDataTextColumn>
           <dx:GridViewDataTextColumn FieldName="Supervisor_No" VisibleIndex="3">
           </dx:GridViewDataTextColumn>
           <dx:GridViewDataComboBoxColumn FieldName="ServiceDivisionNm" VisibleIndex="4">
               <PropertiesComboBox DataSourceID="SqlDataSource2" TextField="ServiceDivisionNm" EnableSynchronization="False"
                   ValueField="ServiceDivisionNo">
                    <ClientSideEvents SelectedIndexChanged="function(s, e) {OnServiceDivNoChanged(s); }"></ClientSideEvents>
                </PropertiesComboBox>
           </dx:GridViewDataComboBoxColumn>
           <dx:GridViewDataComboBoxColumn FieldName="ServiceAreaNm" VisibleIndex="5">
               <PropertiesComboBox EnableSynchronization="False">
               <ClientSideEvents EndCallback="OnEndCallback"></ClientSideEvents>
               </PropertiesComboBox>
           </dx:GridViewDataComboBoxColumn>
                       <dx:GridViewDataTextColumn FieldName="TransNoPrefix" VisibleIndex="8">
           </dx:GridViewDataTextColumn>
           <dx:GridViewDataTextColumn FieldName="Supervisor" VisibleIndex="9">
           </dx:GridViewDataTextColumn>
           <dx:GridViewDataCheckColumn FieldName="IsActive" VisibleIndex="10">
           </dx:GridViewDataCheckColumn>
       </Columns>
       <SettingsEditing Mode="Batch">
       </SettingsEditing>
       <Settings ShowFilterRow="True" />
       <SettingsCommandButton>
           <ClearFilterButton Text="Clear">
           </ClearFilterButton>
       </SettingsCommandButton>
       <SettingsDataSecurity AllowDelete="False" />
   </dx:ASPxGridView>
   

   <asp:SqlDataSource ID="SqlDataSource2" runat="server"
       ConnectionString="<%$ ConnectionStrings:CCFieldServiceConnectionString %>"
       SelectCommand="SELECT distinct [ServiceDivisionNo], [ServiceDivisionNm] FROM [dim_Organization]">
   </asp:SqlDataSource>
   
   <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:CCFieldServiceConnectionString %>"
       SelectCommand="SELECT distinct [ServiceAreaNo], [ServiceAreaNm] FROM [dim_Organization] WHERE ServiceDivisionNo = ? ">
       <SelectParameters>
           <asp:Parameter Name="?" />
       </SelectParameters>
   </asp:SqlDataSource>

   <asp:SqlDataSource ID="SqlDataSource1" runat="server"
       ConnectionString="<%$ ConnectionStrings:CCFieldServiceConnectionString %>"
       
       SelectCommand="SELECT dbo.dim_Person.Person_Key, dbo.dim_Person.Supervisor_No, dbo.dim_Person.TransNoPrefix, dbo.dim_Person.Supervisor, dbo.dim_Person.IsActive, dbo.dim_Organization.ServiceAreaNm, dbo.dim_Organization.ServiceDivisionNm FROM dbo.dim_Person INNER JOIN dbo.dim_Organization ON dbo.dim_Person.ServiceDivisionNo = dbo.dim_Organization.ServiceDivisionNo AND dbo.dim_Person.ServiceAreaNo = dbo.dim_Organization.ServiceAreaNo WHERE (dbo.dim_Person.IsActive = 1)">
     
   </asp:SqlDataSource>
   

</asp:Content>

Added By: Larry (DevExpress Support) at: 5/9/2014 5:31:02 AM    Hello Deborah,

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

How to implement cascaded combo box columns in ASPxGridView without using templates

Please refer to it for further correspondence.

 

Added By: S Abowitz at: 8/25/2014 10:26:50 AM    

I don't understand how this code work for new rows if in the grid_celleditorinitialize sub, if checks If (Not grid.IsNewRowEditing) Then before getting the filter value, so how does the second combo prefill for new rows after country is selected?

Please explain,

Added By: Mike (DevExpress Support) at: 8/25/2014 11:54:17 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T143924: E3689 - ASPxGridView - How to filter child combobox when IsNewRowEditing = False. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Sathish Rao at: 9/7/2014 11:13:12 PM    

Can you please share the sample code of this for an MVC application.
Thank you

Added By: Larry (DevExpress Support) at: 9/7/2014 11:23:10 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: <sclink viewType="IDSubject" id="T148238 />. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Entity Framework CodeFirst model for XtraScheduler data binding

$
0
0

This example illustrates how to create an appointment and resource model by using Code First development and then use the types defined in the model as data sources for the SchedulerStorage component in the XtraScheduler WinForms application.

The Color property of the Resource does not necessarily have to be split into ARGB components in the database. It is done in this project for illustrative purpose only. Note that the ColorSaving property determines how resource color value is interpreted.

For a walkthrough on data binding with Windows Forms refer to the MSDN article Entity Framework: Data Binding with Windows Forms.

See also:
E4504: How to bind SchedulerControl to Entity Framework by using Entity Data Model

Question Comments

Added By: Enrique Thedy at: 9/8/2014 6:42:27 PM    

Hi! Great article! I think that you need to update the link to MSDN, now the article about databinding with winForms is at http://msdn.microsoft.com/en-us/data/jj682076
Best regards!
Enrique Thedy

How to bind TileBar to a collection of items

$
0
0

To use TileBar according to the MVVM, pattern, you can generate TileBarItems from a collection. To accomplish this task, assign a collection to the TileBar.ItemsSource property. To change properties of generated TileBarItems, use the TileBar.ItemContainerStyle property. If it's necessary to build a multi-level hierarchy, put TileBar into TileBarItem.FlyoutContentTemplate. 

How to obtain a dashboard item's client data in the Web Viewer

$
0
0

 

The following example demonstrates how to obtain client data corresponding to a particular visual element using ASPxDashboardViewer's client-side API.

In this example, the ASPxClientDashboardViewer.ItemClick event is handled to obtain client data and invoke the dxPopup widget with the child dxChart.

In the event handler, the ASPxClientDashboardItemClickEventArgs.GetData method is called to obtain dashboard item's client data. The ASPxClientDashboardItemClickEventArgs.GetAxisPoint method returns the axis point corresponding to the clicked card while the ASPxClientDashboardItemData.GetSlice method returns the slice of client data by this axis point.
To obtain axis points belonging to the "Sparkline" data axis, the ASPxClientDashboardItemDataAxis.GetPoints method is used. Corresponding actual/target values are obtained using the ASPxClientDashboardItemData.GetDeltaValue method.

The dxChart is used to display the detailed chart showing a variation of actual/target values over time.




How to create a TimeEdit descendant which will allow editing and displaying TimeSpan values

$
0
0

This example shows how to create a TimeEdit descendant which will allow editing and displaying TimeSpan values, and entering more than 24 hours.

See Also:
How to create a custom editor that will allow editing TimeSpan values

Question Comments

Added By: Stefan Guc at: 6/7/2013 9:36:08 PM    

Hi,

Can this be upgraded to v2013 vol 1.4.

Thanks,
Stefan.

Added By: Norbert Kustra at: 6/13/2013 7:09:19 AM    

Hello, I am waiting for 2013.1.4 upgrade.
Thanks Norbert

Added By: Arnaud Chevallier at: 11/29/2013 2:34:35 AM    

Hello All,

When I use this editor directly in a DevExpress.XtraBars.Ribbon.RibbonForm the Designer generates this code:

            //
            // tsEditDuration
            //
            this.tsEditDuration.EditValue = System.TimeSpan.Parse("00:00:00");
            this.tsEditDuration.Location = new System.Drawing.Point(74, 50);
            this.tsEditDuration.MenuManager = this.ribbon;
            this.tsEditDuration.Name = "tsEditDuration";
            this.tsEditDuration.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.tsEditDuration.Properties.DisplayFormat.FormatString = "HH:mm:ss";
            this.tsEditDuration.Properties.EditFormat.FormatString = "HH:mm:ss";
            this.tsEditDuration.Properties.Mask.EditMask = "HH:mm:ss";
            this.tsEditDuration.Size = new System.Drawing.Size(100, 20);
            this.tsEditDuration.TabIndex = 0;

So far everythings are fine.

But when I use this editor in a custom control derived from DevExpress.XtraEditors.XtraUserControl the Designer generates this code:

            //
            // tsEditDuration
            //
            this.tsEditDuration.EditValue = System.TimeSpan.Parse("00:00:00");
            this.tsEditDuration.Location = new System.Drawing.Point(215, 110);
            this.tsEditDuration.Name = "tsEditDuration";
            this.tsEditDuration.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.tsEditDuration.Properties.DisplayFormat.FormatString = "HH:mm:ss";
            this.tsEditDuration.Properties.EditFormat.FormatString = "HH:mm:ss";
            this.tsEditDuration.Properties.EditValueChangedFiringMode = DevExpress.XtraEditors.Controls.EditValueChangedFiringMode.Default;
            this.tsEditDuration.Properties.Mask.EditMask = "(0(\\R.([0-1]\\d|2[1-3])|\\d)|1(\\R.(0\\d|1[0-1])|\\d)|2\\d|3[0-5])\\R:[0-5]\\d\\R:[0-5]\\d";
            this.tsEditDuration.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
            this.tsEditDuration.Size = new System.Drawing.Size(89, 20);
            this.tsEditDuration.TabIndex = 14;

In the second case I can't edit the value. The EditMask string is displayed instead of the actual value. As a workaround you need to edit the designer generated code.

Regards,
Arnaud.

Added By: Constant (DevExpress Support) at: 12/24/2013 3:37:58 AM    

I have tried to replicate the issue but have not noticed any issues. If you still experience the same problem, please create a separate ticket regarding it and describe the issue in greater detail. A sample project demonstrating the problem will be very helpful.

Added By: Jackson Cheng at: 7/9/2014 3:10:17 AM    

Hi,
How can I force the format to be like 00:00:00 instead of 0:00:00?
I tried changing the culture fed to the manager or the _Hxxx in FormatInfo but they seem to be the wrong place.
Thanks.

Added By: Mariya (DevExpress Support) at: 7/9/2014 4:59:00 AM    Hi Jackson,
I have created a new ticket on your behalf and passed it to our team for research: How to change TimeSpan value format in the TimeEdit descendant class .

Added By: Trungpos SD at: 9/9/2014 1:54:57 AM    

How can I export it to a .dll file?

Added By: Andrey (DevExpress Support) at: 9/9/2014 4:36:55 AM    

Hello,
To accomplish this task, create a new Class Library project and then replace default code with custom control class code.

Should you have further questions, let me know.

How to display a check box within column headers

$
0
0

This example demonstrates how to display a check box within column headers. If the check box is checked, the corresponding column is made read-only. Uncheck the check box to allow column values to be edited.

Question Comments

Added By: xiebbs xiebbs at: 9/9/2014 5:34:50 AM    

How to do for Winform ?

Added By: Andrey K (DevExpress Support) at: 9/9/2014 7:05:04 AM    Hi,

I have created a separate ticket on your behalf in order to provide quicker and more efficient responses. We will answer you here: T148932: How to display a check box within column headers

Thanks,
Andrey
Viewing all 7205 articles
Browse latest View live


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