Telerik Forums
UI for ASP.NET MVC Forum
4 answers
253 views

Hello,

I'm using remote data binding. If I return Json(listNodes) everything works as expected, but if it is Json(listNodes.ToDataSourceResult(request, ModelState)), a "e.slice is not defined" javascript error is thrown.

 

It would be nice to have a DataSourceResult, so I can add errors to the modelstate and handle them in the .Error() method on the client. Or is there any other way to return an error to the TreeView if data fetching fails serverside?

Jan
Top achievements
Rank 1
 answered on 13 Dec 2017
2 answers
85 views

Good morning,

As you can see in the pictures attached, we have created a new project in Visual Studio from your template (Telerik C# ASP .NET MVC Framework 4.5 - Grid and menu). When we launch the project, we apply two filters in two different columns and the browser shows an error. This functionally doesn't work even at the demo pages. We are working with Chrome browser and "ProgressĀ® TelerikĀ® UI for ASP.NET MVC" 2017.3.1018.

 

We cant implement in our project a grid with filter-sort-paging server feature (in a MVC controller). Any suggestions?

 

Thanks a lot

 

Francisco
Top achievements
Rank 1
 answered on 13 Dec 2017
5 answers
1.1K+ views

I have a Grid with a command button that open a Dialog. This dialog has a Tabstrip with each tab loading content from a controller that returns a view. The tabstrip is built using the ASP.Net MVC Html wrapper. 

<p>@(Html.Kendo().Dialog()<br>        .Name("viewDetailsDialog")<br>        .Title("Details")<br>        .Content(<br>            Html.Kendo().TabStrip()<br>                .Name("viewDetailsTabstrip")<br>                .Items(tabstrip => {<br>                    tabstrip.Add().Text("Tab 1")<br>                            .HtmlAttributes(new { @class= "tab_bar" })<br>                            .Selected(true)<br>                            .LoadContentFrom("Tab1Content", "MyController");<br><br>                    tabstrip.Add().Text("Tab 2")<br>                            .HtmlAttributes(new { @class = "tab_bar" })<br>                            .Selected(false)<br>                            .LoadContentFrom("Tab2Content", "");<br><br>                   )<br>                .ToHtmlString()<br>            )<br>        .Closable(true)<br>        .Width(900)<br>        .Height(600)<br>        .Modal(true)<br>        .Visible(false)</p><p></p><p></p>

 

The dialog is opened via a JS function that's called by the Grid's Custom Command button. The details that need to be displayed in each tab in the dialog is unique to the row.

 

How do I modify the LoadContentFrom URL and pass query string parameters that are picked by the Tab1Content method on MyController?

Dimitar
Telerik team
 answered on 13 Dec 2017
3 answers
831 views

Hi All.

I am new to using the Telerik controls. I am exploring using the Grid Control and have figured out how to codoe popup window to create a new record.

The following code works below for the first Create button on the toolbar. On the grid toolbar - I want to have two "Create" buttons (see code below). I want  both buttons to implement "Create" but  displays a different custom popup form for each button.

 Is there a way to implement a conditional "Create"? What is the best approach to implement this functionality?

Thank you,

Debby

 

<div id="divGridUser">
@(Html.Kendo().Grid(Model)
.Name("GridTest")
.Columns(columns =>
{
columns.Bound(p => p.UserId);
columns.Bound(p => p.UserType);
columns.Bound(p => p.UserName).Title("User Name");
columns.Bound(p => p.Provider).Title("Provider");
})
.ToolBar(toolbar =>
{
toolbar.Create().Text("Add Provider To Role").HtmlAttributes(new { id = "Provider"});
toolbar.Create().Text("Add  Inside User Role");
})
.Editable(et => et.Mode(GridEditMode.PopUp).TemplateName("Users_Command"))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Model(model => model.Id(p=>p.UserId))
.Read(read => read.Action("UsersCommand_Read", "Popup"))
.Create(upd => upd.Action("UsersCommand_Create", "Popup"))
)
.HtmlAttributes(new { style = "height:550px;" })
.Pageable(pageagble => pageagble.Input(true).Numeric(false))
.Sortable()
.Filterable()
.Scrollable(scr => scr.Endless(true))
)
</div>

Kevin
Top achievements
Rank 1
 answered on 12 Dec 2017
11 answers
3.6K+ views

Hello,

I am facing an issue with the TabStrip (Q2 2015). Here is the declaration:

01.@(Html.Kendo().TabStrip()
02. .Name("documents")
03. .Scrollable(false)
04. .Items(tabstrip =>
05. {
06.tabstrip.Add().Text("Documents")
07. .Selected(true)
08. .LoadContentFrom("LoadDocumentsTabView", "Documents");
09. 
10.                                    tabstrip.Add().Text("Marketing Material")
11. .LoadContentFrom("LoadMarketingMaterialTabView", "Documents", new { area = "Documents");
12. 
13.tabstrip.Add().Text("Contracts Agreements")
14. .LoadContentFrom("LoadContractsAgreementsTabView", "Documents");
15. })
16. )

Let's focus on the first tab, which is "Documents". This is the method called on the controller:

1.public PartialViewResult LoadDocumentsTabView()
2.{
3.    return PartialView("~/Areas/Documents/Views/Tabs/_Documents.cshtml");
4.}
 This partial view is composed of some partial views, and some of these partial views are also calling some partial views. So I have multiple levels of partial views.

 The problem with this is that the TabString doesn't show anything. When I set breakpoints in my controllers, everything is called as expected.

 Am I missing a configuration somewhere?

 

Thanks for any help.

Ivan Danchev
Telerik team
 answered on 12 Dec 2017
1 answer
931 views

Hi, 

I'm very new to kendo and I've been having issues finding some documentation for this. Basically I have the following grid:

@(Html.Kendo().Grid<SylectusTL.Models.User.User>()
                .Name("UserList")
                .Columns(columns =>
                {
                    columns.Bound(c => c.user_name).Title("User Name");                    
                    columns.Bound(c => c.full_name).Title("Name");
                    columns.Bound(c => c.main_phone).Title("Phone");
                    columns.Bound(c => c.email).Title("E-Mail");
                    columns.Bound(c => c.admin).Title("Admin");
                    columns.Bound(c => c.active).Title("Active");
                    columns.Bound(c => c.last_login).Title("Last Login").Format("{0:MM/dd/yyyy}");
                })
                .Pageable(pageable => pageable
                    .Refresh(true)
                    .PageSizes(new int[] { 10, 20, 50 })
                    .ButtonCount(5))
                .Sortable()
                .Scrollable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Users_Read", "Account"))
                )
                )

 

What I would like to do is make the user name a link that calls my controller and passes the user id to it. I'm having issues finding a way to use the models user_name parameter for the link text and the models user_id parameter in the url.

 

Georgi
Telerik team
 answered on 12 Dec 2017
5 answers
2.1K+ views

See attached, how do I prevent these from being generated?

The only thing in each folder is "Kendo.Mvc.resources.dll" and I have no need for localization in this project

Ianko
Telerik team
 answered on 12 Dec 2017
1 answer
158 views

I found my self constructing a complex Worksheet server side in C#.  Most of the spreadsheet methods are not chainable, as I had become accustomed to in my experience with LINQ processing and client side javascript.  I'm paying it forward with this code, some simple CellSelection extension methods that made constructing my worksheets easier. The methods are not comprehensive -- only made the ones I needed.  For example:

  • ExcelColumnNameToNumber - convert those letter named columns into Excel column number
  • Range - CellSelection using Excel addressing formats; RC or A1.  Single cell or ranges (:)
  • _Merge, _Bold, _Italic, _Center, _Left, _Right, _Middle, _Background, _Box, _FontSize, etc...
  • Create your own methods for cell manipulation -- find more information in the documentation
Veselin Tsvetanov
Telerik team
 answered on 11 Dec 2017
3 answers
1.6K+ views

I'm working a project which will allow users to update several database tables with an Excel file. Using the Kendo Spreadsheet widget, I can import the file's information into the Kendo Spreadsheet widget, or I can create one with information bound to the tables I want to update and export that data, but I've yet to find a solution that will accomplish both.

Ideally, I'd like the user to be able to export a .xlsx file from the bound tables, edit that file to create new entries, and them import it back into the widget to view and save to the database. This would allow existing controllers to be utilized and provide a smooth one stop interface for the user.

Veselin Tsvetanov
Telerik team
 answered on 11 Dec 2017
13 answers
2.1K+ views
Hello,

I need a custom text for each command button.

The label/text of the button depends on the data (E.g personal, name or DNI). It is different for every row

Please help me if you know the solution.

My source is:

    @(Html.Kendo().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Command(command => command.Custom("Name").Text("CustomTextEachRow").Click("ShowRates")).Width(75);
            //columns.Command(command => command.Custom("solicitud").HtmlAttributes(new { actionName = "Edit" }));
            columns.Bound(p => p.ID_SOLICITUDSERVICIO).Visible(false);
            columns.Bound(p => p.NOMBRE_CLIENTE).Title("Cliente");
            columns.Bound(p => p.FECHA_SOLICITOSERVICIO).Format("{0: yyyy-MM-dd HH:mm:ss}").Title("Fecha");
        })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .Read(read => read.Action("LeerExt_ControlInterno", "Consultas").Data("getParameter"))
                   .Model(model => { model.Id(p => p.ID_SOLICITUDSERVICIO); })
               )
           )
Preslav
Telerik team
 answered on 11 Dec 2017
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?