Skip to content

Commit f2d5912

Browse files
Addressed the concerns.
1 parent 01c5ed9 commit f2d5912

File tree

8 files changed

+37
-61
lines changed

8 files changed

+37
-61
lines changed

SfDataGridDemo/SfDatagridDemo/App.config

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,4 @@
33
<startup>
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
55
</startup>
6-
<runtime>
7-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8-
<dependentAssembly>
9-
<assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral"/>
10-
<bindingRedirect oldVersion="0.0.0.0-25.1450.38.0" newVersion="25.1450.38.0"/>
11-
</dependentAssembly>
12-
</assemblyBinding>
13-
</runtime>
146
</configuration>

SfDataGridDemo/SfDatagridDemo/Form1.Designer.cs

Lines changed: 14 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SfDataGridDemo/SfDatagridDemo/Form1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Form1()
3434
this.sfDataGrid1.Columns.Add(new GridNumericColumn() { MappingName = "OrderID", HeaderText = "Order ID" });
3535
this.sfDataGrid1.Columns.Add(new GridTextColumn() { MappingName = "CustomerID", HeaderText = "Customer ID" });
3636
this.sfDataGrid1.Columns.Add(new GridNumericColumn() { MappingName = "Quantity", HeaderText = "Quantity" });
37-
this.sfDataGrid1.Columns.Add(new NumericUpDownExtColumn() { MappingName = "NumericUpDown", HeaderText = "NumericUpDown" , Width=150});
37+
this.sfDataGrid1.Columns.Add(new NumericUpDownExtColumn() { MappingName = "NumericUpDown", HeaderText = "NumericUpDown", Width = 150 });
3838
}
3939
}
4040

