change column to row in gridcontrol wpf devexpress - wpf

i have a devexpress gridcontrol ,which displays the data from the sql database.
By default,the table in gridcontrol is coming in a column fashion,
Whereas i need to convert column header as row header, where the column data will be presented as row data.
I have seen a lot of forums and blogs but didn't found any helpful material which helps my condition,
Kindly suggest me the way to do it ...

Devex has a vertical grid that does exactly that but sadly it is not available for WPF but only for WinForms.
This link shows an example of how to show a grid that will resemble the WinForms VerticalGrid control.
This link is to a question on the Devex site that sounds similar to yours. Maybe you'll find an answer there.
Hope that helps :)

Related

Fixed Document Tables?

I am looking for a layout control or other means of laying out data in a tabular format on a Fixed Document for reporting. I have used MigraDoc quite extensively in non WPF projects and its table object allows for a granular layout for each piece of data to be displayed in the table. Borders can be turned off on the cell level, columns can be merged/spanned, etc. Are there any controls that offer this kind on control within WPF? I have not seen where the DataGrid or the Grid will do what I need... easily. My data is not bound as I need to have full control over how it is displayed. I am not using a flow document so I cannot use the table object that it offers. Anyone have any suggestions? For now, I have resorted to programmatically creating a Grid and then inserting a Border containing a TextBlock within each cell. There just has to be a cleaner way!
BTW - I am looking to use native WPF controls in this project which is the reason that I am not using MigraDoc.

Datagrid populates with data if tab has not been in focus

I have a weird situation here. While I am digging into trying to figure out why it is happening I thought I might throw it out to the SO community for insight.
I have a wpf form with various tabs. Some of these tabs have tabs. On one of the tabs that is two tabs deep I have a datagrid that is bound to a datatable.
I have observed that if I take the proper actions to populate that datagrid with data before the tab with that datagrid has been focused, then it will contain data. However, if that tab has ever been focused before I populate the datagrid with data, then it will not have data.
Thoughts?
UPDATE
I have discovered that rows are making it to the datagrid but each row is really thin and only has one column . . . maybe this is a column generation problem? I do have AutoGenerateColumns="TRUE"
It did have to do with AutoGenerateColumns="TRUE". I went ahead and populuated the datatable with an empty dataset upon initialization.

Datagrid style help XAML

I just learned how to create SampleData and place them into a Datagrid using Blend. I havent found good tutorials on styling Datagrid without using WPFToolkit or Infragistics. I have extracted the template and styles from it, but I'm not sure where to even start hacking into the style.
I would like to create a Datagrid similar to this image http://blogs.infragistics.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/kiril_5F00_matev/XamDataGridFilteringSlider.jpg
Also, I would want to have it so when someone selects a row an arrow will show up for that row. Are there any good tutorials or codes you can share? A break down of the parts that make up the Datagrid control would surely help me understand better.
Thanks!
I've always loved Jaime Rodriguez's article for most basic DataGrid styling
And if you're looking to overwrite the template entirely, you can find the default template on MSDN

Expander in DataGrid (Silverlight)

I have a DataGrid and I need to add an Expander control dynamically to group few rows based on some conditions... Can anyone help me in this... I am completely new to Silverlight :(
Found the answer, I have created a separate column for the expander and managed to display it when my condition is satisfied. It is not dynamic though, but solved the purpose. :)
Dynamically--not sure what you want. I've done expanders statically. My two cents: keep it simple and don't try and do too much. If by dynamically you are taking about Master/Details data gridview, that can be done by XAML and loading the gridview with an ObservableCollection class (search the net). Also search for PagedCollectionView and .Visibility properties for controls. If you want to add controls to a StackPanel, dynamically, search the net for .Children.Remove methods.
Good luck, but as a beginner you are probably trying to do too much IMO.

How do I drag and drop between two datagrids in wpf?

For example, dragging a row from a datagrid table to another datagrid table?
However the other datagrid table just present the row, it manipulates the data gathered and present it in its own way.
I am using wpf toolkit. Can show me a sample example on this?
Here is a good place to start. Although the tutorial is shown for ListBox, it can also be adapted for DataGrid (although I have not tried it for myself).

Resources