I need to merge cells across multiple rows. Something similar to a RowSpan on the cell. This is because I have two columns in the grid. Column 1 can have duplicate values that relate to the values in the column one. I want to merge values in the column 1 to just appear once for all the rows in column2.
Is there a way to achieve this on the DataGrid in Silverlight 5?
I am sorry to say this but most Silverlight grids do not support cell merging. At least not out of the box. I have resorted to using Component One studio for Silverlight in order to achieve this, and even then it hasn't been exactly a walk in the park.
Consider C1 Data Grid control. Here is a sample on merging grid row and column headers with sample code and a small write up. The down side of such solutions is that C1's controls are extremely expensive :( I wish Microsoft came up with some enhancements in SL5 that would accommodate for such issues.
Related
On a project written with ExtJs 6, I'm looking for the ability to have multi-level grouping on a grid.
I don't want to group the records on multiple columns but on one level, but each column to be grouped on its own level.
I found some examples for ExtJs, but all pages have broken link to source code (old references).
My goal is to be able to group columns on one, two or three levels depending on the user's choice.
Gridpanel ExtJs proposes by default to group only on one level. I'm looking to expand that.
Sounds like you could use a Tree Grid, each branch being a level.
I solved my issue by migrate ExtJs framework to version 7.5
And then using the "AdvancedGroupingSummary" grid's feature which allows multi-level grouping
I need to create a responsive tables in Vaadin.
In this example http://demo.vaadin.com/dashboard/#!transactions less important columns are colapsed on small screen sizes.
Is there any possibility to create responsive table without hidding columns?
Like Andre asked, the question really is what else would you do? You pretty much have three choices that I can come up with:
Do nothing, which will make the table horizontally scrollable (this is also what happens in the demo at some point, before dropping column count). If you have relative sizes (expand ratios) for columns, they'll just squeeze.
Set some columns invisible (note that you can the visible columns user selectable like in the demo, move mouse to top right corner of table to see the UI)
Combine and shorten data with smaller screen sizes. In the demo you could for example combine city and country to one column to save some pixels or present time with a more compact formatting (like 24h time, dropping seconds, dropping year).
I feel like there's something about grids that I'm missing, but I can't find it through Googling around.
For example, I want to be able to declare ten rows with ten columns, populate them with data, and then later realize that I don't need row 3, and be able to quickly reformat it. I'm not speaking of doing this programmatic, but while redesigning the project. One way that this could be handled in theory would be HTML's manner of deleting a set of <tr></tr>s. This would be limited to rows, obviously. Another way might be the ability to give each column a name, such as "CityColumn," "StateColumn" (or named whatever else depending on the use of Grid), and then simply deleting the column's definition and all elements declared to exist in the column.
As is, if you delete any given row or column, you must go to each and every element that appears in a later row or column and change the row or column's number. It seems like there should be a better way to use XAML's grid that I'm not making use of.
While I lack a clear question that I can define, it can be said that I'm looking for best practices and/or any tips and tricks to make Grid easy to modify it and its contents and, in general, provide upkeep for.
Either explanations or links to learning resources about XAML's Grid would be welcome.
I would recommend what Jeff Mercado said: ListView with GridView as its View. The columns of that view can have headers, and if you remove an item the respective row is gone.
Also you can optimize the Grid maintainability, if you intend to stick with that, by using named references rather than indices, so if you remove one row that becomes much easier.
I have a requirement, where the user has the ability to select multiple cells (row wise or column Wise). As soon as the selection is complete I need to merge only the selected cells(not the entire row or column). I did some research online, many suggested grouping. But when I use grouping entire row is getting merged.
Can you guys please help me with this issue.
DataGrids are not spreadsheets, you should probably look for another control as doing this in a DataGrid may be near impossible.
I am working in Visual Basic 6 and need to sort by multiple columns in a ListView. For example, sorting a list of music tracks by artist, then album, then track number. As far as I know, VB6 does not support this out of the box. Here are the suggestions I have already heard:
Sort the data in a SQL table first and display the data in the resulting order
Sort the data in an ADO recordset object in memory
Sort by the primary column and then perform a sort algorithm on the items, moving them around into the correct positions manually
Does anyone have experience with multiple-column sorting in VB6 who could lend advice?
I would create a hidden column in the listview that concatenates those three columns and sort by that
You can try sorting using the Windows API and callbacks: Link
Alternatively, you could try switching to a vbAccelerator ListView; I highly recommend it.