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

How to change format for entering time value in the appointment editing form

$
0
0
Starting from 15.1.6, time editors of the default appointment form does not display seconds:

To modify appointment editing form, create an inherited form and show it instead of the default form.
To accomplish this, perform the following steps:

1. In the Visual Studio Designer, click the ShedulerControl's smart tag and select Create Custom Appointment Form.


2. The Customize Appointment Form dialog is displayed. Click OK.

3. The code of the CustomAppointmentForm class is added to the project and the EditAppointmentFormShowing event handler is added automatically.
4. Add code that changes the Mask Type of the time editors on the form, to the form's constructors, as illustrated in the code snippet below.
[C#]
publicCustomAppointmentForm(DevExpress.XtraScheduler.SchedulerControlcontrol,DevExpress.XtraScheduler.Appointmentapt):base(control,apt){InitializeComponent();this.edtStartTime.Properties.Mask.EditMask="T";this.edtEndTime.Properties.Mask.EditMask="T";}publicCustomAppointmentForm(DevExpress.XtraScheduler.SchedulerControlcontrol,DevExpress.XtraScheduler.Appointmentapt,boolopenRecurrenceForm):base(control,apt,openRecurrenceForm){InitializeComponent();this.edtStartTime.Properties.Mask.EditMask="T";this.edtEndTime.Properties.Mask.EditMask="T";}
[VB.NET]
PublicSubNew(ByVal control As DevExpress.XtraScheduler.SchedulerControl, ByVal apt As DevExpress.XtraScheduler.Appointment)MyBase.New(control, apt) InitializeComponent()Me.edtStartTime.Properties.Mask.EditMask = "T"Me.edtEndTime.Properties.Mask.EditMask = "T"EndSubPublicSubNew(ByVal control As DevExpress.XtraScheduler.SchedulerControl, ByVal apt As DevExpress.XtraScheduler.Appointment, ByVal openRecurrenceForm AsBoolean)MyBase.New(control, apt, openRecurrenceForm) InitializeComponent()Me.edtStartTime.Properties.Mask.EditMask = "T"Me.edtEndTime.Properties.Mask.EditMask = "T"EndSub
5. Run the project and double-click time cell in the Scheduler view to invoke the appointment editing form. Time editors display seconds:

How to use CardClick and CardDblClick together in ASPxCardView

$
0
0
This example illustrates how to use the client-side CardClick and CardDblClick events to perform different actions.

How to switch themes on a Master page at runtime

How to dynamically create a report in an ASP.NET Web Forms application (with a SQL query as a data source)

$
0
0

Description:
 I need to implement a generic kind of web report viewer to display the result of my SQL query, which accepts some parameters.

Solution:
 This can be done by creating an XRTable control dynamically.

To pass a table name (which is a query parameter), you can use a query string variable. As a result, you can pass the "TableName" parameter as follows:
http://hostname/PassSQLQuery/ReportViewer.aspx?TableName=Customers.

Then, the XtraReport code-behind methods will populate data using the SQL query, which returns all the table rows from the table.
In the final step, an XRTable control is created, and gets bound to the column names of the data table.

Question Comments

Added By: Krishna Raj 1 at: 8/27/2015 12:06:02 AM    

I have tried the below sample to my current project using dataset as the binding source but got the blank report at the end.

Added By: Vasily (DevExpress Support) at: 8/27/2015 1:56:13 AM    

Hello Krishna,

To process your recent post more efficiently, I created a separate ticket on your behalf: T282890: How to dynamically create a report in an ASP.NET Web Forms application. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

ASPxCardView - How to programmatically change a column's filter in the FilterExpression

ASPxGridView - How to implement the Select All feature for GridViewDataCheckBoxColumn when the Batch Edit mode is used

$
0
0
In this example, ASPxGridView is used in Batch Edit mode. The Discontinued column's HeaderTemplate is replaced with ASPxCheckBox. Clicking the header's check box causes setting all cells of the Discontinued column to true by using the ASPxClientGridViewBatchEditApi method.

ASPxGridView - How to implement the Select All feature for a column with ASPxCheckBox inside DataItemTemplate

$
0
0
This example demonstrates how to add the Select All feature to the ASPxGridView column header when ASPxCheckBox is placed to DataItemTemplate.
ASPxGridView is initialized and bound to the Northwind database in the page markup. The Discontinued column's data item and header are replaced with ASPxCheckBox. Click the CheckBox in the column header to perform a callback to the grid and set all cells of the Discontinued column to true.

How to: Drag-and-Drop GridControl Rows to the TreeList

$
0
0

This example demonstrates how to drag-and-drop rows from the Grid Control to the Tree List control. To support drag-and-drop operations within the GridView, set the ColumnViewOptionsBehavior.EditorShowMode property to either MouseUp or Click. This prevents a cell editor from being opened on the MouseDown event, as this event is used for initialization of drag-and drop operations. To allow the Tree List to accept data dropped onto it, set its AllowDrop property to true.
The TreeList.GetDXDragEventArgsDrag static method is used to convert drag event arguments to the DXDragEventArgs type. This allows you to get extended drag-and-drop parameters. The following parameters are used in this example:
- DXDragEventArgsDrag.TagetNode - the target node over which the row is dropped;
DXDragEventArgsDrag.DragInsertPosition - specifies how a node is inserted (as a child, before or after a node, or at the end of the node collection).
The TreeList is bound to a BindingList data source. Nodes are added using the AppendNode method overload, which takes an array of column values as a parameter. The order of values in this array should match the order of the public properties in the data source.

Question Comments

Added By: JJDX at: 8/27/2015 5:07:24 AM    

Hello, could you redone your example to not require VS 2015 or VS 2013 ? I think that many of us still use 2012. Thanks :)


