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

How to raise validation on the client side

$
0
0

This demo demonstrates how to raise editors' validation.

See also:
How to check the validation state of editors using the AreEditorsValid method
How to validate editors in the container on the server side

Question Comments

Added By: Nicholas Hustak at: 8/30/2013 6:43:35 PM    

This is an incomplete example. Please provide an example showing how to use a the Validation client side event and have it display the standard error return.

Added By: Sean Drew at: 4/11/2014 7:12:16 AM    

Agree, this example is incomplete and basically useless

Added By: rushdan . at: 10/27/2014 12:31:57 AM    

Hello Team Support,

May I know is it possible to validate without using javascript (client code) ?

Thanks

Added By: Marion (DevExpress Support) at: 10/27/2014 2:49:11 AM    

Hello guys,

To process your recent posts more efficiently, I created separate tickets on your behalf:
T165659: ASPxGridView - How to validate editors without using javascript (client code)
T165661: Improve the E124 example and show how to use the client-side Validation event to display the standard error return
These tickets are currently in our processing queue. Our team will address them as soon as we have any updates.


How to implement Sorting by Summary in OLAP mode

$
0
0

The following example demonstrates how to implement Sorting by Summary in OLAP mode.

In this example, values of the Semester field are sorted by the Australia | Bendigo column summary values. To do this, two sort conditions represented by SortByCondition instances are created. One of them represents an OLAP member that corresponds to the 'Australia' value, while another corresponds to the 'Bendigo' value. These sort conditions are added to the Semester field's PivotGridField.SortByConditions collection to specify the column by which Semester values should be sorted. A data field that identifies the column is specified via the PivotGridField.SortByField property.

OLAP members corresponding to the Australia and Bendigo values are obtained using the PivotGridControl.GetFieldValueOlapMember method. Note that OLAP members can be obtained only for visible field values. For this reason, the Australia field value is expanded before initializing OLAP members in order to obtain the Bendigo OLAP member.

This sample uses the Adventure Works cube.

 

How to implement Sorting by Summary in OLAP mode

$
0
0

The following example demonstrates how to implement Sorting by Summary in OLAP mode.

In this example, values of the Semester field are sorted by the Australia | Bendigo column summary values. To do this, two sort conditions represented by PivotGridFieldSortCondition instances are created. One of them represents an OLAP member that corresponds to the 'Australia' value, while another corresponds to the 'Bendigo' value. These sort conditions are added to the Semester field's PivotGridFieldBase.SortBySummaryInfo.Conditions collection to specify the column by which Semester values should be sorted. A data field that identifies the column is specified via the PivotGridFieldBase.SortBySummaryInfo.Field property.

OLAP members corresponding to the Australia and Bendigo values are obtained using the ASPxPivotGrid.GetFieldValueOLAPMember method. Note that OLAP members can be obtained only for visible field values. For this reason, the Australia field value is expanded before initializing OLAP members in order to obtain the Bendigo OLAP member.

This sample uses the Adventure Works cube.

How to customize FilterControl's operation list

$
0
0
This example demonstrates how to customize FilterEditor's operation list and how to set a default operation value to the desired value.
To provide this capability in this sample, we create a GridFilterColumn class descendant and override its IsValidClause method. Then we create a TableView class descendant and override its CreateFilterColumn method to return our GridFilterColumn class descendant object instead of the default GridFilterColumn object.
To change a default operation value, we subscribe to the TableView's FilterEditorCreated event. In this handler we subscribe to the FilterControl's BeforeShowValueEditor event. When BeforeShowValueEditor is raised, we set the CurrentNode.Operation value to the desired value.

How to use custom EditSettings in GridControl

