Skip to content

Commit 4ec27d7

Browse files
998096: Release notes
1 parent 9096b28 commit 4ec27d7

File tree

4 files changed

+235
-16
lines changed

4 files changed

+235
-16
lines changed

blazor/calendar/special-dates.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ Customize specific dates in a [Blazor Calendar](https://www.syncfusion.com/blazo
2929
public DateTime? CurrentDate { get; set; } = DateTime.Now;
3030
public void CustomDates(RenderDayCellEventArgs args)
3131
{
32-
var CurrentMonth = CurrentDate.Value.Month;
33-
if (args.Date.Month == CurrentMonth && (args.Date.Day == 7 || args.Date.Day == 14 || args.Date.Day == 24 || args.Date.Day == 29)) {
34-
args.CellData.ClassList += " personal-appointment";
35-
}
36-
if (args.Date.Month == CurrentMonth && (args.Date.Day == 3 || args.Date.Day == 11 || args.Date.Day == 17 || args.Date.Day == 22))
37-
{
38-
args.CellData.ClassList += " official-appointment";
32+
if (args.CurrentView == "Month") {
33+
var CurrentMonth = CurrentDate.Value.Month;
34+
if (args.Date.Month == CurrentMonth && (args.Date.Day == 7 || args.Date.Day == 14 || args.Date.Day == 24 || args.Date.Day == 29)) {
35+
args.CellData.ClassList += " personal-appointment";
36+
}
37+
if (args.Date.Month == CurrentMonth && (args.Date.Day == 3 || args.Date.Day == 11 || args.Date.Day == 17 || args.Date.Day == 22))
38+
{
39+
args.CellData.ClassList += " official-appointment";
40+
}
3941
}
4042
}
4143
public void OnChange(ChangedEventArgs<DateTime?> args)
@@ -89,4 +91,6 @@ Customize specific dates in a [Blazor Calendar](https://www.syncfusion.com/blazo
8991
</style>
9092
9193
```
92-
{% previewsample "https://blazorplayground.syncfusion.com/embed/hXVAMBLBLyofGefV?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor Calendar with special dates](./images/blazor_calendar_special_dates.png)" %}
94+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hXVAMBLBLyofGefV?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor Calendar with special dates](./images/blazor_calendar_special_dates.png)" %}
95+
96+
N> The `RenderDayCellEventArgs` includes a `CurrentView` property that identifies the active calendar view during rendering. Possible values are `Month`, `Year`, and `Decade`. Use this to apply view-specific logic and diagnostics within the `OnRenderDayCell` handler. This property is useful for customizing the rendering of day cells based on the calendar's current view.

blazor/datepicker/special-dates.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ You can customize specific dates in a DatePicker by using the [OnRenderDayCell](
2727
public DateTime? CurrentDate { get; set; } = DateTime.Now;
2828
public void CustomDates(RenderDayCellEventArgs args)
2929
{
30-
var CurrentMonth = CurrentDate.Value.Month;
31-
if (args.Date.Month == CurrentMonth && (args.Date.Day == 7 || args.Date.Day == 14 || args.Date.Day == 24 || args.Date.Day == 29)) {
32-
args.CellData.ClassList += " personal-appointment";
33-
}
34-
if (args.Date.Month == CurrentMonth && (args.Date.Day == 3 || args.Date.Day == 11 || args.Date.Day == 17 || args.Date.Day == 22))
35-
{
36-
args.CellData.ClassList += " official-appointment";
30+
if (args.CurrentView == "Month") {
31+
var CurrentMonth = CurrentDate.Value.Month;
32+
if (args.Date.Month == CurrentMonth && (args.Date.Day == 7 || args.Date.Day == 14 || args.Date.Day == 24 || args.Date.Day == 29)) {
33+
args.CellData.ClassList += " personal-appointment";
34+
}
35+
if (args.Date.Month == CurrentMonth && (args.Date.Day == 3 || args.Date.Day == 11 || args.Date.Day == 17 || args.Date.Day == 22))
36+
{
37+
args.CellData.ClassList += " official-appointment";
38+
}
3739
}
3840
}
3941
public void OnChange(ChangedEventArgs<DateTime?> args)
@@ -89,4 +91,6 @@ You can customize specific dates in a DatePicker by using the [OnRenderDayCell](
8991

9092

9193

92-
![Blazor DatePicker with special dates](./images/blazor_datepicker_special_dates.png)
94+
![Blazor DatePicker with special dates](./images/blazor_datepicker_special_dates.png)
95+
96+
N> The `RenderDayCellEventArgs` includes a `CurrentView` property that identifies the active calendar view during rendering. Possible values are `Month`, `Year`, and `Decade`. Use this to apply view-specific logic and diagnostics within the `OnRenderDayCell` handler. This property is useful for customizing the rendering of day cells based on the calendar's current view.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: post
3+
title: Disable Mouse Wheel Scroll in Blazor Numeric TextBox Component | Syncfusion
4+
description: Learn how to enable or disable mouse wheel scrolling in the Syncfusion Blazor Numeric TextBox component using the AllowMouseWheel property.
5+
platform: Blazor
6+
control: Numeric TextBox
7+
documentation: ug
8+
---
9+
10+
# Disable Mouse Wheel Scroll in Blazor Numeric TextBox Component
11+
12+
The Blazor Numeric TextBox component supports controlling mouse wheel scrolling via the `AllowMouseWheel` property. This lets you prevent accidental value changes when the input has focus and the user scrolls the mouse wheel.
13+
14+
## Enable/disable mouse wheel interaction
15+
16+
- Default: `AllowMouseWheel` is `true`, so the value increments/decrements based on the `Step` while scrolling the mouse wheel when the input is focused.
17+
- Disable: Set `AllowMouseWheel` to `false` to ignore mouse wheel scrolling. Other input methods (typing and spin buttons) continue to work.
18+
19+
```cshtml
20+
@using Syncfusion.Blazor.Inputs
21+
22+
<h4>Mouse wheel disabled</h4>
23+
<SfNumericTextBox TValue="double?" Value=10 Step=1 AllowMouseWheel="false" Placeholder="Enter a value"></SfNumericTextBox>
24+
25+
<h4>Mouse wheel enabled (default)</h4>
26+
<SfNumericTextBox TValue="double?" Value=10 Step=1 Placeholder="Enter a value"></SfNumericTextBox>
27+
```

blazor/query-builder/events.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
---
2+
layout: post
3+
title: Events in Blazor Query Builder Component | Syncfusion
4+
description: Learn about the available events in the Syncfusion Blazor Query Builder, including the new Destroyed event that fires on component disposal.
5+
platform: Blazor
6+
control: Query Builder
7+
---
8+
9+
# Events in Blazor Query Builder Component
10+
11+
This section lists key events available in the Blazor Query Builder and when they are triggered during user interactions and lifecycle changes.
12+
13+
## Created
14+
15+
The Created event is triggered once the component has been initialized and is ready.
16+
17+
```cshtml
18+
<SfQueryBuilder TValue="Order" DataSource="@Data">
19+
<QueryBuilderEvents TValue="Order" Created="OnCreated"></QueryBuilderEvents>
20+
</SfQueryBuilder>
21+
22+
@code {
23+
public void OnCreated() {
24+
// Here, you can customize your code.
25+
}
26+
}
27+
```
28+
29+
## RuleChanged
30+
31+
The RuleChanged event is triggered whenever a rule or group is added, removed, or modified.
32+
33+
```cshtml
34+
<SfQueryBuilder TValue="Order" DataSource="@Data">
35+
<QueryBuilderEvents TValue="Order" RuleChanged="OnRuleChanged"></QueryBuilderEvents>
36+
</SfQueryBuilder>
37+
38+
@code {
39+
public void OnRuleChanged(RuleChangeEventArgs args)
40+
{
41+
// Here, you can customize your code.
42+
}
43+
}
44+
```
45+
## Changed
46+
47+
```cshtml
48+
<SfQueryBuilder TValue="Order" DataSource="@Data">
49+
<QueryBuilderEvents TValue="Order" Changed="OnChanged"></QueryBuilderEvents>
50+
</SfQueryBuilder>
51+
52+
@code {
53+
private void OnChanged(ChangeEventArgs args)
54+
{
55+
// Here, you can customize your code.
56+
}
57+
}
58+
```
59+
60+
## Destroyed
61+
62+
The Destroyed event is triggered when the component is disposed. Use it to perform reliable cleanup, detach external resources, or finalize logging.
63+
64+
- Exposed via QueryBuilderEvents<TValue>.Destroyed
65+
- Raised during the Dispose lifecycle
66+
67+
```cshtml
68+
<SfQueryBuilder TValue="Order" DataSource="@Data">
69+
<QueryBuilderEvents TValue="Order" Destroyed="OnDestroyed"></QueryBuilderEvents>
70+
</SfQueryBuilder>
71+
72+
@code {
73+
public void OnDestroyed(object args)
74+
{
75+
// Here, you can customize your code.
76+
}
77+
}
78+
```
79+
80+
## OnValueChange
81+
82+
Raised before a condition (And/Or), field, operator, or value is changed. Use this to validate or react before committing a change.
83+
84+
```cshtml
85+
<SfQueryBuilder TValue="Order" DataSource="@Data">
86+
<QueryBuilderEvents TValue="Order" OnValueChange="OnValueChange"></QueryBuilderEvents>
87+
</SfQueryBuilder>
88+
89+
@code {
90+
private void OnValueChange(ChangeEventArgs args)
91+
{
92+
// Here, you can customize your code.
93+
}
94+
}
95+
```
96+
97+
## DataBound
98+
99+
Triggered after the data source is populated and bound to the Query Builder.
100+
101+
```cshtml
102+
<SfQueryBuilder TValue="Order" DataSource="@Data">
103+
<QueryBuilderEvents TValue="Order" DataBound="OnDataBound"></QueryBuilderEvents>
104+
</SfQueryBuilder>
105+
106+
@code {
107+
private void OnDataBound(object args)
108+
{
109+
// Here, you can customize your code.
110+
}
111+
}
112+
```
113+
114+
## OnActionFailure
115+
116+
Raised when a remote data fetch or action fails.
117+
118+
```cshtml
119+
<SfQueryBuilder TValue="Order" DataSource="@RemoteData">
120+
<QueryBuilderEvents TValue="Order" OnActionFailure="OnActionFailure"></QueryBuilderEvents>
121+
</SfQueryBuilder>
122+
123+
@code {
124+
private void OnActionFailure(Exception ex)
125+
{
126+
// Here, you can customize your code.
127+
}
128+
}
129+
```
130+
131+
## Drag-and-drop events
132+
133+
Enable drag-and-drop by setting AllowDragAndDrop="true" in SfQueryBuilder. The following events are available:
134+
135+
### RuleDragStarting
136+
137+
Invoked before a rule or group drag starts. You can cancel the drag by setting args.Cancel = true.
138+
139+
```cshtml
140+
<SfQueryBuilder TValue="Order" DataSource="@Data" AllowDragAndDrop="true">
141+
<QueryBuilderEvents TValue="Order" RuleDragStarting="OnRuleDragStarting"></QueryBuilderEvents>
142+
</SfQueryBuilder>
143+
144+
@code {
145+
private void OnRuleDragStarting(RuleDragStartingEventArgs args)
146+
{
147+
// Here, you can customize your code.
148+
}
149+
}
150+
```
151+
152+
### RuleDropping
153+
154+
Invoked before a rule or group is dropped on another. You can cancel the drop by setting args.Cancel = true.
155+
156+
```cshtml
157+
<SfQueryBuilder TValue="Order" DataSource="@Data" AllowDragAndDrop="true">
158+
<QueryBuilderEvents TValue="Order" RuleDropping="OnRuleDropping"></QueryBuilderEvents>
159+
</SfQueryBuilder>
160+
161+
@code {
162+
private void OnRuleDropping(RuleDroppingEventArgs args)
163+
{
164+
// Here, you can customize your code.
165+
}
166+
}
167+
```
168+
169+
### RuleDropped
170+
171+
Raised after a successful drop is completed.
172+
173+
```cshtml
174+
<SfQueryBuilder TValue="Order" DataSource="@Data" AllowDragAndDrop="true">
175+
<QueryBuilderEvents TValue="Order" RuleDropped="OnRuleDropped"></QueryBuilderEvents>
176+
</SfQueryBuilder>
177+
178+
@code {
179+
private void OnRuleDropped(RuleDroppedEventArgs args)
180+
{
181+
// Here, you can customize your code.
182+
}
183+
}
184+
```

0 commit comments

Comments
 (0)