Skip to content

Commit 289d1d9

Browse files
Merge pull request #1 from PiruthivirajM/master
Add files via upload
2 parents 56294a6 + 95f1d3f commit 289d1d9

14 files changed

+735
-0
lines changed

GridControlDemo/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
5+
</startup>
6+
</configuration>

GridControlDemo/Application.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="Application"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:GridControlDemo"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Class Application
2+
3+
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
4+
' can be handled in this file.
5+
6+
End Class
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.572
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "GridControlDemo", "GridControlDemo.vbproj", "{DCAA044A-8F3A-44CE-A541-3B2E8EF826FE}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{DCAA044A-8F3A-44CE-A541-3B2E8EF826FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{DCAA044A-8F3A-44CE-A541-3B2E8EF826FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{DCAA044A-8F3A-44CE-A541-3B2E8EF826FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{DCAA044A-8F3A-44CE-A541-3B2E8EF826FE}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {2B82F005-79AA-41F6-8DD2-85C8257241B3}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectGuid>{DCAA044A-8F3A-44CE-A541-3B2E8EF826FE}</ProjectGuid>
7+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>GridControlDemo</RootNamespace>
10+
<AssemblyName>GridControlDemo</AssemblyName>
11+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12+
<MyType>Custom</MyType>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<DefineDebug>true</DefineDebug>
21+
<DefineTrace>true</DefineTrace>
22+
<IncrementalBuild>true</IncrementalBuild>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DocumentationFile>GridControlDemo.xml</DocumentationFile>
25+
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<DebugSymbols>false</DebugSymbols>
31+
<DefineDebug>false</DefineDebug>
32+
<DefineTrace>true</DefineTrace>
33+
<IncrementalBuild>false</IncrementalBuild>
34+
<Optimize>true</Optimize>
35+
<OutputPath>bin\Release\</OutputPath>
36+
<DocumentationFile>GridControlDemo.xml</DocumentationFile>
37+
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
38+
</PropertyGroup>
39+
<PropertyGroup>
40+
<OptionExplicit>On</OptionExplicit>
41+
</PropertyGroup>
42+
<PropertyGroup>
43+
<OptionCompare>Binary</OptionCompare>
44+
</PropertyGroup>
45+
<PropertyGroup>
46+
<OptionStrict>Off</OptionStrict>
47+
</PropertyGroup>
48+
<PropertyGroup>
49+
<OptionInfer>On</OptionInfer>
50+
</PropertyGroup>
51+
<ItemGroup>
52+
<Reference Include="Syncfusion.Grid.WPF, Version=17.3460.0.17, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
53+
<HintPath>packages\Syncfusion.Grid.WPF.17.3.0.17\lib\net46\Syncfusion.Grid.WPF.dll</HintPath>
54+
</Reference>
55+
<Reference Include="Syncfusion.GridCommon.WPF, Version=17.3460.0.17, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
56+
<HintPath>packages\Syncfusion.GridCommon.Wpf.17.3.0.17\lib\net46\Syncfusion.GridCommon.WPF.dll</HintPath>
57+
</Reference>
58+
<Reference Include="Syncfusion.Licensing, Version=17.3460.0.17, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
59+
<HintPath>packages\Syncfusion.Licensing.17.3.0.17\lib\net46\Syncfusion.Licensing.dll</HintPath>
60+
</Reference>
61+
<Reference Include="Syncfusion.Linq.Base, Version=17.3460.0.17, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
62+
<HintPath>packages\Syncfusion.Linq.Base.17.3.0.17\lib\net46\Syncfusion.Linq.Base.dll</HintPath>
63+
</Reference>
64+
<Reference Include="Syncfusion.Shared.WPF, Version=17.3460.0.17, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
65+
<HintPath>packages\Syncfusion.Shared.WPF.17.3.0.17\lib\net46\Syncfusion.Shared.WPF.dll</HintPath>
66+
</Reference>
67+
<Reference Include="System.Core" />
68+
<Reference Include="System.Xml.Linq" />
69+
<Reference Include="System.Data.DataSetExtensions" />
70+
<Reference Include="System" />
71+
<Reference Include="System.Data" />
72+
<Reference Include="System.Xml" />
73+
<Reference Include="System.Xaml">
74+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
75+
</Reference>
76+
<Reference Include="WindowsBase" />
77+
<Reference Include="PresentationCore" />
78+
<Reference Include="PresentationFramework" />
79+
<Reference Include="System.Net.Http" />
80+
</ItemGroup>
81+
<ItemGroup>
82+
<ApplicationDefinition Include="Application.xaml">
83+
<Generator>MSBuild:Compile</Generator>
84+
<SubType>Designer</SubType>
85+
</ApplicationDefinition>
86+
<Page Include="MainWindow.xaml">
87+
<Generator>MSBuild:Compile</Generator>
88+
<SubType>Designer</SubType>
89+
</Page>
90+
<Compile Include="Application.xaml.vb">
91+
<DependentUpon>Application.xaml</DependentUpon>
92+
<SubType>Code</SubType>
93+
</Compile>
94+
<Compile Include="MainWindow.xaml.vb">
95+
<DependentUpon>MainWindow.xaml</DependentUpon>
96+
<SubType>Code</SubType>
97+
</Compile>
98+
</ItemGroup>
99+
<ItemGroup>
100+
<Import Include="System.Threading.Tasks" />
101+
<Import Include="System.Linq" />
102+
<Import Include="System.Xml.Linq" />
103+
<Import Include="Microsoft.VisualBasic" />
104+
<Import Include="System" />
105+
<Import Include="System.Collections" />
106+
<Import Include="System.Collections.Generic" />
107+
<Import Include="System.Diagnostics" />
108+
<Import Include="System.Windows" />
109+
<Import Include="System.Windows.Controls" />
110+
<Import Include="System.Windows.Data" />
111+
<Import Include="System.Windows.Documents" />
112+
<Import Include="System.Windows.Input" />
113+
<Import Include="System.Windows.Shapes" />
114+
<Import Include="System.Windows.Media" />
115+
<Import Include="System.Windows.Media.Imaging" />
116+
<Import Include="System.Windows.Navigation" />
117+
</ItemGroup>
118+
<ItemGroup>
119+
<Compile Include="My Project\AssemblyInfo.vb">
120+
<SubType>Code</SubType>
121+
</Compile>
122+
<Compile Include="My Project\MyExtensions\MyWpfExtension.vb">
123+
<VBMyExtensionTemplateID>Microsoft.VisualBasic.WPF.MyExtension</VBMyExtensionTemplateID>
124+
<VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
125+
</Compile>
126+
<Compile Include="My Project\Resources.Designer.vb">
127+
<AutoGen>True</AutoGen>
128+
<DesignTime>True</DesignTime>
129+
<DependentUpon>Resources.resx</DependentUpon>
130+
</Compile>
131+
<Compile Include="My Project\Settings.Designer.vb">
132+
<AutoGen>True</AutoGen>
133+
<DependentUpon>Settings.settings</DependentUpon>
134+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
135+
</Compile>
136+
<EmbeddedResource Include="My Project\Resources.resx">
137+
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
138+
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
139+
<CustomToolNamespace>My.Resources</CustomToolNamespace>
140+
</EmbeddedResource>
141+
<None Include="My Project\Settings.settings">
142+
<Generator>SettingsSingleFileGenerator</Generator>
143+
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
144+
</None>
145+
<None Include="packages.config" />
146+
</ItemGroup>
147+
<ItemGroup>
148+
<None Include="App.config" />
149+
</ItemGroup>
150+
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
151+
</Project>