$
0
0
This example demonstrates how to create and use custom EditSettings with a custom editor in GridControl.
For this, we create a TextEditSettings class descendant with a custom EditFont property which is used to set the editor's FontFamily property. Then, we create a TextEdit class descendant. In the static constructor of the TextEditSettings class descendant, we call EditorSettingsProvider's RegisterUserEditor2 method with our TextEditSettings and TextEdit as parameters. After that, we override its AssignToEditCore method to set the editor's FontFamily value to the EditFont value.

How to save and restore the layout to/from a stream

How to save and restore the layout to/from XML

How to print a detail grid with a header

$
0
0
This example demonstrates how to print a detail grid with a header.
Our detail grid with DataControlDetailDescriptor doesn't support printing its header. To provide this capability in this sample, we override the detail grid's TableView.PrintHeaderTemplate. We add ContentControl and bind its Content property to the DetailDescriptor.HeaderContent property and ContentTemplate to DetailDescriptor.HeaderContentTemplate.

ListBoxControl - How to customize margins of items

$
0
0
This example illustrates how to customize margins of the ListBoxControl's items

GridView - How to implement a custom HeaderFilter with a calendar for a date column

$
0
0

This example illustrates how to create a custom HeaderFilter for a date column. The main steps are: 
1) create a custom HeaderTemplate using the  SetHeaderTemplateContent method to prevent default header filter button logic and implement a custom one;
2) use the PopupControl to display a Calendar and several additional filters. FormLayout is used to build  a layout;
3) use the client AutoFilterByColumn method to perform filtering from the client side and the MVCxClientGridView.PerformCallback  method to pass a complex filter expression to the server to implement custom filtering;;
4) process a custom callback in the action method defined using the CustomActionRouteValues property and pass information about the current filter command to a partial view;
5) assign a delegate method to the BeforeGetCallbackResult property and implement the approach described in the ASPxGridView - How to programmatically change the column's filter in the FilterExpression  help article  to apply a new filter.

Click on the "Model Date" column to check how this works.

Web Forms:
ASPxGridView - How to implement a custom HeaderFilter with a calendar for a date column

ASPxGridView - How to implement a custom HeaderFilter with a calendar for a date column

$
0
0

This example illustrates how to create a custom HeaderFilter for a date column. The main steps are: 
1) create a custom HeaderTemplate  to prevent default header filter button logic and implement custom one;
2) use ASPxPopupControl to display a Calendar and several additional filters. ASPxFormLayout is used to build a layout;
3) use the client AutoFilterByColumn method to perform filtering from the client side and  the ASPxClientGridView.PerformCallback method to pass a complex filter expression to the server to implement custom filtering;
4) process a custom callback in the ASPxGridView.CustomCallback event handler to get information about the required filter expression on the server;
5) implement the approach described in the ASPxGridView - How to programmatically change the column's filter in the FilterExpression  help article to apply a new filter.

Click on the "Model Date" column to check how this works.

MVC:
GridView - How to implement a custom HeaderFilter with a calendar for a date column

GridView - Batch Editing - A simple implementation of an EditItemTemplate with client-side unobtrusive validation

$
0
0
This example is based  on GridView - Batch Editing - A simple implementation of an EditItem template and details how to enable  client-side unobtrusive validation: 

