dotnet / dotnet/wpf

WPF Datagrid column merge and data trim

Open
#1,340 0 comments 0 reactions 0 assignees View on GitHub
.NET Framework Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Version: v4.7.2 ( Preview1, or daily build number, use `dotnet --info`)
* Windows version: windows 10 (1903)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes/No



**Problem description:**
I am developing a windows form with data grid, which pulls data from a database and binds the data to a data grid (The number of rows changes as per a unique id and 5 fixed columns). The problems are

1. Bind two columns and display in a single column.
2. Trim the second column contents after a semi-colon (;) and bind both (1st and 2nd data columns) to data grid
3. Get the total of value of all rows for a column and display in a text field (column is a decimal type)
4. Width of the columns get wider in runtime


**Actual behavior:**
1. Unable to bind both the columns, Fields getting overlaped (attached jpg file: DataGrid.jpg)
2. Trim not supported. Unbale to bind individual rows


**Expected behavior:**
1. Merging both columns, trimming the second column after the semicolon (;)
2. Getting the total value of all rows in a column

**Minimal repro:**

![DataGrid](https://user-images.githubusercontent.com/22197822/61681998-82bbf380-ad2d-11e9-81c0-3d67b312eac2.jpg)

[DataGrid.txt](https://github.com/dotnet/wpf/files/3420141/DataGrid.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.