GridControlDemo/MainWindow.xaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Window x:Class="MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:GridControlDemo"
7+
mc:Ignorable="d"
8+
xmlns:Syncfusion="clr-namespace:Syncfusion.Windows.Controls.Grid;assembly=Syncfusion.Grid.WPF"
9+
Title="GridControlDemo" Height="600" Width="800">
10+
<Grid>
11+
<Grid.RowDefinitions>
12+
<RowDefinition Height="40"/>
13+
<RowDefinition Height="*"/>
14+
<RowDefinition Height="40"/>
15+
<RowDefinition Height="*"/>
16+
</Grid.RowDefinitions>
17+
<Label x:Name="lbl1" Content="Populating data using cell style" FontSize="18"></Label>
18+
<ScrollViewer HorizontalScrollBarVisibility="Visible" Grid.Row="1">
19+
<Syncfusion:GridControl x:Name="gridControl"/>
20+
</ScrollViewer>
21+
<Label x:Name="lbl2" Content="Populating data on-demand basis(Virtual Grid)" Grid.Row="2" FontSize="18"></Label>
22+
<ScrollViewer HorizontalScrollBarVisibility="Visible" Grid.Row="3">
23+
<Syncfusion:GridControl x:Name="virtualGrid"/>
24+
</ScrollViewer>
25+
</Grid>
26+
</Window>

