About 57,300 results
Open links in new tab
  1. The Difference Between a DataGrid and a GridView in ASP.NET?

    Like the DataGrid control, the GridView control was designed to display data in an HTML table. When bound to a data source, the DataGrid and GridView controls each display a row from a …

  2. How to make the last column in WPF datagrid take all the left …

    Jun 10, 2015 · Standard WPF 4 Datagrid. Let' say I have datagrid 200 pixels wide, and 2 columns. I would like the columns take always entire space, meaning if the user resizes the first column …

  3. How to customize DataGrid in WinUI3 via C# - Stack Overflow

    Feb 26, 2024 · DataGrid table = new DataGrid(); table.ColumnWidth = DataGridLength.SizeToCells; table.AutoGenerateColumns = true; table.ItemsSource = …

  4. How can I hide a column in a MUI X Data Grid? - Stack Overflow

    Mar 23, 2022 · <DataGrid slots={{toolbar: GridToolbar}} /> columnVisibilityModel is a good solution if you don't want to let users manually select which columns they want to hide. The …

  5. How can I set the width of a DataGridColumn to fit contents …

    I have a WPF DataGrid that contains some data. I would like to set the width of the columns such that the content fits in and never gets cropped (instead, a horizontal scroll bar should become …

  6. How to center the content of cells in a data grid? - Stack Overflow

    <DataGrid MinRowHeight="40"> After feeding the datagrid with datas, the text in each cell is top and left aligned. I could not find an easy way to center that text. Any suggestions for doing that?

  7. Single click edit in WPF DataGrid - Stack Overflow

    I want the user to be able to put the cell into editing mode and highlight the row the cell is contained in with a single click. By default, this is double click. How do I override or implement t...

  8. Binding Visibility for DataGridColumn in WPF - Stack Overflow

    First of all, DataGridTextColumn (or any other supported dataGrid column) does not lie in the Visual tree of the DataGrid. Hence, by default it doesn't inherit the DataContext of the …

  9. How can I set the color of a selected row in DataGrid

    In my case, the reason was that I also had a CellStyle in my datagrid, and the CellStyle overrode the RowStyle I was setting. Interestingly so, because the CellStyle wasn't even setting the …

  10. datagrid - C# - How to get cell value from DataGridView ... - Stack ...

    Dec 15, 2022 · I'm using a three columns DataGridview. Two columns are filled by data read with SQL. The third column is a checkbox. I tried to use these two code snippets: for (int i=0, …