Dashboard Hyperlinks

(Aaron Willett) #1

Has anyone found a way to make text into a hyperlink in a dashboard grid row?
Or maybe, when the row is selected, have a button click event open the path that’s in the column?

Webpage Popup
(Brandon Anderson) #2

You can use a URL view to view the value in the row. I haven’t tried making a hyperlink.

(Haso Keric) #3

If you know how to get the UltraGrid and the Row/Cell via csm.GetNativeControl then you can change its type:

e.Row.Cells["Value"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;

Then the grid will raise a CellLinkClicked event in your code. I don’t have a sample to paste at this time, but that would be the gist of it.

Remember Epicor runs on Infragistics - you can view or google Infragistics UltraGrid how to bla bla and you will find samples, you can add in a Customization Layer of Dashboard.

(Aaron Willett) #4

Thanks @hasokeric. That was deceptively simple!

(Joe) #5

@willetta I know this is an old thread, but I am trying to accomplish the same thing, except I am missing something.

Could you post a snippet of how you were able to get this to work?

(Aaron Willett) #6

Sure, here ya go:

    public class Script
       // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
       // Begin Wizard Added Module Level Variables **
       EpiUltraGrid grid1;
       // End Wizard Added Module Level Variables **

       // Add Custom Module Level Variables Here **

       public void InitializeCustomCode()
          // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
          // Begin Wizard Added Variable Initialization
          this.grid1 = (EpiUltraGrid)csm.GetNativeControlReference("e4989f9a-c2a5-4ff4-bd19-47e68fd02fa9");
          // End Wizard Added Variable Initialization

          // Begin Wizard Added Custom Method Calls

          // End Wizard Added Custom Method Calls

       public void DestroyCustomCode()
          // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
          // Begin Wizard Added Object Disposal
          this.grid1 = null;
          // End Wizard Added Object Disposal

          // Begin Custom Code Disposal

          // End Custom Code Disposal

       private void MainController_Load(object sender, EventArgs args)
          // Add Event Handler Code

          grid1.DisplayLayout.Bands[0].Columns["Calculated_Hyperlink"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;    

(Joe) #7

Thanks a bunch!

That was far simpler than I expected…

(tyler fenwick) #8

Did you create a tracker in the dashboard then reference your code in the script editor or was this code done to the .dll assembly after it was deployed?

(Aaron Willett) #9

Deployed the dashboard as an assembly, then opened it in developer mode and threw the customization in there.

(tyler fenwick) #10

@willetta Worked Great, Thanks.

(Haso Keric) #11

Just for the record - there are many more styles to chose from :slight_smile: http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.ColumnStyle.html