The Dashboard Suite does not provide WPF controls. The only way to display dashboards in a WPF application is to use the standard WindowsFormsHost element, which allows displaying any Windows Forms control inside a WPF application.
In this case, you can generate a Ribbon Bar, which is used to configure dashboards using the DashboardDesigner control by executing the CreateRibbon method. Note that while Ribbon mostly works correctly, there can be some issues with certain features caused by the platforms difference: e.g. Ribbon in RibbonForm not responding to keyboard shortcuts.
How to include WinForms Dashboard Designer in a WPF application using the WindowsFormsHost control
Editing appointment series - how to retain the exceptions
This example is obsolete. The Outlook Appointment Editing Form supports editing recurring appointments with exceptions out of the box.
Question Comments
Added By: Roman Shelomanov at: 9/16/2013 10:25:48 AM
Hi,
Whether there is an example of the solution of the same problem for eXpressApp Framework?
@Roman: We do not have a ready example dedicated to this scenario. You may find the following product documentation helpful to implement this yourself:
1. http://documentation.devexpress.com/#Xaf/CustomDocument2814
2. http://documentation.devexpress.com/Xaf/CustomDocument2659.aspx
Feel free to contact us in case of any difficulties.
How to use custom SQL queries as a data source in XPO via Common Table Expressions (CTE)
Although XPO supports loading data via Direct SQL Queries, this data cannot be used to populate persistent objects, it cannot be additionally filtered using Criteria Operators or used to feed a Server Mode grid. Is there any way to do this?
Many modern SQL servers support the Common Table Expressions (CTE) feature that allows you to declare a temporary named result set derived from a query and use it in the from part of another query. This feature can be employed in XPO via patching SQL queries it generates. We will demonstrate this functionality in an example with MSSQL Server.
To accomplish this task, we create a custom connection provider derived from MSSqlConnectionProvider and add a dictionary of user-defined CTE definitions. We override the FormatSelect and FormatTable methods to insert CTE definitions into generated queries.
In an application, we declare a persistent class mapped to a CTE definition, and call our connection provider methods to register an SQL query as a CTE definition before using it and unregister it afterwards. This way we can dynamically change SQL queries mapped to a persistent object during application lifetime. An example attached to this article demonstrates how this persistent class can be used in typical scenarios of expression evaluation, collection filtering and LINQ queries.
See also:
ASPxGridView - How to bind the grid to separate datasources in the server mode on the fly
Question Comments
Added By: Roman Štefko at: 1/29/2018 3:13:20 AM Can we also pass custom SQL parameters into the query?
Added By: Michael (DevExpress Support) at: 1/29/2018 12:12:06 PM
@Roma: I've created a separate ticket on your behalf (T600865: Using solution E3468, can we also pass custom SQL parameters into the query). It has been placed in our processing queue and will be answered shortly.
How to implement data paging
Silverlight supports the data paging mechanism natively. In the meantime, there are no easy approaches to implementing the IPagedCollectionView interface in WPF.
We supported Data Paging in v18.1 and later versions. Please refer to Data Paging for more information.
The following solution is applicable to the earlier versions:
The easiest way to implement data paging is to change the grid's ItemsSource when the page index is changed. This example contains special attached behavior that allows you to enable this feature with ease.
See Also:
How to support paging in DXGrid by implementing the IPagedCollectionView interface
Question Comments
Added By: Ravickumar Murugesan at: 8/23/2013 3:00:35 PM
With this implementation the search behavior is not normal.
Added By: Alexander (DevExpress Support) at: 8/25/2013 11:27:33 PMHello,
I have checked the Search Behavior with this solution using version 13.1.6, and it appears that everything works as expected. Searching operates only for the current page. If you have other behavior on your side, would you please describe the issue in greater detail?
P.S. Please create a separate ticket to clarify this moment. If we find an issue with the provided solution, we will update it.
I getting NULL exception at this line:
DataPager.ItemCount = Sources.Count;
Hello,
We have moved your question to a separate thread: Q466351 thread. Please refer to it for further discussion.
Added By: kumar gaurav 8 at: 8/7/2014 11:51:08 PMthis solution is not working because the GetValue(sourceproperty) gives null
Added By: Alexander (DevExpress Support) at: 8/8/2014 2:37:17 AMHi Kumar,
I've noticed that there is a separate thread with the same question from you: How to implement paging in dxg:GridControl using dxe:DataPager. We will answer in that ticket as soon as possible. Please give us some time.
How could I add the datapager in the footer of the gridControl. I add it to the FooterTemplate of the tableview , but it can't works well. What should I do?
Added By: Nadya (DevExpress Support) at: 10/15/2014 3:01:53 AMHi, Candy
We have moved your question to a separate thread: T161457 - How to add DataPager in the GridControl footer . Please refer to it for further discussion.
Added By: Sapient IT GSS at: 4/14/2015 9:43:28 PMNot getting you completely, can you please explain by an example instead of old post's link.
Added By: Alex Chuev (DevExpress) at: 4/15/2015 12:18:58 AM Hi,We try discuss additional scenarios in separate posts in order not to overload this thread. Let's continue our conversation in the ticket that you created earlier: T229634 - Need Help in Data Pager Implementation.
Thanks,
AlexAdded By: Madhuri Ambekar at: 7/9/2017 11:02:25 PM Hi,
I am implementing the same sample code in my application only thing that is been changed is binding. I am binding the list in my Init() instead of constructor so pagination is shown but data not displayed in grid
As data always change so i have to bind in Init().
kindly provide solution as soon as possible
Regards,
Madhuri Added By: Madhuri Ambekar at: 7/9/2017 11:58:39 PM Also, when i bind my original grid list to data pager then pagination is displayed but data not displayed in grid
And when i modify the list i.e. i put my list items in TestDataList(as shown in sample code) and bind the
PagedCollection then pager is disabled
Added By: Andrey Marten (DevExpress Support) at: 7/10/2017 1:33:03 AM
Hello,
I've created a separate ticket on your behalf (T533928: How to bind ItemsSource on demand when pagination is used in GridControl). It has been placed in our processing queue and will be answered shortly.
Thanks,
Andrey
If I add more pages to this example, width of DataPager doesn't change to display more page numeric. E.g. if I have 10 pages, pager display would be like, < 1 2 3 4 ... >.
How can I have display pager with more page numerics like, < 1 2 3 4 5 6 7 ...>
Added By: Michael Ch (DevExpress Support) at: 11/28/2017 4:06:05 AM
Hello,
I've created a separate ticket on your behalf (T581580: How to show more numeric navigation buttons for the DataPager ). It has been placed in our processing queue and will be answered shortly.
ASPxGridView- How to conditionally enable and disable the batch editing on the client side
This example demonstrates how to conditionally enable or disable the editing on the client side.
See also:
GridView - Batch Editing - How to conditionally enable and disable the editing on the client side
How to put a custom UserControl in a GridView cell
OBSOLETE:
This example is obsolete. We've introduced the RepositoryItemAnyControl class and the corresponding IAnyControlEdit interface in v14.2, which can be used for this purpose. See the How to implement an embedded Chart Control example demonstrating how to implement this approach.
Question Comments
Added By: Jaix Software at: 3/6/2013 8:05:36 PM
This example does not work with DateEdit in a menu bar. There appears to be a display issue, as when focus is lost nothing is display. Re-selecting the control and the dates come back.
Added By: D. Samsonoff at: 4/25/2013 2:58:12 AMYou probably would want to expose Control rather than UserControl to meet broader requirements.
Added By: Christophe Keller @ PTS at: 12/12/2013 1:34:26 AMHi,
In your example, if I click on a different cell in the table in Form1, the cell turns white for a short amount of time before the editor is active. How can I avoid this?
Added By: Satwant Sandhu at: 2/10/2016 7:59:07 AM How do we modify this so that the custom control is only used when editing. I have a custom text box that I use for entry, but once the user is no longer in edit mode then I want to show the default cell rendered (i.e. a label).I do not want my custom editor being painted in every cell. Added By: Svetlana (DevExpress Support) at: 2/10/2016 11:46:58 PM
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T344393: How to use a custom editor only for editing in a grid. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
How to implement a simple PDF viewer in ASP.NET MVC web application by using the Document Server functionality
This example demonstrates how to implement a custom web PDF viewer control by using the DevExpress Document Server functionality.
The main idea of this approach is to use the PdfDocumentProcessor class functionality to load the PDF document and convert its pages to images. Then, these images are rendered in the browser to display PDF document pages.
Important Note:
The Office File API product license is required for using this approach. Please refer to the Subscriptions page for more information.
Question Comments
Added By: Jignesh Ved at: 10/4/2017 5:25:48 AM hi,
this example is not working mvc5 ?
because i have to run mvc 4 it's working fine but same code execute in mvc 5 sowing flowing error.
please check this reference dll file for use pdf viewer. is working fine in mvc4 but not working in mvc5
in bin folder there are three files
DevExpress.Web.Mvc.v17.1.dll
DevExpress.Web.Mvc.v17.1.xml
DevExpress.Web.Mvc5.v17.1.dll
i have already add reference in web.config file.
<add assembly="DevExpress.Pdf.v17.1.Core, Version=17.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
and if i was try to without delete
1) DevExpress.Web.Mvc.v17.1.dll
2) DevExpress.Web.Mvc.v17.1.xml
so following error are showing
D:\DocumentSharing1.0\DAT.DS.Web\Views\Home\_CallbackPanelPartial.cshtml(1): error CS0121: The call is ambiguous between the following methods or properties: 'DevExpress.Web.Mvc.UI.HtmlHelperExtension.DevExpress<ModelType>(System.Web.Mvc.HtmlHelper<ModelType>)' and 'DevExpress.Web.Mvc.UI.HtmlHelperExtension.DevExpress<ModelType>(System.Web.Mvc.HtmlHelper<ModelType>)'
and delete both file in bin folder so error will be display
Could not load file or assembly 'DevExpress.Pdf.v17.1.Core, Version=17.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Added By: Helen (DevExpress Support) at: 10/4/2017 9:26:31 AM
Hello,
I see that you asked this question in the Not working in mvc5 (DevExpress.Pdf.v17.1.Code) ticket. Please refer to it for further assistance.
How to implement the Copy/Paste feature
Starting with version 17.2, pasting data from the Clipboard is supported out of the box. To enable this feature, set the GridView.OptionsClipboard.PasteMode property to Update or Append. In this case, you can paste data by pressing CTRL+V or using the GridView.PasteFromClipboard method.
If you are using an older version, you can paste data manually using the GridView.SetRowCellValue method. To download the example for old versions, select a required version range in the combo box.
See Also:
Clipboard - Copy and Paste Operations. Data Formatting
How to implement the paste from clipboard feature
Question Comments
Added By: Chris Anderson 8 at: 2/12/2015 10:23:53 AM
Is this still the method I should follow for the latest version of the winforms gridcontrol?
Added By: Sasha (DevExpress Support) at: 2/13/2015 12:00:59 AMHello Joe,
Yes, use this example to implement the copy/paste feature.
Dear,
i need to do this with all my gridviews with datasource XPCOLLECTION, what do i have to do ?
Thanks for your support!
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T273510: How to implement the Copy/Paste feature with XPCollection in a grid. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hi, support team!
1) Some of my columns are binded to another tables in a datasource with lookup edit, where it gets its values. While copying and pasting a row, there is a FormatException, because columns valuemember is int, display member is string. How can it be solved?
2) It also throws exception ArgumentException, when pasting empty cell of type DateTime. It is not leaving empty Datetime cell as empty in pasted row, says "String was not recognized as a valid Datetime.."
Thank you very much!
Added By: Nadezhda (DevExpress Support) at: 8/25/2015 4:56:30 AMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: While copying and pasting a row, there is a FormatException, because columns valuemember is int, display member is string. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
How to preserve the XtraGrid view state in multi level master/detail
This example is an extension of example How to preserve the XtraGrid View state for a grid in master-detail mode. It stores view states of all existing nested grid views.
Starting with version 18.1.7 it is possible to bound the built-in check column to a field in the data source using the CheckBoxSelectorField property.
Question Comments
Added By: Glenn Holden at: 6/19/2014 12:13:58 PM
This class is significantly different than the example which it is based on. Could you provide a Form class to demonstrate how this RefreshHelperClass is implemented?
Added By: Nikita (DevExpress Support) at: 6/19/2014 11:47:34 PMHello,
I have modified the sample so that the form's code is visible on the Web. You can also load the full project by clicking the Example link on the right side of this page (I have attached a screenshot that shown this link).
I hope this helps.
If I'm rigth, this example is prepared to deal with views whose key is composed only by 1 column (keyFieldName in ViewDescriptor structure is declared as String). In that case, how would you change it to allow views with multiple columns keys?
Added By: Svetlana (DevExpress Support) at: 6/1/2015 12:57:13 AMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T249139: How to use a compound key in the E1466 example. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hi,
In your sample code, How many views are designed as known? How about "Dynamic MasterDetail Views"? i.e. How many views are not known. They are dynamic created, in theory, there can be unlimited detail views. For more details, when use "Dynamic MasterDetail Views" for a tree-like data structure. (ID,ParentID). There can be unlimited number of detail data level in the tree.
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: How many views are designed as known. This ticket is currently in our processing queue. Our team will reply it as soon as we have any updates.
Hello Matthew,
I answered your question in the Updating master-detail grid's datasource thread. The focused row is restored as required on my side. Would you please check the video attached to my comment in the T568798 ticket? Is the behavior different on your side? If so, please record a video that illustrates the problematic behavior and post a comment with the attached video in the T568798 thread.
How to integrate Snap reports in XAF WinForms
UPDATE: Starting with 18.1, we introduced Office Module. This module provides RichTextPropertyEditor with an ability to create reports based on a business class' properties: Mail Merge. So we suggest using the new editor in new applications. The current example won't be developed anymore.
Scenario
This example demonstrates one possible way of integrating Snap reports in an XAF WinForms application. It contains the Snap module (the SnapModule class library) implementing this functionality and the SnapExampleXpo and SnapExampleEF projects demonstrating how to use this module with XPO and EF.
The example integration shows how to store reports layout in business objects and show a list of these objects, as this is done in the built-in Reports module. The main tool for working with these reports is a custom Snap designer form. Underlying business objects can be configured using custom buttons from this form. It is also possible to show a read-only preview form using corresponding actions.
Note that the Snap module from this example is not a part of the standard XAF delivery and is not tested as intensively as our built-in modules. Feel free to modify and test it further according to your business requirements.
If your clients require other scenarios of integrating the Snap reports, please describe them here or in the Create a Snap Report Module for XAF ticket. Thank you in advance!
Steps to implement
The Snap module contains a custom SnapDesigner form and classes used to integrate this form in an XAF application - business classes for storing reports and controllers used to show the designer and preview forms. To learn more about integrating custom forms and controls, refer to the Using a Custom Control that is not Integrated by Default topic.
To see how the module works, download the example and launch the SnapExample.Win or SnapExampleEF.Win project. To create a new Snap document, navigate to the Reports navigation item and click New. A Snap designer will be opened (see the screenshot above). It contains several custom commands implemented especially for XAF:
New - creates a new Snap document;
Save - saves changes to the database. If the report is new, shows a DetailView allowing to define document's properties;
Add XAF Data Source - shows a DetailView allowing to define a new data source. Adds this data source to the current Snap document;
Edit Object - opens a DetailView of the current IDocumentData object that stores report's settings in the database. Use this button to remove or change the existing XAF data sources or other report's properties.
To see information about built-in Snap designer's commands and learn more about Snap reports, refer to Snap documentation.
To use the Snap module from this example in your application, perform the following steps:
1. Download the example and build it with your version of our components.
2. Copy the DocumentData and DocumentDataSource classes from the example to your application's business classes module (YourSolutionName.Module). If you are using EF, copy classes from the SnapExampleEF\BusinessObjects folder. If you are using XPO, copy classes from the SnapExample.Module\BusinessObjects folder.
3. Add a reference to the SnapModule assembly to your project (YourSolutionName.Win).
4. Add SnapModule to your application's Modules list. To do this, either open the WinApplication.cs file of the YourSolutionName.Win project and add a SnapModule instance to the Modules collection in a constructor, or add the SnapModule project to your VS solution and drag & drop the Snap module from a toolbox in the Application Designer.
5. Set SnapModule's DocumentDataType property to the DocumentData type you have created in step 2.
How to implement SearchResultsView for the scheduler (similar to ListView in Outlook)
This example demonstrates how to implement SearchResultsView in SchedulerControl by analogy with ListView in Outlook. ListView in Outlook appears when you search for an appointment and displays summary information regarding found entries. This view does not support the concept of a visible time interval; i.e, all found appointments should be shown. This view provides similar context menus and editor forms to manage appointments.
Please see the "Implementation Details" (click the corresponding link below this text) to learn more about technical aspects of this approach implementation.
Drag-and-drop data rows from one grid to another
Starting with version 17.2, you can attach Drag And Drop Behavior to two GridControls to implement drag-and-drop without writing additional code.
In older versions, drag-and-drop should be implemented using the standard Drag events. Please refer to the Drag-and-drop data rows from one grid to another Knowledge Base article for an explanation.
Question Comments
Added By: Carlos Arias at: 10/9/2012 1:52:58 PM
GridControl grid = sender as GridControl;
grid always null ???
Thanx Dear fro reply me i'll do it
Added By: david ola at: 11/5/2015 5:41:44 AM1. Can you copy instead from the original grid rather than deleting the row being dragged? In other words, after dragging a particular row, let the original grid still have the row, as opposed to the row disappearing.
2. Can you modify the code such that the row being dragged can be captured and displayed, modified before it is dropped?
David,
Just change the DragDrop handler to not import and delete the source and instead create a copy of the DataRow and import that into the second grid.
Added By: Sasha (DevExpress Support) at: 11/5/2015 11:05:33 AMHello David,
Here is a small code that illustrates Brendon's idea:
[C#]privatevoidgrid_DragDrop(objectsender,System.Windows.Forms.DragEventArgse){GridControlgrid=senderasGridControl;DataTabletable=grid.DataSourceasDataTable;DataRowrow=e.Data.GetData(typeof(DataRow))asDataRow;if(row!=null&&table!=null&&row.Table!=table){table.ImportRow(row);table.Rows[table.Rows.Count-1]["Column1"]="modified";}}
Please review it and let me know if it helps.
Added By: david ola at: 11/6/2015 5:07:05 AMThanks guys, but I am still having a problem: the original data in the first grid is still being modified. Here is my code:
GridControl grid = sender as GridControl;
DataTable table = grid.DataSource as DataTable;
DataRow row = e.Data.GetData(typeof(DataRow)) as DataRow;
int newNum = 0;
num += 1;
if (row != null && table != null && row.Table != table)
{
DataRow rowmod = row;
rowmod[0] = "original modified";
MessageBox.Show(rowmod[0].ToString());
newNum = num % 2;
if (newNum == 0)
{
table.ImportRow(rowmod);
}
}
I want only the imported row to be modifiable without any changes to the original data.
My intention is to allow the user to drag the row, display that row in a form for possible modification, before dropping it in the second grid. The user should also be able to cancel the operation without making any changes to either grid, even after displaying the row in the form.
So far I have been able to display and modify the data, and even choosing to cancel mid-operation (using the modulo example). But it keeps making changes to the original data, which I don't want.
Hello David,
I've created a separate ticket for your inquiry: How to modify the 'Drag-and-drop data rows from one grid to another' example so that the row is not deleted after dragging. Let's continue discussing it in that thread.
Added By: Alexey Z (DevExpress Support) at: 6/22/2016 12:49:22 AM
Hello,
I've created a separate ticket on your behalf (T394874: XtraGridControl - How to implement Drag&Drop mechanism between two CardViews). It has been placed in our processing queue and will be answered shortly.
ASPxGridView - Batch Edit - How to calculate unbound column and total summary values on the fly
Starting with v18.2 we support callbacks and keep the changes safe while a user navigates via pages, filters and sorts the grid data. If you use this version and above, please copy the 18.2.3+ branch as approaches to update total summaries differ in new versions and old ones.
This example illustrates how to calculate unbound column and total summary values on the fly. It combines the following two examples: ASPxGridView - How to update total summaries on the client side in Batch Edit mode and ASPxGridView - Batch Edit - How to calculate values on the fly.
ASP.NET MVC Example:
GridView - Batch Edit - How to calculate unbound column and total summary values on the fly
Question Comments
Added By: HASNAIN AHMAD at: 2/26/2015 11:06:44 PM
Respected sir/madam
When copy/paste the code in my VS 2013, it shows an error, "The name 'GetSummaryValue' does not exist in the current context".
Please guide for this problem.
Your truly
Thanks and regards
Hasnain Ahmad
Added By: Sergi (DevExpress Support) at: 2/26/2015 11:11:49 PMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T213835: The name 'GetSummaryValue' does not exist in the current context" error when using the code from T116925 code example. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
How to implement drag-and-drop between Grid and TreeList
------------------------------------------------------------------------------------------
Starting with version 17.2, you can attach Drag And Drop Behavior to target controls to implement drag-and-drop without writing additional code.
------------------------------------------------------------------------------------------
This example demonstrates how to create helper classes for implementing drag-and-drop between Grid and TreeList. For more information please refer to:
How to allow an end-user to move the rows in a grid up and down if the grid is bound to a DataTable
How to draw a line between rows to indicate a drag-and-drop position
Drag-and-drop data rows from one grid to another
How to enable an Excel-like filter dropdown
This example demonstrates how to enable an Excel-like filter dropdown in different DevExpress versions.
In version 16.2, we have implemented the Excel Style Filtering functionality out of the box. This mode can be enabled by setting a single property - FilterPopupMode.
In previous versions, where this functionality is not available out of the box, it is possible to filter dropdown items based on the current filter.
First, DXGrid has the built-in ShowAllTableValuesInCheckedFilterPopup property that allows enabling the following mode:
- If the current column is not filtered, the filter dropdown displays only those items that meet the grid's filter condition.
- Otherwise, all data source items are displayed to simplify the process of the grid filter correction.
If this functionality is insufficient, and filtering dropdown items when the current column is filtered is required, use the approach demonstrated in this example.
Question Comments
Added By: PraveenKumar Kuppuswamy at: 11/24/2016 8:34:51 PM Hi
The Below solution is not working for me.
Thanks
Praveen Added By: Andrey Marten (DevExpress Support) at: 11/24/2016 10:42:27 PM
Hello,
I've created a separate ticket on your behalf (T455126: The approach from T156289 works incorrectly). It has been placed in our processing queue and will be answered shortly.
Thanks,
Andrey
How to implement an event to customize a filter string produced by the SearchLookUpEdit
-------------------------------------------------------------------
In 19.1 we've implemented two new options that specify how our Find Panel works:
1) ParserKind - If a search string contains whitespaces, the control splits it into separate logical blocks. This option specifies how these blocks are combined into a search query.
2) Filter Condition - Use the Condition property to specify the search operator (Contains, StartsWith, Equals, Like).
So starting with 19.1 you can use these options to manage the Find Panel behavior without using descendants.
In case of using SearchLookUpEdit you can find these options in the SearchLookUpEdit .Properties.PopupView.OptionsFind section.
See also:
WinForms - Data Grid - New Find Panel Options.
-------------------------------------------------------------------
Sometimes it is useful to adjust a string entered in the Find Panel based upon any rules and filter data correspondingly. For instance, if an end-user enters one two in the Find Panel data search will be performed according to whether or not either one or two string is contained in any search column. To search data against whole "one two" string it is necessary to enclose the filter string in quotes (please review the Find Panel help article to learn all capabilities of the Find Panel). To make this behavior default you can add the quotes to the filter string manually by handling the SearchLookUpEdit.UpdateDisplayFilter event.
This examples illustrates how to implement the SearchLookUpEdit.UpdateDisplayFilter event.
Question Comments
Added By: Carlos90210 at: 6/5/2013 11:17:30 AM
Excellent solution, especially when running in server mode. Why this event is not included as default? it is almost impossible to catch events with linq in server mode.
Added By: Keith Palihakkara at: 7/10/2013 1:00:41 AMI can't seem to find this event on the SearchLookUpEdit in 13.1.5, has it been replaced?
How to customize the default Find Panel filtering algorithm
-------------------------------------------------------------------
In 19.1 we've implemented two new options that specify how our Find Panel works:
1) ParserKind - If a search string contains whitespaces, the control splits it into separate logical blocks. This option specifies how these blocks are combined into a search query.
2) Filter Condition - Use the Condition property to specify the search operator (Contains, StartsWith, Equals, Like).
So starting with 19.1 you can use these options to manage the Find Panel behavior without using descendants.
See also:
WinForms - Data Grid - New Find Panel Options.
-------------------------------------------------------------------
Find Panel uses an extended syntax that allows you to specify complex criteria. You can find detailed information here:
- Find Panel
However, sometimes it is necessary to exclude/include some rows in the resulting list according to your custom logic. In this case, you can filter rows manually by handling View.CustomRowFilter Event. This example demonstrates how to construct your own filter criteria and use ExpressionEvaluator to check whether a row should be hidden.
For demo purposes, this example just shows how to find exact matches of a typed string. The same result can be accomplished with the default behavior if you enclose your text in double quotes in Find Panel. To provide your own logic, just modify the MyConvertFindPanelTextToCriteriaOperator method as your needs dictate.
Question Comments
Added By: Sigol at: 9/6/2012 2:34:45 PM
In the text above "if you enclose your text in commas in Find Panel" I think should read "if you enclose your text in DOUBLE QUOTES in Find Panel".
Added By: Arnaud Chevallier at: 12/21/2012 5:35:48 AMThis may be usefull, as for example replacing parenthesis by double quotes. However with this method the results are not highligted anymore. Is there any workaround ?
Added By: Mu XU at: 7/17/2013 8:19:11 AMcan't resolve DxFtsContainsHelperAlt in dx 11
Added By: Catalin Zainescu at: 12/21/2015 4:07:00 PMThe suggested workaround feels more like black magic... For example, can you guarantee that "ColumnView.GetFindToColumnsCollection" method will always be there?
Do you have any plans to add an option to change this default filtering behavior? At the very least, it would be really nice to be able to switch from "OR" to "AND" filtering logic instead of having to add "+" to every token.
Added By: Nikita (DevExpress Support) at: 12/22/2015 6:41:18 AMHello Catalin,
I understand that this example a quite complex. And while we really cannot guarantee that we won't change the GetFindToColumnsCollection method, we do guarantee that we will keep this example in the working state. So, if we change some grid code, which will break this example, we will upload a new version of this example to the site.
I also understand that such functionality is useful, so we are going to consider introducing similar functionality in the future.
Hello,
I've created a separate ticket on your behalf (T415372: How to customize search in Find Panel). It has been placed in our processing queue and will be answered shortly.
How to drag appointments data from the DataGrid and drop it onto the Scheduler Control
-------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------
Note:This example is obsolete. Please review the How to drag appointments from GridView and drop them onto the Scheduler Control using SchedulerDragData example instead.
-------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------
Demonstrates how to drag data from a DataGridView control which is bound to the Cars data table of Cars.mdb demo database and drop it to the SchedulerControl.
See Also:
How to detect which element of the Scheduler was clicked
Drag-n-drop and iCal import - import of the iCal file being dropped on XtraScheduler
How to display a warning tooltip when dragging an appointment to forbidden area
How to drag and relocate the entire series of recurring appointments
How to use a Background Geolocation in XAF Mobile (Maintenance Mode)
The Mobile UI is in maintenance mode. However, our installation still includes the Mobile UI. We continue to provide support and fix critical bugs, but we do not create new features. Once the new SPA UI is mature, it should cover all the Mobile UI scenarios and also provide new functionality. Refer to the New XAF HTML5/JavaScript SPA UI for Web & Mobile (CTP) KB article for more information on the SPA UI.
-----------------------------------------------
This example demonstrates how to take advantage of a mobile device positioning system in your XAF mobile application using the Cordova Background Geolocation plugin and Cordova Device plugin . Additionally, you will learn how to access the PhoneGap config file (regular XML file) and add the plugin to your application.
Scenario:
You want to automatically track movements of an XAF mobile application user and display the user's route on the map, e.g., in a separate administrative XAF Web application:
Your feedback is needed!
This is not an official feature of our Mobile UI (CTP) and our API may change in future release cycles. We are publishing this article prior to the 17.2 release to collect early user feedback and improve overall functionality. We would appreciate your thoughts on this feature once you've had the opportunity to review it. Please report any issues, missing capabilities or suggestions in separate tickets in our Support Center. Thanks for your help in advance!
Prerequisites
Install any v17.1.5+ version.
The implementation steps below are given for a new application, though they can be applied to any other XAF mobile app.
Steps to implement
1. Create a new XAF solution with Web and Mobile platforms and enable the Maps Module in it. Do not forget to specify the MapsAspNetModule > GoogleApiKey property in the Application Designer invoked for the YourSolutionName.Web/WebApplication.xx file.
2. In the YourSoltutionName.Mobile/MobileApplication.xx file, register the Cordova Background Geolocation plugin by adding required tags to the MobileApplication.AdditionalPhoneGapPlugins collection.
[C#]usingDevExpress.ExpressApp.MobilepublicpartialclassBackgroundGeolocationMobileApplication:MobileApplication{publicBackgroundGeolocationMobileApplication(){AdditionalPhoneGapPlugins.Add(@"<plugin name=""cordova-background-geolocation-lt"" source=""npm"" spec=""2.7.3""> <variable name=""LOCATION_ALWAYS_USAGE_DESCRIPTION"" value=""Background location-tracking is required"" /> <variable name=""LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION"" value=""Background location-tracking is required"" /> <variable name=""MOTION_USAGE_DESCRIPTION"" value=""Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving"" /> <variable name=""LICENSE"" value=""YOUR_LICENSE_KEY"" /> </plugin>");AdditionalPhoneGapPlugins.Add(@"<plugin name=""cordova-plugin-device"" source=""npm"" spec=""1.1.6""></plugin>");// ...
Take note of the line which adds the "LICENSE" tag. If you have a license key (refer to the corresponding remark in the README file), uncomment this code and replace the YOUR_LICENSE_KEY placeholder with your own key .[VB.NET]Imports Microsoft.VisualBasic Imports DevExpress.ExpressApp.Mobile PartialPublicClass BackgroundGeolocationMobileApplication Inherits MobileApplication PublicSubNew() AdditionalPhoneGapPlugins.Add("<plugin name=""cordova-background-geolocation-lt"" source=""npm"" spec=""2.7.3"">"& ControlChars.CrLf & " <variable name=""LOCATION_ALWAYS_USAGE_DESCRIPTION"" value=""Background location-tracking is required"" />"& ControlChars.CrLf & " <variable name=""LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION"" value=""Background location-tracking is required"" />"& ControlChars.CrLf & " <variable name=""MOTION_USAGE_DESCRIPTION"" value=""Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving"" />"& ControlChars.CrLf & " <variable name=""LICENSE"" value=""YOUR_LICENSE_KEY"" />"& ControlChars.CrLf & " </plugin>") AdditionalPhoneGapPlugins.Add("<plugin name=""cordova-plugin-device"" source=""npm"" spec=""1.1.6""></plugin>") ' ...
3. In the YourSolutionName.Module project, copy the BackgroundGeolocation.Module\BusinessObjects\DeviceInfo.xx file to the BusinessObjects folder.
This file contains business classes used to store background geolocation data received from mobile clients. You may want to put these classes into separate files according to your code rules.
4. In the YourSolutionName.Mobile project, create a new Geolocation folder and copy the several code files below into it as per the instructions below.
4.1. Copy the BackgroundGeolocation.Mobile\Geolocation\GeolocationScript.js file and include it in the project. Change the Build Action property for this file to Embedded Resource. This code initializes the Cordova Background Geolocation plugin with default settings. Feel free to modify it according to your needs. More information about configuring options can be found in the project's github repository.
4.2. Copy the BackgroundGeolocation.Mobile\Geolocation\GeolocationJsonObject.xx file and include it in the project.
These classes are used to deserialize JSON data set by mobile applications to the Geolocation Service.
4.3. Copy the BackgroundGeolocation.Mobile\Geolocation\GeolocationHttpHandler.xx file and include it in the project.
The Background Geolocation plugin will send data to this service. The service is intended to save the device information to the database. It uses the connection string from the application configuration file (Web.config).
To enable the HTTP handler added on the previous step, add the following line to the configuration/system.webServer/handlers section of the YourSolutionName.Mobile/Web.config file (you may need to change the type attribute value and specify the namespace qualified name of the GeolocationHttpHandler class declared in your project:
[XML]<addname="Geolocation"verb="GET,POST"path="GeolocationProcessingService.svc"type="YourSolutionName.Mobile.GeolocationHttpHandler"/>
5. In the YourSoltutionName.Mobile/MobileApplication.xx file, register the GeolocationScript.js code (copied on step #4.1) using the MobileApplication.RegisterClientScriptOnApplicationStart method so that this script executes when the mobile application starts up on the device. The code snippet below demonstrates how to implement the ReadResource and ReadResourceString methods required to load the code from the embedded resource into a String variable (you can find this code in the BackgroundGeolocation.Mobile/MobileApplication.xx file of the sample project):
[C#]publicBackgroundGeolocationMobileApplication(){// ...stringgeolocationScript=ReadResourceString("BackgroundGeolocation.Mobile.Geolocation.GeolocationScript.js");RegisterClientScriptOnApplicationStart("GeolocationScript",geolocationScript);}publicstaticbyte[]ReadResource(stringresourceName){byte[]buffer=null;using(Streamstream=Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)){if(stream!=null){buffer=newbyte[stream.Length];stream.Read(buffer, 0,(int)stream.Length);}}returnbuffer;}publicstaticstringReadResourceString(stringresourceName){byte[]resourceBytes=ReadResource(resourceName);//You need to escape CRLF characters in versions prior to version 18.1//return Encoding.UTF8.GetString(resourceBytes).Replace("\r\n", "\\r\\n");returnEncoding.UTF8.GetString(resourceBytes);}
[VB.NET]PublicSubNew() ' ...Dim geolocationScript AsString = ReadResourceString("GeolocationScript.js") RegisterClientScriptOnApplicationStart("GeolocationScript", geolocationScript) EndSubPublicSharedFunction ReadResource(ByVal resourceName AsString) AsByte() Dim buffer() AsByte = NothingUsing stream As Stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName) If stream IsNot NothingThen buffer = NewByte(stream.Length - 1){} stream.Read(buffer, 0, CInt(stream.Length)) EndIfEndUsingReturn buffer EndFunctionPublicSharedFunction ReadResourceString(ByVal resourceName AsString) AsStringDim resourceBytes() AsByte = ReadResource(resourceName) 'You need to escape CRLF characters in versions prior to version 18.1'Return Encoding.UTF8.GetString(resourceBytes).Replace(ControlChars.CrLf, "\r\n")Return Encoding.UTF8.GetString(resourceBytes) EndFunction
The value passed to the ReadResourceString method consists of two parts in C# projects: the default assembly namespace ("BackgroundGeolocation.Mobile") and the path to the resource file ("Geolocation.GeolocationScript.js"). The first part may be different in your project. In VB.NET projects, the resource name will be much simpler: "GeolocationScript.js".
6. In the YourSolutionName.Module.Web project, install the Newtonsoft.Json NuGet package and copy the BackgroundGeolocation.Module.Web\Controllers\DisplayGeolocationController.xx file to the Controllers folder.
This controller is intended to draw the client's route based on location points.
7. Build and deploy your mobile application following the steps described in the Install the Application to a Smartphone help article, and ensure that the Geolocation services are enabled in the mobile device settings.
Once you get your mobile app running on your actual device, wait a few minutes and then run the Web version of your XAF application. Open the DeviceInfo List View, and you will see a record containing your mobile device information. If you click the ListView record, you will be navigated to the DetailView that contains the Map demonstrating the route tracked by the Background Geolocation module.
See Also:
eXpressApp Framework > Getting Started > XAF Mobile (CTP) Tutorial
How to: Use a Custom Plugin in a Mobile Application
XAF Mobile - Overview Video
FAQ: New XAF HTML5/JavaScript mobile UI (CTP)
Using Maps in a Mobile Application
How to send push notifications to the XAF Mobile application using Azure Notifications Hub
How to use a Barcode Scanner in XAF Mobile
Question Comments
Added By: Roman Max at: 8/22/2017 2:27:38 PM Hi, do you mind posting Project ZIP file here? Somehow having difficulty running it.Added By: Uriah (DevExpress Support) at: 8/22/2017 11:11:51 PM Hi Roman,
I've created a separate ticket on your behalf (T548156: Provide project ZIP file for T540129 example). It has been placed in our processing queue and will be answered shortly.
How to sort Appointments with the same time interval
--------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
SchedulerControl supports the custom sorting and groping functionality starting with version 19.1. You can find more about this functionality in the Group and Sort Appointments documentation and test it using this Demo. Please note that this demo requires installation of WinForms Subscription v19.1, which can be downloaded there: Download.
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
This example illustrates how to sort Appointments with the same time interval. This can be useful if you wish to sort all-day appointments (or daily appointments with the same Start and End values) by your custom rule.
This functionality may be introduced by implementing a custom DevExpress.XtraScheduler.Services.Internal.IExternalAppointmentCompareService service.
Question Comments
Added By: Marvin Dongen at: 4/10/2014 4:09:04 AM
Can I also get an example how to implement this in ASP.NET?
Added By: Stijn Vandenbroucke at: 6/15/2015 12:21:40 PMIs there any possibility to perform this on all appointments? And not only on those with 'same time interval'?
Best regards,
Stijn.
Hello Stijn,
By default, SchedulerControl sorts appointments by their time interval (the start and end dates). Only for appointments with the same start and end time, you can specify a custom sort algorithm. There is no capability to customize the sort order for appointments in case at least one of these dates is different. We have plans to provide more extended capabilities to customize the appointment layout (including the location of appointments within a time cell) in the scope of the following thread:
Provide a way to define a custom appointment layout
However, we have not yet decided when it will be implemented. Thus, at present we can't suggest any solution to customize the appointment sort order in case appointments have different start or end dates.