Telerik Forums
UI for ASP.NET MVC Forum
7 answers
786 views

Hi,

May I know how to retrieve Kendo Scheduler current date range in C# code?

I need to date range so I can populate the date in another detail table.

Thank you.

Neli
Telerik team
 answered on 06 Oct 2020
4 answers
436 views

Hi,

is it possible to show Word RTF Text inside this editor (bcz when I do I get all the RTF Stuff printed out and not processed) ?

And if not, is there any way to display RTF Text inside one of your components ? (I tried the new component you added which converts html to rtf, but its not always converting my stream text correctly - I guess I am missusing that component by just trying to convert text, but I tried my luck :)

 

Regards

Neli
Telerik team
 answered on 06 Oct 2020
15 answers
3.8K+ views

Hi

 Is it possible to implement paging in a way that the Datasource contains only the Data to display?

 Lets assume i have 1 Million records, but for performance reasons i just want to load 10 at a time from sql server.

 How can I tell the Grid that he's on Page 2 of X and have a total record of 1 Million (in AJAX mode)?

 

DECLARE @PageNumber AS INT, @RowspPage AS INT
 SET @PageNumber = 2
 SET @RowspPage = 10 
SELECT ID_EXAMPLE, NM_EXAMPLE, DT_CREATE
 FROM TB_EXAMPLE
 ORDER BY ID_EXAMPLE
 OFFSET ((@PageNumber - 1) * @RowspPage) ROWS
 FETCH NEXT @RowspPage ROWS ONLY;

 

Thanks and best Regards

Giuseppe

 

Brandon
Top achievements
Rank 1
 answered on 05 Oct 2020
8 answers
344 views

I want auto open on focus for all of dropdownlists in my page.

Here is a sample for Jquery Version:

https://www.telerik.com/forums/how-to-open-dropdownlist-on-focus

I have modified this code for MVC , But there is a problem,
MVC version of dropdownList do not send event as function parameter (e) and I do not know how to do preventDefault.
any Help or suggestion?

Martin
Telerik team
 answered on 05 Oct 2020
3 answers
733 views
For adherence to compliance standards, I would like to provide the ability to focus the grid pager elements via the keyboard.

Given the following grid:

@(Html.Kendo().Grid<WebPortal.WebModels.Search.MemberReference>()
    .Name("MemberGrid")
    .HtmlAttributes(new { style = "height: 220px;" })
    .Columns(columns =>
    {
        columns.Bound(m => m.FullName).Title("Member Name").Width(230)
            .ClientTemplate("<a href='javascript:' onclick=\"selectMember('#: ProperNameWithCityState#', '#: City#', '#: State#', '#: SystemId#', '" + Model.InputSystemId + "', '" + Model.InputFullName + "')\" >#= FullName#</a>");
        columns.Bound(m => m.HccId).Title("ID").Width(230);
        columns.Bound(m => m.BirthDate).Title("Birth Date").Width(80);
        columns.Bound(m => m.City).Title("City");
        columns.Bound(m => m.State).Title("State").Width(60);
    })
    .Pageable(p => p.Messages(m => m.Empty(@noSearchResultsMessage)))
    .Reorderable(reordable => reordable.Columns(true))
    .Resizable(resize => resize.Columns(true))
    .Sortable()
    .Scrollable()
    .Events(events => events.DataBound("onGridDataBound"))
    .AutoBind(false)    // Prevent initial data load
    .DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(false)
        .Sort(s => s.Add("FullName"))
        .PageSize(5)
        .Read(read => read.Action("FindMembers", "Search")
            .Data("getMemberSearchInput")
        )
        .Events(events => events.Error("onKendoDataSourceError").Change("onGridDataSourceChange"))
    )
)


I am attempting to do this on the grid data bound event:

function onGridDataBound(e) {
    // set tab index on pager elements so they can be focused via keyboard
    $("#MemberGrid > div.k-pager-wrap.k-grid-pager.k-widget").find("a").not(".k-state-disabled").attr("tabindex", "0");
}

While I can verify that the jQuery selection is correct, the tab index does not seem to get persisted in the rendered code. The rendered pager elements still have a tab index of "-1".

Is there another event I should be using?
Alex Hajigeorgieva
Telerik team
 answered on 05 Oct 2020
5 answers
121 views

Hello,

I defined my class field “TeamCode” as string type and only accept 4 characters. It function well in regular Kendo TextBox. But it does not work on Kendo grid cell when do editing. Validation not happen when box lose cursor. I knew clicking submit/Add/Update button validation will go through, but I still hope validation occurring on lose cursor. Is anyone have an idea to do so? (Below are partial of code)

 ...
            [StringLength(4, MinimumLength = 4, ErrorMessage = "{0} must be 4 characters.")]
            [DisplayName("Team Code")]
            public string TeamCode { get; set; }
 …

Thanks.

 

 

Nikolay
Telerik team
 answered on 05 Oct 2020
3 answers
244 views

How to configure the kendo MVC pivot grid so that it doesn't repeat dimension labels?

I am following this https://demos.telerik.com/aspnet-mvc/pivotgrid?_ga=2.172892198.404272527.1601250445-647083974.1600781368 and built a kendo grid (see the attached screenshot A) but I would like to get rid of the dimension labels so that it doesn't take too much space(See the attached screenshot B). How should I configure it?

 

 

 

 

Eyup
Telerik team
 answered on 05 Oct 2020
1 answer
601 views
How did you add the required option to a TextBox?
  i am trying to do this but it doesn't work
@ (Html.Kendo (). TextBox ()
                       .Name ("txtCodSRI")
                       .Placeholder ("001")
                       .Readonly (true)
                       .Value (@ country.CodSRI)
                       .HtmlAttributes (new {@required = "true"})
                       .HtmlAttributes (new {@class = "form-control"})
                       )
Anton Mironov
Telerik team
 answered on 02 Oct 2020
1 answer
611 views

Hi,

I'd like to add a grid in one of my steps but having a hard time figuring this out and no good examples. I'd like to load the content by calling my controller using the method ".LoadContentFrom("ActionName", "ControlerName");" which you have the ability to with many other controls but for now I think using a TemplateId will work?

 

Thanks,

Martin
Telerik team
 answered on 01 Oct 2020
6 answers
98 views

This might not be the way to go but after a buttonclick i want to update the content of a grid. I do this by making an ajax request and setting a new datasource to the grid with the response. Only problem is after i have done that the search field no longer work

See dojo for example

 

https://dojo.telerik.com/uvAZuvEW/3

Nikolay
Telerik team
 answered on 01 Oct 2020
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?