Matrix mit Query erstellen
Manuel Kübler
Wie kann ich eine Matrix mit Query erstellen? Und zwar habe ich eine benutzerdefinierte Tabelle in der Projekte und der zugehörige Geschäftspartner steht. Nun möchte ich eine Matrix erstellen, mit der ich die Projekte erfassen kann.Paolo Manfrin
Hello Manuel, I would suggest you to use a Grid instead of Matrix as it provides the method ExecuteQuery to fill the Grid in one step. Its usage is similar to the Matrix.As an example:
SwissAddonFramework.UI.Components.Grid zipGrid = SwissAddonFramework.UI.Components.Grid.CreateNew("zipGrid");
string query = @"SELECT [U_Country] AS 'Country', [U_Zip] AS 'Zip', [U_State] AS 'State', [U_StateName] AS 'State Name', [U_City] AS 'City'
FROM [dbo].[@MY_TABLE]";
zipGrid.ExecuteQuery(query);
// and you can retrieve the data from it with...
int selectedRow = 0;
string country = zipGrid.GetValue("Country", selectedRow);
string state = zipGrid.GetValue("State", selectedRow);
Manuel Marhold
Hi,I think this is not completely correct.
You are not able to use the formatdefinitions of decimalplaces in a grid. If you need this, you have to create userdatasources and bind them to the matrix and fill them.
Manuel Kübler
Also folgende Werte sollen in der Matrix eingegeben werden.Geschäftspartner-Code
Projekt
Geschäftspartner-Code am besten über Choose From List
Manuel Marhold
Hi Manuel,da würde ich, wie Paolo schon erwähnt hat, ein Grid nehmen.
0
Please sign in to leave a comment.
Comments
0 comments