Tuesday, January 24, 2012

How to apply normal asp.net control style to Devexpress Controls


By default, most editors from the ASPxGridView and Editor Library are rendered using a 
specifically designed custom layout implemented with the help of standard HTML elements, such as HTML TABLEs, DIVs, SPANs, etc. This allows an editor's appearance to be fully customized by applying a specific style to each composite element of the editor.


 To apply normal asp.net control style to Devexpress control you need to set property called "Native=true" to the devexpress control


In some cases, the application logic might require representing editors as native HTML INPUT elements of the corresponding types. This demo illustrates how our editors (such as the ASPxTextBox, ASPxMemo, ASPxListBox, ASPxComboBox and ASPxButton) support native rendering. In order to use an editor in native mode, set the Native property to true. In native mode, an editor's render size may be significantly reduced, which improves the editor's overall performance.

Only the controls that can be rendered into a standard HTML element provide the Native property. These controls are:
  1. ASPxButton is rendered as <input type="button"/> or <input type="submit"/> (see input Object).
  2. ASPxTextBox is rendered as <input type="text"/> or <input type="password"/>.
  3. ASPxCheckBox is rendered as <input type="checkbox"/>.
  4. ASPxComboBox and ASPxListBox are rendered as <select /> (see select Object).
  5. ASPxMemo is rendered as <textarea />  
Example: 

 To apply normal asp.net control style to Devexpress Radio button list  need to use "Native=true" to the devexpress control

 <dxe:ASPxRadioButton runat="server" Native="true"></dxe:ASPxRadioButton>

 


Demo App:


    http://demos.devexpress.com/ASPxEditorsDemos/Features/NativeMode.aspx

1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.
    or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

    ReplyDelete