Skip to content

Commit 859caa2

Browse files
Tsvetomir-Hrdimodi
andauthored
docs(Scheduler): add refresh method documentation (#2628)
* docs(Scheduler): add refresh method documentation * chore: apply suggestions * Update components/scheduler/overview.md --------- Co-authored-by: Dimo Dimov <[email protected]>
1 parent c037f6c commit 859caa2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

components/scheduler/overview.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,37 @@ The following table lists Scheduler parameters, which are not discussed elsewher
133133
| `Height` | `string` | A `height` style in [any supported unit]({%slug common-features/dimensions%}). |
134134
| `Width` | `string` | A `width` style in [any supported unit]({%slug common-features/dimensions%}). |
135135

136+
## Scheduler Reference and Methods
137+
138+
To execute Scheduler methods, obtain reference to the component instance with `@ref`.
139+
140+
| Method | Description |
141+
|---------|-------------|
142+
| `Rebind` | Use to refresh the component data. |
143+
| `Refresh` | Use to programmatically re-render the Scheduler. |
144+
145+
<div class="skip-repl"></div>
146+
147+
````CSHTML
148+
<TelerikButton OnClick="@RefreshScheduler">Refresh Scheduler</TelerikButton>
149+
<TelerikButton OnClick="@RefreshScheduler">Rebind Scheduler</TelerikButton>
150+
151+
<TelerikScheduler @ref="SchedulerRef" />
152+
153+
@code {
154+
private TekerikScheduler<Appointment>? SchedulerRef { get; set; }
155+
156+
private void RefreshScheduler()
157+
{
158+
SchedulerRef?.Refresh();
159+
}
160+
161+
private void RebindScheduler()
162+
{
163+
SchedulerRef?.Rebind();
164+
}
165+
}
166+
````
136167

137168
## Next Steps
138169

0 commit comments

Comments
 (0)