Merging of cells in Silverlight DataGrid - silverlight-4.0

I need a datagrid control like below.
I want to implement cell merge like functionality in a datagrid in silverlight. I have some rows which display a single value and some rows return all the values for all columns.So How to implement something like colspan for a particular row in datagrid ?
Like this
Please see the link
http://social.msdn.microsoft.com/Forums/en-US/silverlightcontrols/thread/79a7b371-738a-43e5-a3e3-7a26c946aa46

Related

Display specific column horizontal based on specific row in datagridview vb.net

Am looking for a solution to rotate the information that comes from SqlQuery as columns instead of rows using datagridview in vb.net
Eg:-this the table i want to transform from
Below what i want to display

Auto generate controls with data from datagridview

I have data copies from datagridview1 to datagridview2 the data in datagridview2 I'm trying to figure out how to take specific columns and copy there contents over to another panel where that data will be put into labels, textboxs, comboboxes. I first did it with another datagrid but its far to crowded to hold all the controls along with the data. Below is and example picture of what I'm trying to recreate from a webpage we used to use but on a winform they now want to use, this shows 1 product however if datagridview2 has multiple entries then this would show multiple lines..etc
I have no idea how to go about this or if its even doable.
I'm thinking maybe the form generates a table layout view control with all the columns, adds rows depending on amount of rows from datagridview2 and generates the controls needed in each row for each cell from datagridview2. I may be entirely wrong there, but I'm reaching the end of my knowledge on doing something like this, so here I am to be schooled =)

What are different ways in VB Dot Net to populate DataGridView Grid using SQL Query?

I want to populate a DataGridView Grid in my Form with Data from SQL Query or from some Table form Database. I want to know various possible ways to populate the DataGridView Grid.
Thanks in advance.
There are basically 3 ways to display data in a DataGridView
Create the rows manually in a loop: it's very inefficient if you have a lot of data
Use the DataGridView's virtual mode: the DGV only creates as many rows as can be displayed, and
dynamically changes their contents when the user scrolls. You need
to handle the CellValueNeeded event to provide the required data to
the DGV
Use databinding: that's by far the easiest way. You just fill a
DataTable with the data from the database using a DbDataAdapter, and
you assign this DataTable to the DGV's DataSource property. The DGV
can automatically create the columns (AutoGenerateColumns = true),
or you can create them manually (you must set the DataPropertyName
of the column to the name of the field you want to display). In
databound mode, the DGV works like in virtual mode except that it
takes care of fetching the data from the datasource, so you don't
have anything to do. It's very efficient even for a large number of
rows
Link.

Display Hyperlink field on rows based on value from the database

How do I dynamically display the 'Edit' on the hyperlink field based on the values on the rows, generated from the database.
N/B.: the gridview automatically generates rows.
Do you mean you want a DataGridViewLinkColumn in the grid with Edit displayed if appropriate? Like this:
In which case, make the whole column a LinkColumn and whether or not it's clickable will be taken care of internally by the grid. Columns which don't display Edit will not be clickable.
If you don't mean this then please provide more detail.

binding textboxes to a table

I have two tables that are related to each other in a 1-1 relationship (each row in the main table has exactly one corresponding row in the second table).
I also have a winform in which I'd like to show the main table in a datagridview, and for each row selected in the grid to show the fields of the corresponding row of the second table in various textboxes below the grid.
I know how to bind a datagridview to a datatable. But I'm not sure about binding several textboxes to a single row in the related datatable. I don't know what is the best way to implement it.
I'm writing in VB.Net (but can read some code in C#), using VS2008.
Any help, hints or ideas will be welcomed. Thanks.
Best way to do it is that instead of using two tables, use a join and get result in a single table, bind that table to gridview, and hide columns which you don't want to display to user.
And then use cell click event of gridview and then get the index of selected row and then use
txtBoxName.Text = GridViewName["col_name",e.RowIndex].Value.ToString();