Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<!-- default badges list -->
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128652847/21.1.5%2B)
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/E1920)
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
<!-- default badges end -->
<!-- default file list -->
*Files to look at*:

* [Products.cs](./CS/DXGrid_SelectRows/Products.cs) (VB: [Products.vb](./VB/DXGrid_SelectRows/Products.vb))
* [Window1.xaml](./CS/DXGrid_SelectRows/Window1.xaml) (VB: [Window1.xaml](./VB/DXGrid_SelectRows/Window1.xaml))
* [Window1.xaml.cs](./CS/DXGrid_SelectRows/Window1.xaml.cs) (VB: [Window1.xaml.vb](./VB/DXGrid_SelectRows/Window1.xaml.vb))
<!-- default file list end -->
# How to select rows that contain the specified value


<p>This example shows how to select rows whose 'UnitPrice' column contains a value equal to or greater than 20. To select rows, click the 'Select' button.</p>

<br/>


<!-- default badges list -->
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/E1920)
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
<!-- default badges end -->
<!-- default file list -->
*Files to look at*:

* [Products.cs](./CS/DXGrid_SelectRows/Products.cs) (VB: [Products.vb](./VB/DXGrid_SelectRows/Products.vb))
* [Window1.xaml](./CS/DXGrid_SelectRows/Window1.xaml) (VB: [Window1.xaml](./VB/DXGrid_SelectRows/Window1.xaml))
* [Window1.xaml.cs](./CS/DXGrid_SelectRows/Window1.xaml.cs) (VB: [Window1.xaml.vb](./VB/DXGrid_SelectRows/Window1.xaml.vb))
<!-- default file list end -->
# How to select rows that contain the specified value


<p>This example shows how to select rows whose 'UnitPrice' column contains a value equal to or greater than 20. To select rows, click the 'Select' button.</p>

<br/>


2 changes: 1 addition & 1 deletion VB/DXGrid_SelectRows.Net5.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 16
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DXGrid_SelectRows", "DXGrid_SelectRows\DXGrid_SelectRows.Net5.vbproj", "{B77F63EB-3F21-4AAF-88D9-6DE26A04E6F9}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion VB/DXGrid_SelectRows.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2012
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DXGrid_SelectRows", "DXGrid_SelectRows\DXGrid_SelectRows.vbproj", "{B77F63EB-3F21-4AAF-88D9-6DE26A04E6F9}"
EndProject
Expand Down
5 changes: 5 additions & 0 deletions VB/DXGrid_SelectRows/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Application x:Class="DXGrid_SelectRows.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="Window1.xaml">
<Application.Resources>

</Application.Resources>
</Application>
12 changes: 12 additions & 0 deletions VB/DXGrid_SelectRows/App.xaml.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Imports System.Windows

Namespace DXGrid_SelectRows