How to show the ASPxCardView's detail information in the ASPxDataView

ASPxGridView - How to focus cells from top to bottom by Tab key pressing when the Batch Edit mode is used

ASPxGridView - How to implement navigation by Up/Left/Down/Right buttons when the Batch Edit mode is used

$
0
0
In this example, ASPxGridView is used in Batch Edit mode. This feature allows users to move focus from one editable cell to another. Navigation is performed by the Up/Left/Down/Right buttons.

How to select/unselect all check boxes using the check box in the GridColumn header

$
0
0

This sample illustrates how to create a check edit unbound column, place a check edit in the column header, and select/unselect all check boxes using one check box in the header.
You can get more information in the next KB article: How to implement multiple row selection behavior via a checked column.

Question Comments

Added By: Alexander (DevExpress Support) at: 5/17/2012 7:06:37 AM    

Hi all,

I have updated this solution to improve usability. I have created an attached behavior that can be used with ease. Simply add RowSelectionBehavior and to DXGrid to enable this functionality.

Added By: Charles Cuozzo at: 5/17/2012 8:10:03 AM    

This solution does not work for me. I am not including a Guid with the data supplied for an ItemsSource to the grid. What's more, the grid is implemented as a control template for the LookUpEdit control. I need to have a "select all" as well as check boxes in each row to either select all rows with a single click or select individual rows.

Added By: Alexander (DevExpress Support) at: 5/21/2012 3:16:28 AM    

Hi Charles,

Would you please create a separate ticket regarding this issue. We will research it and do our best to find the most appropriate solution according to your needs.

Added By: xiebbs xiebbs at: 9/9/2014 5:35:09 AM    

How to do for Winform ?

Added By: Andrey K (DevExpress Support) at: 9/9/2014 7:10:45 AM    I have created a separate ticket on your behalf in order to provide quicker and more efficient responses. We will answer you here: T148936: How to select/unselect all check boxes using the check box in the GridColumn header

Thanks,
AndreyAdded By: David_1 at: 3/9/2015 3:11:03 AM    

This does not work if in the SelectionView you set AllowEditing=False

Added By: Ivan (DevExpress Support) at: 3/9/2015 3:25:06 AM    

I see that you posted the same question in the T217070 ticket. Let's continue our discussion there.

Added By: Fs Developer at: 8/28/2015 10:40:27 AM    

Hi:

How can I specify a header text next to the checkbox, because I tried the Header property but nothing is displayed.

Added By: Alexander S (DevExpress Support) at: 8/28/2015 11:31:04 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T283649: How to add text into the SelectAll column header. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

How to display a custom ToolTip when hovering with the mouse over an appointment

$
0
0

This example illustrates how to customize an appointment ToolTip (by default, it invokes an appointment context menu). To do this, you should override a CustomAppointmentTooltip template of the ASPxScheduler (see Templates).