1) Wrap the GridView in a form:
[C#]
<formid="myForm">@Html.Action("GridViewPartial")</form>

2) Since GridView is bound to the list of values,  it's necessary to bind the EditItemTemplate editor to an item's model property from this list: 
CS:
[C#]
settings.Columns.Add(column=>{column.FieldName="C1";column.SetEditItemTemplateContent(c=>{Html.DevExpress().SpinEditFor(m=>m.FirstOrDefault().C1,spinSettings=>{spinSettings.ShowModelErrors=true;spinSettings.Properties.ValidationSettings.Display=Display.Dynamic;spinSettings.Width=System.Web.UI.WebControls.Unit.Percentage(100);spinSettings.Properties.ClientSideEvents.KeyDown="C1spinEdit_KeyDown";spinSettings.Properties.ClientSideEvents.LostFocus="C1spinEdit_LostFocus";}).Render();});});

VB:

[VB.NET]
settings.Columns.Add(Sub(column) column.FieldName = "C1" column.SetEditItemTemplateContent(Sub(c) Html.DevExpress().SpinEditFor(Function(m) m.FirstOrDefault().C1, Sub(spinSettings) spinSettings.Name = "C1" spinSettings.ShowModelErrors = True spinSettings.Properties.ValidationSettings.Display = Display.Dynamic spinSettings.Width = System.Web.UI.WebControls.Unit.Percentage(100) spinSettings.Properties.ClientSideEvents.KeyDown = "C1spinEdit_KeyDown" spinSettings.Properties.ClientSideEvents.LostFocus = "C1spinEdit_LostFocus"EndSub).Render()EndSub)EndSub)
3)  The $.valid method in the ASPxClientGridView.BatchEditEndEditing event handler is required  to force validation when a currently edited cell loses focus:
[JScript]
function Grid_BatchEditEndEditing(s, e){var editItemTemplateColumn = s.GetColumnByField("C1");if(!e.rowValues.hasOwnProperty(editItemTemplateColumn.index))return; $("#myForm").valid();var cellInfo = e.rowValues[editItemTemplateColumn.index]; cellInfo.value = C1.GetValue(); cellInfo.text = C1.GetText(); C1.SetValue(null);}

4) The ASPxClientEdit.GetIsValid and ASPxClientEdit.GetErrorText methods allow passing validation information from the editor to GridView cells in ASPxClientGridView.BatchEditRowValidating:
[JScript]
function Grid_BatchEditRowValidating(s, e){var editItemTemplateColumn = s.GetColumnByField("C1");var cellValidationInfo = e.validationInfo[editItemTemplateColumn.index];if(!cellValidationInfo)return; cellValidationInfo.isValid = C1.GetIsValid(); cellValidationInfo.errorText = C1.GetErrorText();}

5)  It's necessary to set   MVCx.validateInvisibleEditors to true in the client-side Init event handler to force validation for all cells 
[JScript]
function OnInit(s, e){ MVCx.validateInvisibleEditors = true;}

How to display an image in GridControl

$
0
0

This example demonstrates how to use RepositoryItemPictureEdit to display an image in GridView. The same approach can be used for any View.

Question Comments

Added By: Adam Nowicki at: 7/13/2014 3:00:14 AM    

The solution works well. The problem is filtering through AutoFilterRow and sorting. In the column with image is written "No image data" and you can not use a filter. Please solution how applied in this case AutoFilterRow and sorting to this column.

Added By: Alexey Z (DevExpress Support) at: 7/14/2014 12:23:32 AM    Hello,

In order not to mix several questions within one thread, I will extract your question to a new ticket. Let us continue our discussion there How to use the AutoFilterRow feature with the column with PictureEdit as its in-place editor.Added By: Jim Buckley Barrett at: 10/28/2014 12:28:37 PM    

how would you set the size of the image in the grid without changing to layout view?

Added By: Alexey Z (DevExpress Support) at: 10/29/2014 12:59:31 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T166680: GrudControl - How to set the size of the image in the grid without changing to layout view. Let's continue our discussion there.

Capability for a single column to fill an empty space in a grid view

$
0
0

In this example we added a FillEmptySpace option to the GridColumn descendant. Only one column in the grid view can have this option enabled, i.e. if you set the FillEmptySpace property to true for a single column other columns immediately set this option to false themselves. Column with this option enabled now recalculates its width after every layout change in order to fill an empty space in the grid view. This feature won't work if the grid view's option OptionsView.ColumnAutoWidth is enabled.

Question Comments

Added By: Eduardo Ramirez at: 10/28/2014 11:47:25 AM    

Hi folks,

would you mind to attach an example using the code below?

Thanks in advanced.
Eduardo

