aspnetmvc-devexpress-dot-web-dot-mvc-dot-settingsbase.md
Specifies the unique identifier name for the extension.
Namespace : DevExpress.Web.Mvc
Assembly : DevExpress.Web.Mvc5.v25.2.dll
NuGet Package : DevExpress.Web.Mvc5
public string Name { get; set; }
Public Property Name As String
| Type | Description |
|---|---|
| String |
The extension name.
|
You can access this nested property as listed below:
| Object Type | Path to Name |
|---|---|
| MVCxFormLayoutItem |
.NestedExtensionSettings .Name
|
The extension name defined by the Name property can be used to access the extension client object on the client side.
var tbValue;
function preserveTextBoxValue(){
tbValue = textBox1.GetText();
}
@Html.DevExpress().TextBox(
settings => {
settings.Name = "textBox1";
settings.Text = "some text";
}
).GetHtml()
If the Name property contains special characters, for instance, the dot (.), you cannot access a client object by this name. Call the GetByName(name) method to retrieve the client-side object instead.
@Html.DevExpress().TextBox(settings => {
settings.Name = "SomeType.SomeProp";
}).GetHtml()
var txt = ASPxClientControl.GetControlCollection().GetByName("SomeType.SomeProp");
txt.SetText("Some Text");
For more information, see the Client-Side API help topic.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Name property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
asp-net-mvc-grid-export-multiple-gridviews-into-a-document/CS/Controllers/HomeController.cs#L27
GridViewSettings categoriesGridSettings = new GridViewSettings();
categoriesGridSettings.Name = "gvCategories";
categoriesGridSettings.KeyFieldName = "CategoryID";
SchedulerSettings settings = new SchedulerSettings();
settings.Name = "scheduler";
settings.CallbackRouteValues = new { Controller = "Home", Action = "SchedulerPartial" };
asp-net-mvc-grid-export-colored-grid-in-wysiwyg-mode/CS/Controllers/HomeController.cs#L44
settings.Name = "gvProducts";
settings.CallbackRouteValues = new { Controller = "Home", Action = "GridViewPartialProducts" };
SpellCheckerSettings settings = new SpellCheckerSettings();
settings.Name = "SpellChecker";
settings.CallbackRouteValues = new { Action = "IndexPartial", Controller = "Home" };
SchedulerSettings settings = new SchedulerSettings();
settings.Name = "scheduler";
settings.CallbackRouteValues = new { Controller = "Home", Action = "SchedulerPartial" };
asp-net-mvc-grid-export-multiple-gridviews-into-a-document/VB/Controllers/HomeController.vb#L32
Dim categoriesGridSettings As New GridViewSettings()
categoriesGridSettings.Name = "gvCategories"
categoriesGridSettings.KeyFieldName = "CategoryID"
Dim settings As New SchedulerSettings()
settings.Name = "scheduler"
settings.CallbackRouteValues = New With {Key .Controller = "Home", Key .Action = "SchedulerPartial"}
asp-net-mvc-grid-export-colored-grid-in-wysiwyg-mode/VB/Controllers/HomeController.vb#L51
settings.Name = "gvProducts"
settings.CallbackRouteValues = New With {Key .Controller = "Home", Key .Action = "GridViewPartialProducts"}
Dim settings As New SpellCheckerSettings()
settings.Name = "SpellChecker"
settings.CallbackRouteValues = New With {Key .Action = "IndexPartial", Key .Controller = "Home"}
Dim settings As New SchedulerSettings()
settings.Name = "scheduler"
settings.CallbackRouteValues = New With {Key .Controller = "Home", Key .Action = "SchedulerPartial"}
See Also