DataGridViewControl
danni
Denmark
Hi
I have a DialogForm with a DataGridViewControl on it. I set DataGridViewControl.Datasource to the band that contain the elements I want to show.
How do I show data from it? I cannot find any documentation on it.
The reason i have a grid is because I have a band with elements where i want to sho detailed information on one of the elements above the list of elements.
Below is a small idea of the report:
The fields: txtName, txtStartDate, txtEndDate, txtAdress, Country are fields from the dialog form - or should be.
1. So basicly I wnat to show data form a selected row in the grid.
2. Know how to show data in the DataGridViewControl
I have a DialogForm with a DataGridViewControl on it. I set DataGridViewControl.Datasource to the band that contain the elements I want to show.
How do I show data from it? I cannot find any documentation on it.
The reason i have a grid is because I have a band with elements where i want to sho detailed information on one of the elements above the list of elements.
Below is a small idea of the report:
----------------------------------------------------------------------------------
band with no data: [txtName] [txtStartDate] [tstEndDate]
[txtAdress] [Country]
Databand DS.Elements [DS.Elements.Name] [DS.Elements.Startdate] [DS.Elements.EndDate]
----------------------------------------------------------------------------------
The fields: txtName, txtStartDate, txtEndDate, txtAdress, Country are fields from the dialog form - or should be.
1. So basicly I wnat to show data form a selected row in the grid.
2. Know how to show data in the DataGridViewControl
Comments
You need to set the DataSource property, then set up columns. It can be done in the grid control's context menu, or in the Properties window (invoke the "Columns" property editor). To add all columns from datasource, press "Add all" button.
I've attached a simple report that demonstrates how to print rows selected in a datagridview. You can run it in the demo.exe. Pay attention to the following:
- OK button event handler (script)
- data band filter
I set the datasource and get the columns by "get all". Still there is no data in the grid.
If I just show the data in a band, data is shown fine. But data is not shown in the grid on the form.
Here is a fragment of my datasource:
When I loot at the field's column in the grid its
Elements.Structure.type
Elements.Structure.name.
Sholdnt it be
Planlist.Elements.Structure.type
Planlist.Elements.Structure.name
?
No matter what the grid dont show any data.
Grid cannot display data from business object source. Only TableDataSource is supported now.
Then I have few questions:
1. Do you have a plan for implementing the ObjectdataSource for grids? When would that eg. be?
2. Is ther antoher control where I can use objectdatasource and select 1 element? I do need a control that can show multible columns.
Thank you :-)
I downloaded version 1.3.51.0.
From that I managed to get rows in the grid but no data shown.
Do you know what could be the problem?
I use standard settings for the columns.
Here is a picture that shows the grid.
Could you send me a simple project that demonstrates the error? I've tried to use the Grid control in the "Business Objects" demo report, it works well.
If I use the BusinessObjects I get no data either.
There may be the problem if you display data from nested BO. You need to manually adjust the "DataColumn" property of each grid column (in the grid columns editor). Use full name of the data column, including its parent BO name, for example: replace "Products.Name" with "Categories BusinessObject.Products.Name".
I will set the columns manually.
Thank you :-)
Not all columns in the grid show data when using Businessobjects.
It seems only the first level of the object tree is shown in the grid.
From the structure below the cells will not get values for Street and Number. Because its in the second level of the object tree.
Isn't that a problem when it is possible to choose columns in nested objects?
It dosnt seem logic that it is possible to choose columns in nested objects when they cannot be displayed.
Some grids support nested objects. We use a grid from Telerik and DevExpress in my company.
Would it be possible to get that feature somehow?
Secondly: Does this functionality behave similar if I use a DataSet as datasource to the report insted?
Grid will work with DataSet, just like the standard winforms DataGridView control.