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

How to disable a dragged node image in TreeList

$
0
0

This example demonstrates how to disable painting of a dragged node image


GridView- How to restore state of grid detail rows if the user leaves a page and then returns back

$
0
0

This example demonstrates how to restore state of grid detail rows if the user leaves a page and then returns back.

To accomplish this task, perform the following:

1) Disable the page's cache as it is described in the Why controls do not work properly when clicking browser Back / Forward buttons article.

2) Handle the grid's DetailRowExpandedChanged event to save the expanded state. The session is used in this example.

[C#]
</para><para>settings.DetailRowExpandedChanged=(s,e)=>{</para><para>if(e.Expanded)</para><para>rows.Add(e.VisibleIndex);</para><para>else</para><para>rows.Remove(e.VisibleIndex);</para><para>};</para><para>

3) Handle the grid's client-side Init event to send a get request to the server to see if it is necessary to expand rows.

[JScript]
</para><para>function OnInit(s, e){</para><para> $.ajax({</para><para> type: "GET",</para><para> dataType: "text",</para><para> url: '@Url.Action("ShouldSendCallback", "Home")',</para><para> success: function(sendCallback){</para><para> if(sendCallback)</para><para> GridView.PerformCallback();</para><para> }</para><para> });</para><para>}</para><para>

4) Handle the grid's BeforeGetCallbackResult event to expand detail rows during the callback if necessary.

[C#]
</para><para>settings.BeforeGetCallbackResult=(s,e)=>{</para><para>vargrid=sasMVCxGridView;</para><para>if(rows.Count!=grid.DetailRows.VisibleCount){</para><para>foreach(intiteminrows){</para><para>grid.DetailRows.ExpandRow(item);</para><para>}</para><para>grid.PageIndex=Convert.ToInt32(Session["curPage"]);</para><para>}</para><para>Session["curPage"]=grid.PageIndex;</para><para>};</para><para>

ASPxGridView - How to set a group row content using a summary value

$
0
0

This example demonstrates how to set a group row content using a summary value.

GridView - How to set a group row content using a summary value

$
0
0

This example demonstrates how to set a group row content using a summary value.

ASPxGridView - How to specify the CommandButtons’ and Custom CommandButtons’ properties based on any custom criteria

$
0
0

The example demonstrates how to specify the CommandButtons and Custom CommandButtons properties by handling the CommandButtonInitialize and CustomButtonInitialize events. The DataRows' VisibleIndex property and criteria set based on field values are used to determine the buttons' visibility.

How to customize command buttons in individual rows

ASPxGridView - How to calculate and set column values in the Edit Form on the client side and server side

How to integrate a charting module - example solution


How to implement a custom inplace editor for appointments

$
0
0

This example demonstrates how you can implement a custom editing form that will be invoked instead of the default inplace editor.
See the How to: Customize an Inplace Editor document for a step-by-step guide.

How to reorder ASPxTreeList sibling nodes, using buttons or drag-and-drop

$
0
0

This example demonstrates how to move TreeList nodes using buttons or Drag&Drop.

To persist the node order, it is necessary to set up an extra column to store node order indexes. Then, sort TreeList nodes by this column and deny sorting by other columns. This example stores this information in a dynamically created column and additionally, puts a dictionary "node key = node index" in the session. We have implemented this approach only for demo purposes. You can store this information in your DataSource.

Example Comments

Added By: darryl deen at: 12/12/2012 12:07:52 PM    

Any example of this using your ASP.NET MVC extensions?

Also, is there an example where you can move all the nodes anywhere. i.e. move a child node to another parent in a specific spot/order?

How to select/unselect rows by clicking on them (like Multiple SelectionMode of ListBox)

$
0
0

This sample shows how to implement the MultiSelection behavior by clicking on rows

How to bind a report to eXpress Persistent Objects (XPO)

How to use ASPxGridLookup in multiple selection mode as the ASPxGridView editor

How to use XtraReports in a WPF application

$
0
0

This example demonstrates how you can add an XtraReport to a WPF application, and show its print preview in a separate window.

Depending on your application design, you can invoke the Document Preview that displays a ready-to-print report document either by using the PrintHelper class or by assigning your report instance to the XtraReportPreviewModel object.

For a step-by-step tutorial, see How to: Use XtraReports in WPF.

How to attach a client-side event with a dynamic argument to a template button

$
0
0

This example demonstrates how to embed a button into a grid cell, and attach a client-side Click event to it. The event calls a function, which gets the grid row key as a parameter. This function can be used to process the clicked row either on the client or the server.


How to show the ASPxLoadingPanel while the content is loading inside the ASPxSplitter pane

$
0
0

If you have an ASPXSplitter control and want to display content from another page in one of the panels, you can show a loading panel, reflecting this process. This example demonstrates how to use the ASPxLoadingPanel and iframe element for this purpose.

The ASPxLoadingPanel.Show method is called by the script when a page content is loaded. The ASPxLoadingPanel is hidden in the iframe.onload event handlers.

How to limit LayoutGroup customization at runtime

$
0
0

We have prepared an example demonstrating how to limit LayoutGroup customization at runtime.

To provide this functionality, we created a DockLayoutManager class descendant and the attached DisableCrossingGroupBoundaries property. The DisableCrossingGroupBoundaries property can be attached only to the LayoutGroup.

In this case, the LayoutGroup with the property assigned to true allows any customization and prevents moving inner elements outside LayoutGroup boundaries. For the LayoutGroup without this property, the default logic is used for arranging elements.

A custom toolbar button with Checked and DropDown styles

$
0
0

A custom toolbar button with Checked and DropDown styles
The BarButtonItem provides a ButtonStyle property. It allows you to make your button act like a check box or implement a down arrow that opens a dropdown control, for it. However, there is no option to activate the Check and DropDown button styles simultaneously. Here comes the XtraBars extensibility that allows you to create custom toolbar items with the required behavior.

This example shows how to implement a custom bar button that can stick in the pressed state and that also has a down arrow button to open a dropdown menu with additional commands or options.

See Also:
How to create descendants of the BarManager, and other classes that are needed for its infrastructure
How to change the font color when a baritem is highlighted
How to change the background color of highlighted links

How to create a component which automatically create menus, submenus and buttons for all registered skins

How to change a skin element programmatically

Viewing all 7205 articles
Browse latest View live


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