Skip to content

Commit ce5b996

Browse files
authored
Merge pull request #2795 from syncfusion-content/871738-Asp-UG1
871738: UG documentation changed moved to hotfix for TextArea component
2 parents db7a97b + c1cf757 commit ce5b996

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1802
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Blur()
2+
{
3+
return View();
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
@Html.EJS().TextArea("default").Blur("BlurHandler").Render()
4+
5+
<script>
6+
7+
function BlurHandler(args) {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
<ejs-textarea id="default" blur="blurHandler"></ejs-textarea>
4+
5+
<script>
6+
7+
function blurHandler(args) {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Change()
2+
{
3+
return View();
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
@Html.EJS().TextArea("default").Change("ChangeHandler").Render()
4+
5+
<script>
6+
7+
function ChangeHandler(args) {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
<ejs-textarea id="default" change="changeHandler"></ejs-textarea>
4+
5+
<script>
6+
7+
function changeHandler() {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Created()
2+
{
3+
return View();
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
@Html.EJS().TextArea("default").Created("Created").Render()
4+
5+
<script>
6+
7+
function Created() {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
<ejs-textarea id="default" created="created"></ejs-textarea>
4+
5+
<script>
6+
7+
function created() {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Destroyed()
2+
{
3+
return View();
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
@Html.EJS().TextArea("default").Destroyed("Destroyed").Render()
4+
5+
<script>
6+
7+
function Destroyed() {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
<ejs-textarea id="default" destroyed="destroyed"></ejs-textarea>
4+
5+
<script>
6+
7+
function destroyed() {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Focus()
2+
{
3+
return View();
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
@Html.EJS().TextArea("default").Focus("FocusHandler").Render()
4+
5+
<script>
6+
7+
function FocusHandler(args) {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
<ejs-textarea id="default" focus="focusHandler"></ejs-textarea>
4+
5+
<script>
6+
7+
function focusHandler() {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Input()
2+
{
3+
return View();
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
@Html.EJS().TextArea("default").Input("InputHandler").Render()
4+
5+
<script>
6+
7+
function InputHandler(args) {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Inputs
2+
3+
<ejs-textarea id="default" input="inputHandler"></ejs-textarea>
4+
5+
<script>
6+
7+
function inputHandler() {
8+
// Here, you can customize your code.
9+
}
10+
11+
</script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Label()
2+
{
3+
return View();
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="control-section">
2+
<div class="control_wrapper textarea-control-section">
3+
@Html.EJS().TextArea("default").Placeholder("Enter your comments").FloatLabelType(FloatLabelType.Auto).Render()
4+
</div>
5+
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="control-section">
2+
<div class="control_wrapper TextArea-control-section">
3+
<ejs-textarea id="default" placeholder="Enter your comments" floatLabelType="Auto"></ejs-textarea>
4+
</div>
5+
</div>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Localization1()
2+
{
3+
return View();
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="control-section">
2+
<div class="control_wrapper textarea-control-section">
3+
@Html.EJS().TextArea("default").Placeholder("veuillez inscrire vos commentaires").Locale("fr-BE").FloatLabelType(FloatLabelType.Auto).Render()
4+
</div>
5+
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="control-section">
2+
<div class="control_wrapper TextArea-control-section">
3+
<ejs-textarea id="default" placeholder="veuillez inscrire vos commentaires" locale="fr-BE" floatLabelType="Auto"></ejs-textarea>
4+
</div>
5+
</div>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult Localization2()
2+
{
3+
return View();
4+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
<div class="control-section">
3+
<div class="control_wrapper textarea-control-section">
4+
@Html.EJS().TextArea("default").Locale("de-DE").FloatLabelType(FloatLabelType.Auto).Render()
5+
</div>
6+
</div>
7+
8+
<script>
9+
var L10n = ej.base.L10n;
10+
L10n.load({
11+
'de-DE': {
12+
'textarea': {
13+
placeholder: 'Geben Sie Ihre Kommentare ein'
14+
}
15+
}
16+
});
17+
loadCultureFiles('de-DE');
18+
</script>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div class="control-section">
2+
<div class="control_wrapper TextArea-control-section">
3+
<ejs-textarea id="default" locale="de-DE" floatLabelType="Auto"></ejs-textarea>
4+
</div>
5+
</div>
6+
7+
<script>
8+
var L10n = ej.base.L10n;
9+
L10n.load({
10+
'de-DE': {
11+
'textarea': {
12+
placeholder: 'Geben Sie Ihre Kommentare ein'
13+
}
14+
}
15+
});
16+
loadCultureFiles('de-DE');
17+
</script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult FormValidator()
2+
{
3+
return View();
4+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<div class="control-section">
2+
<div class="control_wrapper" id="control_wrapper">
3+
<h3 class="form-title">Feedback</h3>
4+
<div class="control_wrapper textarea-form">
5+
<form id="form1" method="post">
6+
<div class="form-group">
7+
<div class="e-float-input">
8+
<label>Email</label>
9+
<input type="email" id="email" name="email" data-email-message="Please enter valid email address."
10+
data-required-message="Required field" required data-msg-containerid="emailError"/>
11+
<span class="e-float-line"></span>
12+
</div>
13+
<div id="emailError"></div>
14+
</div>
15+
<div class="form-group">
16+
<div>
17+
<label>Comments</label>
18+
<br/>
19+
<div class="control_wrapper textarea-control-section">
20+
@Html.EJS().TextArea("default").Placeholder("Enter your comments").FloatLabelType(FloatLabelType.Auto).HtmlAttributes(new { @name = "comments", @required = "", @data-msg-containerid="commentError" }).Render()
21+
</div>
22+
</div>
23+
<div id="commentError"></div>
24+
</div>
25+
<div class="row">
26+
<div style="float: left">
27+
<button class="btn" type="submit">Submit</button>
28+
</div>
29+
<div style="float: left;">
30+
<button class="btn" type="reset">Reset</button>
31+
</div>
32+
</div>
33+
</form>
34+
</div>
35+
<br />
36+
<br />
37+
</div>
38+
</div>
39+
40+
<script>
41+
// sets required property in the FormValidator rules collection
42+
var options = {
43+
rules: {
44+
'email': { required: [true, '* Please enter valid email'] },
45+
comments: { required: [true, '* Please enter your comments'] }
46+
},
47+
};
48+
// defines FormValidator to validate the TextArea
49+
var formObject = new ej.inputs.FormValidator('#form1', options);
50+
51+
// places error label outside the TextArea using the customPlacement event of FormValidator
52+
53+
formObject.customPlacement = function (element, errorElement) {
54+
document.querySelector("#default").parentNode.appendChild(errorElement);
55+
};
56+
</script>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<div class="control-section">
2+
<div class="control_wrapper" id="control_wrapper">
3+
<h3 class="form-title">Feedback</h3>
4+
<div class="control_wrapper textarea-form">
5+
<form id="form1" method="post">
6+
<div class="form-group">
7+
<div class="e-float-input">
8+
<label>Email</label>
9+
<input type="email" id="email" name="email" data-email-message="Please enter valid email address."
10+
data-required-message="Required field" required data-msg-containerid="emailError"/>
11+
<span class="e-float-line"></span>
12+
</div>
13+
<div id="emailError"></div>
14+
</div>
15+
<div class="form-group">
16+
<div>
17+
<label>Comments</label>
18+
<br/>
19+
<div class="control_wrapper TextArea-control-section">
20+
<ejs-textarea id="default" name="comments" data-msg-containerid="commentError" placeholder='Enter your comments' floatLabelType='Auto' required=""></ejs-textarea>
21+
</div>
22+
</div>
23+
<div id="commentError"></div>
24+
</div>
25+
<div class="row">
26+
<div style="float: left">
27+
<button class="btn" type="submit">Submit</button>
28+
</div>
29+
<div style="float: left;">
30+
<button class="btn" type="reset">Reset</button>
31+
</div>
32+
</div>
33+
</form>
34+
</div>
35+
<br />
36+
<br />
37+
</div>
38+
</div>
39+
40+
<script>
41+
// sets required property in the FormValidator rules collection
42+
var options = {
43+
rules: {
44+
'email': { required: [true, '* Please enter valid email'] },
45+
comments: { required: [true, '* Please enter your comments'] }
46+
},
47+
};
48+
// defines FormValidator to validate the TextArea
49+
var formObject = new ej.inputs.FormValidator('#form1', options);
50+
51+
// places error label outside the TextArea using the customPlacement event of FormValidator
52+
53+
formObject.customPlacement = function (element, errorElement) {
54+
document.querySelector("#default").parentNode.appendChild(errorElement);
55+
};
56+
</script>

0 commit comments

Comments
 (0)