LinkedButton im Grid

Manuel Marhold

Hi.

wenn ich mich recht entsinne, dann kann man mit eurem framework einen LinkedButton-Spalte im Grid hinzufügen (dies macht ihr zum mindest in eurem Time-Modul.

Wie geht das?

Manuel Marhold

Hi.


nix???

Manuel Marhold

Hi

found it

oEditTextColumn.Linked...

unknown

Hello Manuel,

I am sure you have solved that issue by now. However I would like to point out how to create a link and still have full control over it.
It allows you thus to press on a link in the grid and then redirect the event for your own purpose. eg: opening own form.


//
SwissAddonFramework.UI.Components.Grid o_f1_g1 = SwissAddonFramework.UI.Components.Grid.CreateNew("grd_0001");

/*populating&loading grid*/

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// declare grid column necessary for link creation
SwissAddonFramework.UI.Components.TextEditGridColumn o_f1_gc1 = null;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// create Link on Name column of grid (bound to UDT)
o_f1_gc1 = ((SwissAddonFramework.UI.Components.TextEditGridColumn) o_f1_g1.Columns["Name"].SpecificGridColumn);
o_f1_gc1.LinkObjectType = "2"; // this is just a dummy value!
o_f1_gc1.AddHandler_LinkPressed(SwissAddonFramework.UI.Components.ModeComponent.FormModes.ALL , new SwissAddonFramework.UI.EventHandling.ItemEvents.LinkPressedEventHandler(delegate(SwissAddonFramework.UI.EventHandling.ItemEvents.LinkPressed o_f1_eventVal)
{
try
{
o_f1_eventVal.ExecuteSAPAction = false; //makes sure that SAP does not do anything with this link!!!
string v_Code = o_f1_g1.GetValue("Code" ,o_f1_eventVal.Row); //
SwissAddonFramework.UI.Dialogs.MessageBox.Show("Now you can do whatever you like with your own link to: " + v_Code , "OK");
}
catch(System.Exception o_ex)
{
SwissAddonFramework.UI.Dialogs.MessageBox.Show("Customizer NM Exception Error:n" + o_ex.Message , "OK");
}
}));


Best Regards.
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post