Showing posts with label Devexpress. Show all posts
Showing posts with label Devexpress. Show all posts

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

Friday, November 11, 2011

How to hide/disable Day/Month/WorkWeek/Timeline views in devexpress Aspxscheduler


How to hide DayView/WorkWeekView/Month View/Timeline Views in deexpress ASPxScheduler.
How to disable DayView/WorkWeekView/Month View/Timeline Views in deexpress ASPxScheduler.

Here schTaskCalendar is ASPxScheduler ID which is used in our requirement

Use the following code lines in your Page_Load. it will hides/disables  DayView/WorkWeekView from your ASPxScheduler control.

Code:

protected void Page_Load(object sender, EventArgs e)
{
  DevExpress.Web.ASPxScheduler.SchedulerViewRepository baseviews = schTaskCalendar.Views;
            baseviews.DayView.Enabled = false;
            baseviews.WorkWeekView.Enabled = false;
}