GridControlDemo/MainWindow.xaml.vb

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Imports Syncfusion.Windows.Controls.Grid
2+
3+
Class MainWindow
4+
Public Sub New()
5+
InitializeComponent()
6+
7+
Dim r As New Random()
8+
'Specifying row and column count
9+
gridControl.Model.RowCount = 50
10+
gridControl.Model.ColumnCount = 10
11+
gridControl.Model.RowHeights.DefaultLineSize = 30
12+
gridControl.Model.ColumnWidths.DefaultLineSize = 70
13+
Dim ci As New GridStyleInfo()
14+
For row As Integer = 1 To 49
15+
For col As Integer = 1 To 9
16+
If r.Next(1, 4) = 2 Then
17+
gridControl.Model(row, col).CellValue = r.Next(10, 100)
18+
ElseIf r.Next(1, 4) = 3 Then
19+
gridControl.Model(row, col).CellValue = "Text" & r.Next(10, 100).ToString()
20+
Else
21+
gridControl.Model(row, col).CellValue = (r.Next(1000, 10000) * 0.01)
22+
End If
23+
Next col
24+
Next row
25+
26+
AddHandler gridControl.QueryCellInfo, AddressOf grid_QueryCellInfo
27+
28+
'VirtualGrid settings
29+
virtualGrid.Model.RowCount = 50
30+
virtualGrid.Model.ColumnCount = 10
31+
virtualGrid.Model.RowHeights.DefaultLineSize = 30
32+
virtualGrid.Model.ColumnWidths.DefaultLineSize = 70
33+
AddHandler virtualGrid.QueryCellInfo, AddressOf virtualGrid_QueryCellInfo
34+
End Sub
35+
36+
Dim rand As New Random()
37+
Private Sub grid_QueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs)
38+
If e.Style.RowIndex = 0 AndAlso e.Style.ColumnIndex = 0 Then
39+
Return
40+
ElseIf e.Style.RowIndex = 0 Then
41+
e.Style.CellValue = GridRangeInfo.GetAlphaLabel(e.Cell.ColumnIndex)
42+
e.Style.HorizontalAlignment = HorizontalAlignment.Center
43+
e.Style.VerticalAlignment = VerticalAlignment.Center
44+
ElseIf e.Style.ColumnIndex = 0 Then
45+
e.Style.CellValue = e.Style.RowIndex
46+
e.Style.HorizontalAlignment = HorizontalAlignment.Center
47+
e.Style.VerticalAlignment = VerticalAlignment.Center
48+
End If
49+
End Sub
50+
51+
Private Sub virtualGrid_QueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs)
52+
If e.Style.RowIndex = 0 AndAlso e.Style.ColumnIndex = 0 Then
53+
Return
54+
'set value for column headers
55+
ElseIf e.Style.RowIndex = 0 Then
56+
e.Style.CellValue = GridRangeInfo.GetAlphaLabel(e.Cell.ColumnIndex)
57+
'set value for row headers
58+
ElseIf e.Style.ColumnIndex = 0 Then
59+
e.Style.CellValue = e.Style.RowIndex
60+
'set value for cells
61+
Else
62+
e.Style.CellValue = rand.Next(10, 100)
63+
End If
64+
End Sub
65+
End Class
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Imports System
2+
Imports System.Reflection
3+
Imports System.Runtime.InteropServices
4+
Imports System.Globalization
5+
Imports System.Resources
6+
Imports System.Windows
7+
8+
' General Information about an assembly is controlled through the following
9+
' set of attributes. Change these attribute values to modify the information
10+
' associated with an assembly.
11+
12+
' Review the values of the assembly attributes
13+
14+
<Assembly: AssemblyTitle("GridControlDemo")>
15+
<Assembly: AssemblyDescription("")>
16+
<Assembly: AssemblyCompany("")>
17+
<Assembly: AssemblyProduct("GridControlDemo")>
18+
<Assembly: AssemblyCopyright("Copyright © 2019")>
19+
<Assembly: AssemblyTrademark("")>
20+
<Assembly: ComVisible(false)>
21+
22+
'In order to begin building localizable applications, set
23+
'<UICulture>CultureYouAreCodingWith</UICulture> in your .vbproj file
24+
'inside a <PropertyGroup>. For example, if you are using US english
25+
'in your source files, set the <UICulture> to "en-US". Then uncomment the
26+
'NeutralResourceLanguage attribute below. Update the "en-US" in the line
27+
'below to match the UICulture setting in the project file.
28+
29+
'<Assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)>
30+
31+
32+
'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
33+
'1st parameter: where theme specific resource dictionaries are located
34+
'(used if a resource is not found in the page,
35+
' or application resource dictionaries)
36+
37+
'2nd parameter: where the generic resource dictionary is located
38+
'(used if a resource is not found in the page,
39+
'app, and any theme specific resource dictionaries)
40+
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
41+
42+
43+
44+
'The following GUID is for the ID of the typelib if this project is exposed to COM
45+
<Assembly: Guid("48fef37d-f90f-44b7-a0f2-224985a0b9df")>
46+
47+
' Version information for an assembly consists of the following four values:
48+
'
49+
' Major Version
50+
' Minor Version
51+
' Build Number
52+
' Revision
53+
'
54+
' You can specify all the values or you can default the Build and Revision Numbers
55+
' by using the '*' as shown below:
56+
' <Assembly: AssemblyVersion("1.0.*")>
57+
58+
<Assembly: AssemblyVersion("1.0.0.0")>
59+
<Assembly: AssemblyFileVersion("1.0.0.0")>

0 commit comments

Comments
 (0)