Added By: Nikita (DevExpress Support) at: 10/29/2014 1:43:16 AM    

Hello,
You can download the project for this example by a link on a right panel (see the screenshot in the attachment). First you have to download the Example Runner, then use this runner to open the *.dxsample file. 
I hope this helps. 

How to create a pop-up menu with all DockLayoutManager's panels

$
0
0
This example demonstrates how to create a pop-up menu with all DockLayoutManager's panels, which show the current active state of each panel.
For this, we create a BarManager with a BarSubItem. After that, we subscribe to the BarSubItem's Popup event. When Popup is raised, we get a list of all DockLayoutManager's panels. We iterate through this list and add this BarCheckItem to the BarSubItem with a respective panel as a tag. We check the DockLayoutSource's ActiveLayoutItem. If the ActiveLayoutItem equals a panel from the list, we set the BarCheckItem's IsChecked property to True. Then, we subscribe to the BarCheckItem's CheckedChanged event. When CheckedChanged is raised, we get a panel from a current BarCheckItem's tag and activate this panel.

How to: Store Model Differences in Database

$
0
0

This example illustrates how to store user UI settings (so-called model differences) in the application database instead of the file system (in Windows Forms applications) and session (in ASP.NET appications).


By default, an XAF Windows Forms application stores user customizations of the Application Model in the Model.User.xafml file, located in the application's directory. The application's model difference storage is also file-based (Model.xafml file). These two layers are superimposed when running an application. All model-related changes made by the end-user (e.g., layout customizations) are saved to the Model.User.xafml. The potential disadvantages of this default approach are:


- The Model.xafml file is not shared (except when the application is deployed to the terminal server). So even if this file is modified by an administrator, it must be re-deployed to all users to take effect;

- Since model differences are stored in a plain XML format, anyone who has access to XAFML files can easily influence the work of the application. So, it is possible to affect a critical setting that will cause the application to stop functioning;

- Several users sharing the same copy of the application cannot have individual customizations. This can be resolved by changing the user differences file location to the user profile folder (by setting the UserModelDiffsLocation key value to the CurrentUserApplicationDataFolder in the application configuration file). However, the problem persists if users are working under the same system account.

By default, an XAF ASP.NET application stores user customizations of the Application Model in the session. The global application model difference storage is file-based (Model.xafml file located in the web application folder). These two layers are superimposed when running an application. All model-related changes (e.g., columns order and visibility in List Views, dashboard layouts, etc.) made by end-users are saved to cookies. If a user accesses the ASP.NET application via several different devices (desktop, laptop or tablet), settings are not synchronized.


Generally, you can use the default storage in most scenarios. However, the disadvantages listed above become critical if you wish to give more power to application administrators and enhance application security. This example provides a solution that eliminates all these disadvantages. The main idea is to store all model differences in the application's database. Follow the instructions below to use the database model difference storage in your XAF application.

Build the DatabaseUserSettings.dll Assembly

- Download the solution attached to this example.

- Upgrade the downloaded solution up to your currently installed version of DXperience. Use the Project Converter utility for this purpose.

- Open the converted solution in Visual Studio. Switch to the Release configuration and build the DatabaseUserSettings project (this project contains the module that we are going to use).

- Copy the DatabaseUserSettings.dll assembly to an appropriate location in your development workstation.


Add the DatabaseUserSettings Module to Your XAF Solution

- Open your XAF solution that will use the DatabaseUserSettings module.

- Add the DatabaseModelStrorage.dll reference to the platform-agnostic module project.

- Right-click the Module.cs file and choose View Code. Modify the module's constructor in the following manner.

          