''' <summary>
''' Interaction logic for App.xaml
''' </summary>
Public Partial Class App
Inherits Application

End Class
End Namespace
17 changes: 9 additions & 8 deletions VB/DXGrid_SelectRows/DXGrid_SelectRows.Net5.vbproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OptionInfer>On</OptionInfer>
<TargetFramework>net5.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace></RootNamespace>
<RootNamespace>
</RootNamespace>
<AssemblyName>DXGrid_SelectRows</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Platforms>x86;AnyCPU</Platforms>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<DefaultItemExcludes>obj*/**</DefaultItemExcludes>
<OptionExplicit>On</OptionExplicit>
<OptionCompare>Binary</OptionCompare>
<OptionStrict>Off</OptionStrict>
<OptionInfer>On</OptionInfer>
<EnableDefaultApplicationDefinition>false</EnableDefaultApplicationDefinition>
</PropertyGroup>
<ItemGroup>
<AppDesigner Include="My Project\" />
<ApplicationDefinition Include="App.xaml" />
</ItemGroup>
<ItemGroup>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DevExpress.Data" Version="21.1.*-*" />
Expand All @@ -33,4 +34,4 @@
<PackageReference Include="DevExpress.Wpf.Reporting" Version="21.1.*-*" />
<PackageReference Include="DevExpress.Wpf.Themes.All" Version="21.1.*-*" />
</ItemGroup>
</Project>
</Project>
70 changes: 24 additions & 46 deletions VB/DXGrid_SelectRows/DXGrid_SelectRows.vbproj
Original file line number Diff line number Diff line change
@@ -1,62 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OptionInfer>On</OptionInfer>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B77F63EB-3F21-4AAF-88D9-6DE26A04E6F9}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace></RootNamespace>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>
</RootNamespace>
<AssemblyName>DXGrid_SelectRows</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<BaseIntermediateOutputPath>obj.NetFX</BaseIntermediateOutputPath>
<OptionExplicit>On</OptionExplicit>
<OptionCompare>Binary</OptionCompare>
<OptionStrict>Off</OptionStrict>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<DefineConstants>DEBUG,TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<RemoveIntegerChecks>true</RemoveIntegerChecks>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<RemoveIntegerChecks>true</RemoveIntegerChecks>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
<Import Include="System.Data" />
<Import Include="System.Windows" />
<Import Include="System.Windows.Controls" />
<Import Include="System.Windows.Data" />
<Import Include="System.Windows.Documents" />
<Import Include="System.Windows.Input" />
<Import Include="System.Windows.Media" />
<Import Include="System.Windows.Media.Imaging" />
<Import Include="System.Windows.Navigation" />
<Import Include="System.Windows.Shapes" />
</ItemGroup>
<ItemGroup>
<Reference Include="DevExpress.Pdf.v21.1.Core, Version=21.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Office.v21.1.Core, Version=21.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
Expand Down Expand Up @@ -95,52 +73,52 @@
<Reference Include="System.Xaml" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="Application.xaml">
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="Window1.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="Application.xaml.vb">
<DependentUpon>Application.xaml</DependentUpon>
<Compile Include="App.xaml.vb">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="ViewModel.vb" />
<Compile Include="Window1.xaml.vb">
<DependentUpon>Window1.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Products.vb" />
<Compile Include="My Project\AssemblyInfo.vb">
<Compile Include="Properties\AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<Compile Include="Properties\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<Compile Include="Properties\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<CustomToolNamespace>DXGrid_SelectRows.Properties</CustomToolNamespace>
</EmbeddedResource>
<None Include="My Project\Settings.settings">
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
<CustomToolNamespace>My</CustomToolNamespace>
</None>
<AppDesigner Include="My Project\" />
<AppDesigner Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
Expand All @@ -150,4 +128,4 @@
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
</Project>
</Project>
111 changes: 31 additions & 80 deletions VB/DXGrid_SelectRows/Products.vb
Original file line number Diff line number Diff line change
@@ -1,80 +1,31 @@
Imports System
Imports System.Collections.Generic

Public Class Product
Public Property CompanyName() As String
Public Property Country() As String
Public Property City() As String
Public Property UnitPrice() As Double
Public Property Quantity() As Integer
End Class

Public Class ProductList
Public Shared Function GetData() As List(Of Product)
Dim list As New List(Of Product)()
list.Add(New Product() With {
.CompanyName = "Island Trading",
.Country = "UK",
.City = "Cowes",
.UnitPrice = 19,
.Quantity = 10
})
list.Add(New Product() With {
.CompanyName = "Reggiani Caseifici",
.Country = "Italy",
.City = "Reggio Emilia",
.UnitPrice = 12.5,
.Quantity = 16
})
list.Add(New Product() With {
.CompanyName = "Ricardo Adocicados",
.Country = "Brazil",
.City = "Rio de Janeiro",
.UnitPrice = 19,
.Quantity = 12
})
list.Add(New Product() With {
.CompanyName = "QUICK-Stop",
.Country = "Germany",
.City = "QUICK-Stop",
.UnitPrice = 22,
.Quantity = 50
})
list.Add(New Product() With {
.CompanyName = "Split Rail Beer & Ale",
.Country = "USA",
.City = "Reggio Emilia",
.UnitPrice = 18,
.Quantity = 20
})
list.Add(New Product() With {
.CompanyName = "Ernst Handel",
.Country = "Austria",
.City = "Graz",
.UnitPrice = 21,
.Quantity = 52
})
list.Add(New Product() With {
.CompanyName = "Save-a-lot Markets",
.Country = "USA",
.City = "Boise",
.UnitPrice = 7.75,
.Quantity = 120
})
list.Add(New Product() With {
.CompanyName = "Tortuga Restaurante",
.Country = "Mexico",
.City = "México D.F.",
.UnitPrice = 21,
.Quantity = 15
})
list.Add(New Product() With {
.CompanyName = "Bottom-Dollar Markets",
.Country = "Canada",
.City = "Tsawwassen",
.UnitPrice = 44,
.Quantity = 16
})
Return list
End Function
End Class
Imports System.Collections.ObjectModel

Public Class Product

Public Property CompanyName As String

Public Property Country As String

Public Property City As String

Public Property UnitPrice As Double

Public Property Quantity As Integer
End Class

Public Class ProductList

Shared Public Function GetData() As ObservableCollection(Of Product)
Dim list As ObservableCollection(Of Product) = New ObservableCollection(Of Product)()
list.Add(New Product() With {.CompanyName = "Island Trading", .Country = "UK", .City = "Cowes", .UnitPrice = 19, .Quantity = 10})
list.Add(New Product() With {.CompanyName = "Reggiani Caseifici", .Country = "Italy", .City = "Reggio Emilia", .UnitPrice = 12.5, .Quantity = 16})
list.Add(New Product() With {.CompanyName = "Ricardo Adocicados", .Country = "Brazil", .City = "Rio de Janeiro", .UnitPrice = 19, .Quantity = 12})
list.Add(New Product() With {.CompanyName = "QUICK-Stop", .Country = "Germany", .City = "QUICK-Stop", .UnitPrice = 22, .Quantity = 50})
list.Add(New Product() With {.CompanyName = "Split Rail Beer & Ale", .Country = "USA", .City = "Reggio Emilia", .UnitPrice = 18, .Quantity = 20})
list.Add(New Product() With {.CompanyName = "Ernst Handel", .Country = "Austria", .City = "Graz", .UnitPrice = 21, .Quantity = 52})
list.Add(New Product() With {.CompanyName = "Save-a-lot Markets", .Country = "USA", .City = "Boise", .UnitPrice = 7.75, .Quantity = 120})
list.Add(New Product() With {.CompanyName = "Tortuga Restaurante", .Country = "Mexico", .City = "México D.F.", .UnitPrice = 21, .Quantity = 15})
list.Add(New Product() With {.CompanyName = "Bottom-Dollar Markets", .Country = "Canada", .City = "Tsawwassen", .UnitPrice = 44, .Quantity = 16})
Return list
End Function
End Class
Loading