API/CodeSamples/ShowModifyButton.md
... ...
@@ -0,0 +1,47 @@
1
+#ShowModifyButton
2
+
3
+Gets or sets the value indicating whether the "Modify" button should be shown in the report viewer. The button is represented by a pencil icon.
4
+
5
+**Deprecated:** This setting is obsolete. The report list page is completely customizable including the buttons on the toolbar where the modify button is.
6
+
7
+##Global.asax (C♯)
8
+
9
+```csharp
10
+//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
11
+public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
12
+{
13
+ // Configure settings
14
+ // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
15
+ public static void InitializeReporting() {
16
+ //Check to see if we've already initialized.
17
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
18
+ return;
19
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
20
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
21
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
22
+ AdHocSettings.ShowModifyButton = true; //The relevant setting
23
+ HttpContext.Current.Session["ReportingInitialized"] = true;
24
+ }
25
+}
26
+```
27
+
28
+Global.asax (VB.NET)
29
+
30
+```visualbasic
31
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
32
+Public Class CustomAdHocConfig
33
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
34
+
35
+ Shared Sub InitializeReporting()
36
+ 'Check to see if we've already initialized
37
+ If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
38
+ Return
39
+ 'Initialize System
40
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
41
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
42
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
43
+ AdHocSettings.ShowModifyButton = True 'The relevant setting
44
+ HttpContext.Current.Session("ReportingInitialized") = True
45
+ End Sub
46
+End Class
47
+```
... ...
\ No newline at end of file