How to make custom header with data grid in WPF? - c#

I want to make data grid with custom header. My header contains of Row Span and Column Span. So I have decided using grid as the layout and then datagrid as my control data.
You can see my header like this..
and then below that header I wanna make datagrid how I can do it? I'm still newbie in WPF and then how I can make the column in my grid layout can match datagrid that I have created below that?

Related

Hide column Header and data in ListView Asp.Net

I have a ListView in my Asp.net application which has ItemTemplates. And data is bound to the listview. I want to give user flexibility to chose columns that they want to see in the ListView i.e. Show/Hide particular columns in the ListView. How can I achieve that? I tried
ListView1.FindControl("columnName").Visible = false;
But this only hides the column header and data in the ListView becomes out of order. What's the best way to achieve this?

Is there a way to style the unwanted rightmost column in Wpf Datagrid so that it looks different from rest of the grid?

I am using Wpf DataGrid and I can see a last unwanted column, which I understand is just a filler for the available space on the right, and is not an actual column as such. Is there a way to style that column a bit different than rest of the grid so that I can highlight that it is not an actual column?
Apply a style to targettype header with a trigger that does whatever you want when content equals {x:null}. Since the last header has no content the trigger will fire on that one.

WPF datagrid show data of all columns in one row

In datagrid I want to show list which is grouped, there is a style for datagrid row to show expander which shows basic information and then user has to expand to see more data (in terms of another datagrid). What I want to do in the expander is to aggregate the data of one column from the nested datagrid as part of basic information.
What is the best way to do it? Do I do it by making my ViewModel arrange the data for parent datagrid and bind that property? Or I can do it solely in XAML?

datagrid control in asp.net

Hi i have one datagrid in my webform. I want to increase columns in the datagrid based on the data values comes from data values with help of scroll bar.
put the rows in div and add "style=overflow:auto" in the div style Above code will add scroll bars in the grid
Place the Gridview inside the Panel and Assign Panel property ScrollBars="Horizontal"

Display ASP.NET GridView inside a selected row in another GridView

I have been given a mockup that I do not know is possible to code in ASP.NET without being a real html and javascript wizard.
I want a GridView that when a row is selected, the selected row expands and below the selected row a panel of additional information is shown, which would also include another small GridView. The idea is this would all be in-line. So if the user selected row 4, then the additional information would appear below row 4 and then after the additional information the parent GridView would continue with row 5.
Ultimately I would want to do a multi-select type of set up, but first I need to figure out if this is even possible. Also, the solution must be 508 Compliant
The one solution I considered was using only one "column". Then I would put all my fields in the ItemTemplate, and my detail panel content in the EditItemTemplate and instead of selecting the row, set it to edit mode. The problem with this solution is I lose the functionality of multiple columns if I throw everything in one huge ItemTemplate.
Any and all suggestions or ideas are appreciated.
What you're describing would be best fulfilled with a ListView control. It takes a little more templating work to set up than a grid view, but you have much more control over it and you can emulate the look of a GridView. You would set your Selected Item template to contain another ListView (or GridView) thats bound to your detailed data.
I've done this using a gridview inside a ListView and using ajaxcontroltoolkit collapsible panel
Your parent list would be a listview that would have 2 table rows for each item, on the first row your parent column, on the second row use colspan and add a gridview wrapped on a collapsible panel

Categories

Resources