DevExtreme Vue - Guid Methods
This section describes methods that control a Guid instance.
ctor()
Creates a new Guid instance that contains a generated GUID.
jQuery
var guid = new DevExpress.data.Guid();
Angular
import Guid from "devextreme/core/guid"; // ... export class AppComponent { constructor() { let guid = new Guid(); } }
ctor(value)
Creates a new Guid instance that contains the specified GUID.
A string representation of the GUID.
Hyphens in the GUID are optional:
jQuery
var guid = new DevExpress.data.Guid("40810dcc-e08b-10a2-8227-c67c8933c31a"); // or var guid = new DevExpress.data.Guid("40810dcce08b10a28227c67c8933c31a");
Angular
import Guid from "devextreme/core/guid"; // ... export class AppComponent { constructor() { let guid = new Guid("40810dcc-e08b-10a2-8227-c67c8933c31a"); // or let guid = new Guid("40810dcce08b10a28227c67c8933c31a"); } }
toString()
Gets the GUID. Works identically to the valueOf() method.
The GUID.
The returned GUID is always hyphened even if the Guid was created with a non-hyphened version:
jQuery
var guid = new DevExpress.data.Guid("40810dcce08b10a28227c67c8933c31a"); console.log(guid.toString()); // logs 40810dcc-e08b-10a2-8227-c67c8933c31a
Angular
import Guid from "devextreme/core/guid"; // ... export class AppComponent { constructor() { let guid = new Guid("40810dcce08b10a28227c67c8933c31a"); console.log(guid.toString()); // logs 40810dcc-e08b-10a2-8227-c67c8933c31a } }
valueOf()
Gets the GUID. Works identically to the toString() method.
The GUID.
The returned GUID is always hyphened even if the Guid was created with a non-hyphened version:
jQuery
var guid = new DevExpress.data.Guid("40810dcce08b10a28227c67c8933c31a"); console.log(guid.valueOf()); // logs 40810dcc-e08b-10a2-8227-c67c8933c31a
Angular
import Guid from "devextreme/core/guid"; // ... export class AppComponent { constructor() { let guid = new Guid("40810dcce08b10a28227c67c8933c31a"); console.log(guid.valueOf()); // logs 40810dcc-e08b-10a2-8227-c67c8933c31a } }
If you have technical questions, please create a support ticket in the DevExpress Support Center.