Opening a Grid via Golden Arrow in a Grid
Hello everybody,
I am trying to get a rather complex request solved using a GridConfigurator:
Currently I got a GridConfigurator showing the results of an SQL Query. So far no issues. But now I want to have a golden arrow to open up a new Grid with the results of another Query with the ItemCode of the selected row (aka the row of the golden arrow clicked). But I am not able to transfer the parameter to the new grid, since the OpenGrid command only accepts one parameter (the id of the second grid).
Is there some example I can have a look on?#
Best Regards
Dennis
-
Hello Dennis,
I know only one option, but not with the grid generator. You can also create and show a grid with a function button rule. On the function button code you create a form with a grid. The grid gets a column with "golden arrow".
In this code example oGrid4 is the main grid with a column "Herstellartikel", which has a link to item master data. Now catch the linkpressed event when user clicks on the link but redirect instead to a new form with its own grid. The new form and grid is in the code the function Grid4_LinkTo_Details(...)
// create Link on Name column of grido_f1_gc1 = ((SwissAddonFramework.UI.Components.TextEditGridColumn) oGrid4.Columns["Herstellartikel"].SpecificGridColumn);o_f1_gc1.LinkObjectType = "2"; // this is just a dummy value!SwissAddonFramework.UI.EventHandling.ItemEvents.LinkPressedEventHandler evGrid4 = null;evGrid4 = delegate(SwissAddonFramework.UI.EventHandling.ItemEvents.LinkPressed o_f1_eventVal){//deactivate SAP link too_f1_eventVal.ExecuteSAPAction = false;// create form with grid --> production order Details of seletced itemGrid4_LinkTo_Details(oGrid4.GetValue("Herstellartikel", o_f1_eventVal.Row), oGrid4.GetValue("Bezeichnung", o_f1_eventVal.Row), oTxtEdit5.Value.Replace(",", "."), oTxtEdit18.Value, oTxtEdit19.Value);};// add event to objecto_f1_gc1.AddHandler_LinkPressed(SwissAddonFramework.UI.Components.ModeComponent.FormModes.ALL, evGrid4);I hope it helps!
0
Please sign in to leave a comment.
Comments
1 comment