[C#]
publicsealedpartialclassMySolutionModule:ModuleBase{publicMySolutionModule(){InitializeComponent();this.RequiredModuleTypes.Add(typeof(DatabaseUserSettings.DatabaseUserSettingsModule));}}

Note:Alternatively, you can add the DatabaseUserSettings in the Module Designer.But you should register the DatabaseUserSettingsModule toolbox item first (see How to: Add Items to the Toolbox).

Now you can logon using different credentials and apply different customizations for each user. For instance, you can change the active skin for each user. Different users will have different skins selected after the application is restarted. Users should have read/write access to the XPUserSettings and XPUserSettingsAspect persistent types (these types are provided by the DatabaseUserSettings module and are used to store model differences).

The Configurator Account

To manage default model settings applied to users, a special Configurator account can be used. All customizations made by Configurator in the Model Editor or directly in the UI will be stored to the shared Application Model layer. To create such an account, do the following.


- Add a Role named "Configurator" (this name is declared by the DatabaseUserSettingsModule.ConfiguratorRoleName constant).

- For the added Role, grant full access to the XPUserSettings and XPUserSettingsAspect persistent types and read access to the UserName member of the type that represent users in your application (SecuritySystemUser by default). Alternatively, you can simply mark this role as administrative (see SecuritySystemRoleBase.IsAdministrative).

- Add a User named "Configurator" (this name is declared by the DatabaseUserSettingsModule.ConfiguratorUserName constant), and associate this user with the "Configurator" role.

Refer to the Updater.cs file to see the code.

The ManageUserSettings Action

The Configurator user has access to the ManageUserSettings Action. This Action of the PopupWindowShowActiontype is provided by the ManageUserSettingsWindowController Controller implemented in the DatabaseUserSettings module. This Action is intended to import a user setting from one user to another.

See Also
Core - Provide an easy way to store administrator and user model differences in a custom store (e.g., in a database)
A reusable XAF module for storing model settings in the database (security system type insensitive!)

ImportantNotes
1.
Be aware of the following issue with this example: User settings may be duplicated/overridden under certain circumstances after merging configurator and user settings applied to the same element
2. This example solution is not yet tested in the middle-tier and SecuredObjectSpaceProvider scenario and most likely, it will have to be modified to support its specifics.
3. This example solution is not yet tested with custom fields.

Question Comments

Added By: Pawel Rymarczyk 1 at: 5/20/2012 6:35:40 AM    

Hi,

Not working with DbUpdater 11.2.

Ticket: http://www.devexpress.com/Support/Center/Question/Details/Q400938

Added By: Sandro Welter (Intelligix) at: 7/6/2012 10:14:37 AM    

Hi,

I need this example in 12.1 version. Thanks.

Added By: Robert Fuchs at: 7/11/2012 8:25:44 AM    

> Take special note that it is important to grant write permissions for
> your persistent model differences classes to the anonymous user:

AFAIR the new security system does not need an anonymous user any more?

Added By: Miles at: 7/12/2012 12:44:42 PM    

12.1 version please!

Added By: Frank (DataJunxion) at: 8/10/2012 11:00:41 PM    

12.1 version?

Added By: John Botibol at: 9/12/2012 1:09:39 AM    

Hi Guys, the Issue (Q421353) mentioned above as one to be aware of is marked as private so this is quite tricky!

Added By: Paolo Parente at: 10/31/2012 7:21:27 AM    

Hi, is there a way to download the whole solution, without select every single file?
Thanks,
Paolo

Added By: Paolo Parente at: 11/2/2012 11:13:32 AM    

Ok, i did it.
But now i've a question: i can i deploy the new Model.xafml when a new version of the application has been developed?
Thanks,
Paolo

Added By: Markus Hoevermann at: 11/5/2012 1:03:53 AM    

I have the same problem as Paolo: How to handle the case when a new softare version with another Model.xafml must be distributed? Is there a ay to do this?

Added By: Dennis (DevExpress Support) at: 11/6/2012 12:03:35 PM    

I have answered your question about deploying the new version in http://www.devexpress.com/Support/Center/Issues/ViewIssue.aspx?issueid=Q443198

Added By: Robert Fuchs at: 12/15/2012 10:38:45 AM    

http://www.devexpress.com/issue=Q421353 is still private.
Is it fixed in the 12.2 example?

Added By: Nektarios Patelis at: 12/28/2012 12:09:23 AM    

Iuse linq queries and Custom fields on model.xafml following http://www.devexpress.com/Support/Center/Example/Details/E859. I get exception on project start up: An error with number 1009 has occurred.
Error message: Error occurs while adding the 'FieldName_Linq' custom property ('System.Double' property type) to the 'MyClassName' type: 'Object reference not set to an instance of an object.'

Added By: Dennis (DevExpress Support) at: 1/29/2013 6:43:43 AM    

Guys, please refer to the public http://www.devexpress.com/issue=Q470416 ticket instead of the private Q421353 one.

Added By: Mr292 at: 1/30/2013 5:44:44 PM    

Dennis, Thanks a lot for this. I had implemented something similar before but I have now moved to your code so as to take advantage of any future changes.

I have a few questions though

1. Does the Model.xafml in the Program Folder get hit at all? It does not seem like it from the code, but wanted to be sure.
2. I had implemented a feature where on exit, the configurator would be prompted to store changes. I have modified this to do the same but in my implementation, the user was being prompted twice. This I have noticed is an issue with a lot of functions in XAF but is usually solvable easily. In this instance, what should I check for to disable the consecutive prompt?
3. Lastly, Just so some users are aware I was having issues saving Chart/Pivot Settings as XML in MySQL if I use latin1 in innodb. Not your fault but I had implemented a BLOB save instead to get over that.

Added By: Vitaly Alekseev (Sibintek) at: 3/26/2013 10:44:39 PM    

How can I logon by Configurator user, if domain authentication used?

Added By: Nate Laff at: 4/12/2013 8:09:31 AM    

Implemented this yesterday after using the example of this from a long time ago (admin mode) and overall I like it.

Administrator users in my opinion shouldn't be able to see the User Settings navigation item. Unfortunately Q485525 prevents this from happening easily. Or am I missing something that this should be visible to Administrator. Seems like only Configurator should see it.

Added By: Nate Laff at: 4/16/2013 2:29:56 PM    

Also, this has been an issue since the first iterations of this. If you make changes to the Win model at the highest level (Model.xafml) such as moving the location of MyDetails, these changes always get messed up. In the current scenario, MyDetails shows up in the navigation group I specified, but also gets duplicated in the default group after you logon with the Configurator user. Does this happen to anyone else?

Added By: Nate Laff at: 4/16/2013 3:03:33 PM    

Also, what's the process here? Let's say you want to make a global change to a view as Configurator..

Log on as Configurator
Make changes
Exit
Log on as Configurator
Manage User Settings action, import from source Configurator to all users
Exit
Log on as User
Verify changes

Is that the process? Am I missing something. The exits are required?

Also, you can't reset to defaults without opening Model Editor as configurator, resetting there, exiting, manage user settings and import from Configurator source again?

Just trying to make sure I have this process down correctly.

Added By: Nate Laff at: 5/2/2013 11:06:59 AM    

Dennis?

Added By: zacarias de prado habela at: 7/26/2013 4:31:49 AM    

Hi:
Where is "XPManageUserSettingsParameter", "XPUserSettings", XPUserSettingsAspect defined?
Thanks

Added By: Dennis (DevExpress Support) at: 7/26/2013 4:41:35 AM    

These classes are defined in the DatabaseUserSettings module. Use the Visual Studio search facilities to locate them...

Added By: Gabriel at: 9/24/2013 10:54:17 AM    

My happy day :D

Added By: Carlitos at: 1/4/2014 5:32:43 PM    

Quick question on the IMPORTANT NOTES:
1 - the bug was corrected right?
2 - Will there be a middle-tier and SecuredObjectSpaceProvider example?

Thanks

Carlitos

Added By: Elvis Serret at: 9/30/2014 8:49:04 AM    

I have made this work with my Win app in multi-tier using remoting, how can I make it work for ASP.NET web app

Added By: Dennis (DevExpress Support) at: 9/30/2014 8:54:01 AM    

@Elvis: Exactly the same approach should be used for the Web app. What does not work for you in a Web app, or what can't you implement there? 

Added By: Elvis Serret at: 10/30/2014 12:33:54 AM    

In Web App it seems that the changes are not saved to the database for any of the users. Works fine in Win App

Added By: Elvis Serret at: 10/30/2014 12:36:35 AM    

Also after making changes in Win App, Web App does not pick up the changes of same user when login

How to export several MVC extensions into one file by using the XtraReports Suite

$
0
0

This example demonstrates how to export several MVC extensions that support the export of IPrintable documents (GridViewPivotGridTreeList) into one file by using the XtraReports Suite functionality.


To accomplish this task, use the PrintableComponentContainer control in your report to insert MVC extensions: at runtime use the extension's CreatePrintableObject method to get the IPrintable object in the controller's export action and assign it to the PrintableComponentContainer.PrintableComponent property.


See also:
Use Third-Party Controls in XtraReports > Print DevExpress Controls

How to use a custom function in Conditional Formatting

$
0
0
This example demonstrates how to create and use a custom function operator in Conditional Formatting.
With custom functions, you can format rows according to custom rules.
For this, we implement the ICustomFunctionOperator interface with a custom function. Then, we register this function operator in the CriteriaOperator's RegisterCustomFunction method.

ASPxGridView - How to bind GridViewDataComboBoxColumn Edit Form editor at runtime

$
0
0

This example illustrates how to provide GridViewDataComboBoxColumn with data and set its properties at runtime.Please note: the ComboBoxProperties.ValueType should be set according to the Data Type Mappings (ADO.NET) table.

Question Comments

Added By: KMirza at: 4/11/2013 2:07:43 PM    

Can I get the code to add/modify row? I want to avoid this message "Data modifications are not allowed in the online example.".

Added By: Marion (DevExpress Support) at: 4/12/2013 1:25:13 AM    

@Mirza
Simply define the datasource Update command and comment the following line:
throw new Exception("Data modifications are not allowed in the online example.");

Added By: Andrew Werner 1 at: 7/31/2013 9:15:42 AM    

Why is it also necessary to include the "Category Name" column in the dsCombo Box and when binding the aspx combo box (as text field)? What if we only want to display the Category ID in the drop down?

Added By: Andrew Werner 1 at: 7/31/2013 10:00:19 AM    

I ended up doing something very similar to this solution, but since I wanted to display the number field in my combobox (not any text or title), i'm using two columns. but the two columns are the same; they are both the number field. except I call one "title" and one "text".

Added By: Marion (DevExpress Support) at: 7/31/2013 11:38:23 PM    

@Andrew,
It is the most popular solution to show a text field in the ASPxComboBox. However, you can show any data you wish.

Added By: Rob Bronstein at: 8/19/2013 6:32:15 PM    

I was expecting to see a list of items in the dropdownedit control ?

Added By: Marion (DevExpress Support) at: 8/19/2013 11:08:23 PM    

@ Rob,
Yes.

How to register a custom filter function and use it in ASPxGridView

$
0
0

Sometimes it is necessary to create a custom function that allows implementing your own logic for filtering data in an auto filter row.

To create this function, it is necessary to implement the ICustomFunctionOperator interface. Finally, to register a custom function, call the CriteriaOperator.RegisterCustomFunction method with your custom function instance at the application startup.


This example illustrates how to add a custom function that will determine whether or not numbers in a cell are contained within the filter range.

See also:
How to create a custom ASPxGridView's filter insensitive to the number of spaces and punctuation
How to register a custom filter function and use it in GridControl

Viewing all 7205 articles
Browse latest View live


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