V4 V5

Applying the key

Call this once at application startup, before creating any control.

using unvell.ReoGrid.Core.License;

ReoGridLicense.SetLicense("eyJsaWNlbnNlZSI6...");

If the key is malformed, the Base64 is corrupt, or the signature does not match, an ArgumentException is thrown. The signature is always verified before the contents are trusted — the order is fixed, so keys cannot be forged.

Rather than embedding the key in source code, we recommend reading it from a configuration file or an environment variable.

var key = Environment.GetEnvironmentVariable("REOGRID_LICENSE");
if (!string.IsNullOrEmpty(key))
	ReoGridLicense.SetLicense(key);

One key covers everything

Version-independentThe key is not matched against the assembly version or build date. A key issued for V4 works as-is with V5 — no reissue needed
Platform-independentThe key carries no platform information. A single key covers WinForms, WPF, Avalonia and headless

Keeps working after your updates expire

ReoGrid One is a perpetual license at initial purchase, plus an optional annual renewal (the same model as DevExpress and Telerik).

Even if you skip the annual renewal, the binaries you already have keep working with no time limit. There is no kill switch — no mechanism that stops the product on a deadline. The updates expiry can be read as LicenseInfo.UpdatesUntil, but it is not used in license validation. The only thing that changes when your updates expire is whether you can obtain new builds, and that is controlled on the distribution side — the portal and NuGet.

An application you have already shipped will never stop working because the updates period ended.

Behavior without a key

Without a valid key — none applied, expired, or bound to a different assembly — every file I/O call is refused. The on-screen grid remains available read-only.

WorksRestricted
Display, scrolling, selectionAll XLSX / CSV / PDF / reogrid-json reads and writes throw ReoGridLicenseException
Formula recalculation and the model API (SetText and friends)Cell editing is disabled in all three controls (read-only)
A watermark appears in on-screen and print rendering

I/O throws because of headless use: a service generating files on a server has nobody to show a watermark to, so it fails loudly rather than emitting output. An application with a UI can convey the problem through the watermark, so the grid itself stays usable read-only.

The same decision applies inside your own application. When a trial key expires, the application built with it stops reading and writing files and stops accepting edits.

Checking the status

if (!ReoGridLicense.IsLicensed)
{
	// not applied, an invalid key, or an expired trial
}

var info = ReoGridLicense.Current;
if (info != null)
{
	Console.WriteLine(info.Licensee);      // who the license was issued to
	Console.WriteLine(info.Tier);          // Trial / Production
	Console.WriteLine(info.ExpiresAt);     // trial expiry (null on a full license - no expiry)
	Console.WriteLine(info.UpdatesUntil);  // when the update entitlement ends (not used to validate)
}

Only three things factor into IsLicensed: the signature, ExpiresAt (the trial expiry) and AllowedAssembly (when the key is bound to an assembly).

Main members of LicenseInfo

MemberMeaning
Licensee / EmailThe licensee
TierTrial or Production
IssuedAtIssue date
ExpiresAtTrial expiry only. Omitted in production keys, meaning no expiry
UpdatesUntilUpdates expiry. Not used in validation
AllowedAssemblyBinding to a specific assembly (when set)
IsExpired / IsValidExpiry checks

The license cannot be removed at runtime

There is no way to revoke a license once applied while the application is running. An internal API exists for testing, but it is not public.

Was this article helpful?