SfDataGridDemo/SfDatagridDemo/Renderer/NumericUpDownCellRenderer.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Syncfusion.Data;
2-
using Syncfusion.Styles;
1+
using Syncfusion.Styles;
32
using Syncfusion.Windows.Forms;
43
using Syncfusion.Windows.Forms.Grid;
54
using Syncfusion.WinForms.DataGrid;
@@ -29,16 +28,16 @@ public class NumericUpDownCellRenderer : GridCellRendererBase
2928
{
3029
public NumericUpDownCellRenderer(SfDataGrid dataGrid)
3130
{
32-
DataGrid = dataGrid;
31+
DataGrid = dataGrid;
3332
IsInEditing = false;
3433
}
3534
protected SfDataGrid DataGrid { get; set; }
3635

3736
protected override void OnRender(Graphics graphics, Rectangle cellRect, string cellValue, CellStyleInfo style, DataColumnBase column, RowColumnIndex rowColumnIndex)
38-
{
37+
{
3938
var NumericUpDownExtControl = new NumericUpDown();
4039
NumericUpDownExtControl.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
41-
NumericUpDownExtControl.Value =Convert.ToDecimal(cellValue);
40+
NumericUpDownExtControl.Value = Convert.ToDecimal(cellValue);
4241
NumericUpDownExtControl.Increment = new decimal(new int[] { 5, 0, 0, 0 });
4342
NumericUpDownExtControl.Minimum = new decimal(new int[] { 0, 0, 0, 0 });
4443
NumericUpDownExtControl.Maximum = new decimal(new int[] { 40, 0, 0, 0 });
@@ -49,4 +48,7 @@ protected override void OnRender(Graphics graphics, Rectangle cellRect, string c
4948
DataGrid.GetTopLevelParentDataGrid().TableControl.Controls.Add(NumericUpDownExtControl);
5049
}
5150
}
51+
52+
53+
5254
}

SfDataGridDemo/SfDatagridDemo/Renderer/NumericUpDownExtColumn.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
namespace SfDatagridDemo.Renderer
1010
{
11-
public class NumericUpDownExtColumn : GridColumn
11+
public class NumericUpDownExtColumn:GridColumn
1212
{
1313
public NumericUpDownExtColumn()
1414
{
15-
SetCellType("NumericUpDown");
15+
SetCellType("NumericUpDown");
1616
}
17-
17+
1818
}
1919
}

SfDataGridDemo/SfDatagridDemo/SfDatagridDemo.csproj

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,7 @@
3434
<WarningLevel>4</WarningLevel>
3535
</PropertyGroup>
3636
<ItemGroup>
37-
<Reference Include="Syncfusion.Core.WinForms, Version= *, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
38-
</Reference>
39-
<Reference Include="Syncfusion.Core.WinForms, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
40-
<HintPath>..\packages\Syncfusion.Core.WinForms.25.1.39\lib\net462\Syncfusion.Core.WinForms.dll</HintPath>
41-
</Reference>
42-
<Reference Include="Syncfusion.Data.WinForms, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Syncfusion.Data.WinForms.25.1.39\lib\net462\Syncfusion.Data.WinForms.dll</HintPath>
44-
</Reference>
45-
<Reference Include="Syncfusion.DataSource.WinForms, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
46-
<HintPath>..\packages\Syncfusion.DataSource.WinForms.25.1.39\lib\net462\Syncfusion.DataSource.WinForms.dll</HintPath>
47-
</Reference>
48-
<Reference Include="Syncfusion.GridCommon.WinForms, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
49-
<HintPath>..\packages\Syncfusion.GridCommon.WinForms.25.1.39\lib\net462\Syncfusion.GridCommon.WinForms.dll</HintPath>
50-
</Reference>
51-
<Reference Include="Syncfusion.Licensing, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
52-
<HintPath>..\packages\Syncfusion.Licensing.25.1.39\lib\net462\Syncfusion.Licensing.dll</HintPath>
53-
</Reference>
54-
<Reference Include="Syncfusion.SfDataGrid.WinForms, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
55-
<HintPath>..\packages\Syncfusion.SfDataGrid.WinForms.25.1.39\lib\net462\Syncfusion.SfDataGrid.WinForms.dll</HintPath>
56-
</Reference>
57-
<Reference Include="Syncfusion.SfInput.WinForms, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
58-
<HintPath>..\packages\Syncfusion.SfInput.WinForms.25.1.39\lib\net462\Syncfusion.SfInput.WinForms.dll</HintPath>
59-
</Reference>
60-
<Reference Include="Syncfusion.SfListView.WinForms, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
61-
<HintPath>..\packages\Syncfusion.SfListView.WinForms.25.1.39\lib\net462\Syncfusion.SfListView.WinForms.dll</HintPath>
62-
</Reference>
63-
<Reference Include="Syncfusion.Shared.Base, Version=25.1462.39.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
64-
<HintPath>..\packages\Syncfusion.Shared.Base.25.1.39\lib\net462\Syncfusion.Shared.Base.dll</HintPath>
65-
</Reference>
37+
<PackageReference Include="Syncfusion.SfDataGrid.Winforms" Version="*" />
6638
<Reference Include="System" />
6739
<Reference Include="System.ComponentModel.DataAnnotations" />
6840
<Reference Include="System.Core" />

SfDataGridDemo/SfDatagridDemo/ViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public List<OrderInfo> GetListOrdersDetails(int count)
6060
{
6161
List<OrderInfo> ordersDetails = new List<OrderInfo>();
6262

63-
for (int i = 1000; i < count + 1000; i++)
63+
for (int i = 10000; i < count + 10000; i++)
6464
{
6565
ordersDetails.Add(GetOrder(i));
6666
}
@@ -82,7 +82,7 @@ private OrderInfo GetOrder(int i)
8282
var order = new OrderInfo();
8383
order.OrderID = i;
8484
order.CustomerID = GetCustomerID(i);
85-
order.Quantity = r.Next(i % 60);
85+
order.Quantity = r.Next(i % 100);
8686
order.NumericUpDown = r.Next(i % 9);
8787
return order;
8888
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Syncfusion.Core.WinForms" version="25.1.39" targetFramework="net462" />
4-
<package id="Syncfusion.Data.WinForms" version="25.1.39" targetFramework="net462" />
5-
<package id="Syncfusion.DataSource.WinForms" version="25.1.39" targetFramework="net462" />
6-
<package id="Syncfusion.GridCommon.WinForms" version="25.1.39" targetFramework="net462" />
7-
<package id="Syncfusion.Licensing" version="25.1.39" targetFramework="net462" />
8-
<package id="Syncfusion.SfDataGrid.WinForms" version="25.1.39" targetFramework="net462" />
9-
<package id="Syncfusion.SfInput.WinForms" version="25.1.39" targetFramework="net462" />
10-
<package id="Syncfusion.SfListView.WinForms" version="25.1.39" targetFramework="net462" />
11-
<package id="Syncfusion.Shared.Base" version="25.1.39" targetFramework="net462" />
3+
<package id="Syncfusion.Core.WinForms" version="25.1.38" targetFramework="net462" />
4+
<package id="Syncfusion.Data.WinForms" version="25.1.38" targetFramework="net462" />
5+
<package id="Syncfusion.DataSource.WinForms" version="25.1.38" targetFramework="net462" />
6+
<package id="Syncfusion.GridCommon.WinForms" version="25.1.38" targetFramework="net462" />
7+
<package id="Syncfusion.Licensing" version="25.1.38" targetFramework="net462" />
8+
<package id="Syncfusion.SfDataGrid.WinForms" version="25.1.38" targetFramework="net462" />
9+
<package id="Syncfusion.SfInput.WinForms" version="25.1.38" targetFramework="net462" />
10+
<package id="Syncfusion.SfListView.WinForms" version="25.1.38" targetFramework="net462" />
11+
<package id="Syncfusion.Shared.Base" version="25.1.38" targetFramework="net462" />
1212
</packages>

0 commit comments

Comments
 (0)