Basically, you can use the ASPxClientScheduler.RefreshClientAppointmentProperties Method to obtain standard and custom appointment fields (see CustomFields in AppointmentToolTip). However, in v2010 vol 2 we have implemented a simpler and more flexible mechanism for preparing arbitrary values (not only standard and custom field values) for a client-side appointment object: Provide the ability for the client appointments to always possess certain properties. In previous versions, a similar functionality can be achieved only when using custom JSProperties (see aspxscheduler tooltip).

Also, there is a CalculatePosition() method in the ASPxClientToolTipBase class. You can override it in the inheritor (custom tooltip) to provide custom coordinates as shown in the Appointment tooltip position thread.

Question Comments

Added By: Oleg Vetrov 1 at: 8/31/2015 1:16:47 AM    

This example works well in a browser. When viewing in the control System.Windows.Forms.WebBrowser I get an error. AppointmentToolTip pops up, but data is not available.

Added By: George (DevExpress Support) at: 8/31/2015 4:31:22 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T284011: An exception is thrown if the E3224 example was run with the System.Windows.Forms.WebBrowser component. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

How to: Determine if an axis title is being hovered by the mouse pointer

How to show parent nodes during filtering if at least one child nodes meets an applied filter when the HierarchicalDataTemplate mode is used

$
0
0

When the HierarchicalDataTemplate mode is used, the TreeListView creates child nodes only when you expand a parent node for the first time. So, the required step in this scenario is to expand all nodes to forcibly create them. To show parent nodes when child nodes are not filtered out, set the TreeListView.FilterMode property to "Extended".

For versions prior to 14.2:
By default, if a child node meets filter criteria but the parent node doesn't, the parent node is hidden. To change this behavior, it is necessary to handle the CustomNodeFilter event and implement filtering logic manually. To check whether or not a node meets filter criteria, use the ExpressionEvaluator.Fit method.


ASPxHtmlEditor - How to specify placeholders using dictionary and object structures

$
0
0

This example demonstrates how to replace placeholders with data specified as a dictionary and as an object. For this purpose, we use two overloads of the ReplacePlaceholders server-side method.

In this example, we have created Insert Signature and Insert Date buttons.

When the Insert Signature button is clicked, the FirstName and LastName placeholders are replaced using the ReplacePlaceholders(string html, Dictionary <String, String> placeholders) method. This method gets the placeholders contained in a dictionary.

When the Insert Date button is clicked, the DateNow and TimeNow placeholders are replaced using another ReplacePlaceholders(string html, object placeholders) method overload. This method gets the placeholders contained in an object.

ASPxGridView - How to filter dates by month

$
0
0

This example demonstrates how to add a custom filter to a DateTime column to filter dates by month. The example provides two ways of filtering the column: by the header filter and by the filter row.

ASPxHtmlEditor - How to implement custom toolbar buttons and modify default button functionality

$
0
0

ASPxHtmlEditor allows you to provide custom toolbar buttons and modify the functionality of default buttons.

In this example, two custom buttons are created: Clear and Add Signature. When a button is clicked, the CustomCommand event is triggered. In the event handler, the default select all and delete commands are executed using the ExecuteCommand method.

Additionally, we have modified the functionality of the default insert ordered list command. In the CommandExecuted event handler, which is triggered after the command is processed, we change the type of ordered list markers to Roman numerals.

How to resize columns when column headers are hidden

$
0
0

By default, columns can be resized only using column headers. However, when column headers are hidden (DataViewBase.ShowColumnHeaders is false), they cannot be used for resizing. To change column width in this scenario, the DXThumb element can be used. Create a DXThumb descendant and implement the IColumnPropertyOwner interface. Then, use this descendant in the CellTemplate.

XtraCharts Web Toolbar

$
0
0

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.

Question Comments

Added By: Saket Nalegaonkar at: 9/1/2015 4:34:14 AM    

I need it's implementation with v14.2 . Really really urgent.
Also would be glad if you could elaborate<SeriesSerializable> tag.

Added By: John (DevExpress Support) at: 9/1/2015 4:49:55 AM    Hi Saket,
I have created a separate ticket for this your question: Create XtraCharts Web Toolbar. Let's continue the conversation there.

Viewing all 7205 articles
Browse latest View live


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