This example demonstrates how to disable painting of a dragged node image
How to disable a dragged node image in TreeList
GridView- How to restore state of grid detail rows if the user leaves a page and then returns back
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
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
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
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
This example demonstrates how to hide a command button in the grid's CommandColumn by handling the ASPxGridView.CommandButtonInitialize event.
See Also:
How to hide a cell value
How to hide template controls in individual cells
ASPxGridView - How to calculate and set column values in the Edit Form on the client side and server side
This example implements the approach demonstrated in the KA18839: ASPxGridView - How to calculate and set column values in the Edit Form on the client side and server sideKB article.
How to integrate a charting module - example solution
This solution includes ready-to-use project templates for the Implementing a charting module with the XtraCharts SuiteKB article.
How to implement a custom inplace editor for appointments
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
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)
This sample shows how to implement the MultiSelection behavior by clicking on rows
How to bind a report to eXpress Persistent Objects (XPO)
This example demonstrates how to bind an XtraReport to an eXpress Persistent Objects (XPO) data source.
Note that a report that uses XPCollection as its data source, should always have a nonzero session.
See also:
- Creating and Displaying Reports using XPO;
- How to save and restore reports using XPcollection as a data source;
- How to serialize an XPO data source.
How to use ASPxGridLookup in multiple selection mode as the ASPxGridView editor
This example is an illustration of the Documentation - Add information about the use of the ASPxGridLookup.Value property in Multiple SelectionMode suggestion.
It illustrates how to use ASPxGridLookup in a multiple selection mode (SelectionMode=Multiple) as the ASPxGridView editor.
ASPxGridLookup is bound with an enumerable value containing multiple items.
How to use XtraReports in a WPF application
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
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
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
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
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
We provide a ready-to-use SkinHelper class that supports automatic creation of skin items:
You can use code from this article if you need to provide custom logic of item generation or review the code for learning purposes. This code will be helpful in understanding how to obtain a list of skins and create bar items programmatically based on this list.
How to change a skin element programmatically
This example demonstrates how to change a skin element's image programmatically. More information can be found in the How to change one skin element in all available skins Knowledge Base article.