By design, GridViewDataComboBoxColumn does not render (Blank) and (NonBlank) items if the HeaderFilterMode property is set to CheckedList. However, you can add these items in the HeaderFilterFillItems event handler. Just call the FilterValue.CreateShowBlanksValue and FilterValue.CreateShowNonBlanksValue methods. <dx:ASPxGridView ID=”grid” runat=”server” AutoGenerateColumns=”False” DataSourceID=”dsCategories” KeyFieldName=”CategoryID” OnHeaderFilterFillItems=”grid_HeaderFilterFillItems”> <Columns> <dx:GridViewDataTextColumn FieldName=”CategoryID”> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn FieldName=”Description”> </dx:GridViewDataTextColumn> <dx:GridViewDataComboBoxColumn FieldName=”CategoryNameNull” Caption=”Category Name”> <Settings HeaderFilterMode=”CheckedList” /> <PropertiesComboBox DataSourceID=”dsCategories” ValueField=”CategoryNameNull” TextField=”CategoryNameNull” /> </dx:GridViewDataComboBoxColumn> </Columns> […]
Category: Devexpress
Add default value to Devex Grid Columns in C#
protected void grid_InitNewRow(object sender, DevExpress.Web.Data.ASPxDataInitNewRowEventArgs e) { e.NewValues[“BirthDate”] = new DateTime(1970, 1, 10); e.NewValues[“Title”] = “Sales Representative”; } Here is the result:
How to apply a custom CSS class to Devexpress components
For all the Devex Components, you can use ControlStyle > CssClass property to apply your custom CSS class (Example 1 and 2) or you can do it with parameter (if it is allowed – as in Example 3). Here is 3 examples for MVC: @Html.DevExpress().SpinEditFor(m => m.Books.Rating, settings => { settings.Properties.SpinButtons.ShowIncrementButtons = true; settings.Properties.Increment = […]
Define a Default Value when insert New Record From ASPxGridView
To initialize DataRow’s default values handle InitNewRow event of the required ASPxGridView control and initialize the default values by using e.NewValues dictionary in the following manner:
ASPxGridView – Disable CheckBox based on condition in GridViewCommandColumn
You can use code below:
How to Solve The ‘Object reference not set to an instance of an object’ error in Batch Edit mode for ASPxGridView
The issue occurs in Batch Edit Mode, because in this mode an empty invisible row is created and used for further grid editing. Since the Eval method returns a value type of an object, your attempt to call the ToString() method to the null value can lead to an exception. If you remove this conversion and use <%# […]
Confirm before process with ASPxButton in Devexpress
If you want to confirm before process with ASPxButton in Devexpress, then you can try the code below:
How to set Tooltip for a particular Devexpress Gridview Column
You can use code below:
Devexpress ASPxGridview Column Grouping in Code
The following code shows how to group by two columns (“Country” and “City”).
How to solve “Response.Redirect cannot be called in a Page callback” for DevExpress Components
DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(“the_redirect_page.aspx”);