Telerik Forums
Kendo UI for jQuery Forum
1 answer
111 views
I want to take the value from the editor and pass it to the model to be added into the data base but i dont know how to implement the part with the value go from the editor to the model here is the place im so far

CSHTML
@using ( Html.BeginForm("Admin", "Account") )
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend><b>Създаване на нова новина</b></legend>
        <h1>Title</h1>
        @*Render the editor for the title*@
        @(Html.Kendo().EditorFor(m => m.title).Name("Title").Value("Заглавието на новината"))
        <h1>NewsText</h1>
        @*Render the editor for the text*@
        @(Html.Kendo().EditorFor(m => m.text).Name("Text").Value("Текста на новината"))
        <input type="button" value="Submit" />
    </fieldset>
}
Controller

           [Authorize]
        [HttpGet]
        public ActionResult Admin()
        {
           return View();
        }
 
        [HttpPost]
        public ActionResult Admin(string Title, string Text)
        {
            NewsDal.setNews(Title, Text);
            return Redirect("/Home/News");
        }
Model Method
public static void setNews(string Title, string Text)
        {
            InfoEntities db = new InfoEntities();
            db.AddToNews(new News()
            {
                title = Title,
                text = Text,
            });
            db.SaveChanges();
        }

Dimiter Madjarov
Telerik team
 answered on 14 Feb 2013
1 answer
125 views
Hello Everyone,
This is the first time I am posting to Kendo Forums, so forgive me if I step over any posting rules. 
I am very new to Kendo UI and MVC 4. So far, I have been able to get the data to display on the grid on my web page.
But I am having issues with the data binding to the grid. The first time the page displays, it correctly displays the first 10 records, but when I click on "Go to Next page", the web page throws error.

I understand that it has to do with data binding to the grid. My question is, how do I go about this? i.e. Do I need to add the code to the controller or the view? and if so, where should I add the new method and how would it look like? I am posting my code below for your review. Please feel free to make any suggestions. Thank you for reading.

@model IEnumerable<MVC4Trial.Models.vwCallDetail>
@{
    ViewBag.Title = "Index";
}

<h2>Call Detail View</h2>

@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
    {
        columns.Bound(p => p.CCCID).Width(50).Title("CCCID");
        columns.Bound(p => p.Mp3_Url).Width(50).Title("MP3 URL");
        columns.Bound(p => p.Target_Number).Width(50).Title("Target Number");
        columns.Bound(p => p.Duration).Width(50);
        columns.Bound(p => p.Index).Width(50);
        columns.Bound(p => p.LocalTime).Width(50);
        columns.Bound(p => p.Site_Name___Address).Width(50).Title("Site Address");
        columns.Bound(p => p.Ad_Source_Name).Width(50).Title("Ad Source Name");
        columns.Bound(p => p.Tracking_Number).Width(50).Title("Tracking Number");
        columns.Bound(p => p.Caller_Number).Width(50).Title("Caller");
        columns.Bound(p => p.Available_Feature).Width(50).Title("Features");
        
       
    })
    .Groupable()
    .Pageable(page => page.Enabled(true).PageSizes(new Int32[] {10, 20, 30, 40}))
    .Sortable(sorting => sorting.SortMode(Kendo.Mvc.UI.GridSortMode.SingleColumn))
    .Scrollable()
    .Filterable()
    .DataSource(datasource => datasource
        .Ajax()
        .Read(read => read.Action("vwCallDetail", "Grid"))
        .PageSize(10)
        .ServerOperation(true)
        .PageSize(10)
        )
    .Resizable(resize =>resize.Columns(true))
    .Reorderable(reordering => reordering.Columns(true))
    ) 

Rosen
Telerik team
 answered on 14 Feb 2013
2 answers
2.1K+ views
Hello,

I'm finding that the proper styling is not being applies(or it is being applied in the wrong order) when a control is in error in MVC.

Using the default Kendo UI MVC project out of VS2012, a control like so:
<input class="k-textbox input-validation-error" id="textBox" name="textBox" type="text" value="">
Does not get styled with a pink background, red border and instead retains the default styling.
The styling defined in the default Kendo Site.css(line 256):
.input-validation-error
{
    border: 1px solid #ff0000;
    background-color: #ffeeee;
}
 but it is just overridden by the default styling(from the theme css) instead of the error styling taking precedence.

If I remove the "k-textbox" class, then the background-color works, but the red border is still not in effect because it is overridden by the CSS on line 164 of Site.css:
input[type="text"]
{
    width: 200px;
    border: 1px solid #CCC;
}


Is it possible to get the provided error styles to take precedence over the non-error styles?
It does not work out-of-the-box.


Thanks.
Dimo
Telerik team
 answered on 14 Feb 2013
6 answers
255 views
I have a dropdown list of states and the keyboard hitting 'n' key doesn't cycle through the states like a default one does.  See this fiddle:

http://jsfiddle.net/wolfpackt99/pZM8m

Is this a bug or how do i enable the default behavior as well.
Georgi Krustev
Telerik team
 answered on 14 Feb 2013
1 answer
235 views
Hi, I am having a problem to bind a Listview in kendo ui mobile with a server side method written in a Webservice.
But this code is not working. When i placed a debugger in method, i found that debugger does not go inside the $.ajax 
and go out to end the function. Can anybody help ?


<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="scripts/jquery.min.js" type="text/javascript"></script>
<script src="scripts/kendo.all.min.js" type="text/javascript"></script>
<link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
<link href="styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
<link href="styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function mobileListViewDataBindInitFlat() {
debugger;
$.ajax({
type: "POST",
url: "mobileAppWebService.asmx/GetData",
data:null,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
$("#flat-listview").kendoMobileListView({
dataSource: data.d,
});
},
failure: function (msg) {
alert(msg);
}
});
}
var app = new kendo.mobile.Application(document.body);
</script>
</head>
<body>

<div data-role="view"   data-init="mobileListViewDataBindInitFlat" data-title="Data Bindings">
<ul data-role="listview" data-style="inset" id="flat" >
</ul>
<div data-role="header">
<div data-role="navbar">
<span data-role="view-title"></span>
</div>
</div>
</div>
</body>
Alexander Valchev
Telerik team
 answered on 14 Feb 2013
5 answers
177 views
Здравейте,

Ползвайки Kendo mobile  се опитвам да направя форма с данни за потребител, която да съхранява информацията в локална база данни на устройството. 
Тъй като от съвсем скоро се занимавам с това, документацията не ми е достатъчна. Успях да създам базичката и някак добавих нещо като форма за въвеждане, редактиране и изтриване, но с помощта на kendo web, и когато добавя скрипта за mobile  всичко гърми. Знам, че двете са отделно съответно с различен съпорт. Има ли начин в който да мога да мога да редактирам и въвеждам данни с KendoMobileListView?


Поздрави,
Марияна



Petyo
Telerik team
 answered on 14 Feb 2013
0 answers
135 views
ff
Chaitali
Top achievements
Rank 1
 asked on 13 Feb 2013
1 answer
560 views
I am binding to a table using a template. The number of columns is dynamic. My data source row looks like this:
{ name: "text", flags: [ {status: true}, {status: false}, {status: false} ] }
The flags array length is the same for all rows. My desired output is something like this:
<tr>
    <td data-bind="html: name"></td>
    <td><input type="checkbox" data-bind="check: status" /></td>
    <td><input type="checkbox" data-bind="check: status" /></td>
    <td><input type="checkbox" data-bind="check: status" /></td>
</tr>
I have tried using a nested template to generate the <td> elements for each of the array items, but the problem is that this requires a containing element to apply against, as in the made up "xxx" element below:
<script id="row-template" type="text/x-kendo-template">
    <tr>
         <td data-bind=
"html: name"></td>
         <xxx data-template="flags-template" data-bind="source: flags"></xxx>
    </tr>
</script>
<script id=
"statuses-template" type="text/x-kendo-template">
    <td><input type=
"checkbox" data-bind="checked: status" /></td>
</script>
I've also tried flattening out the data source:
[ {name: "text"}, {status: true}, {status: false}, {status: false} ]
But with this approach, I can't find a way to render the first array item differently than the remaining.

Can you advise how this problem should be addressed?

Thanks,
Gary
Alexander Valchev
Telerik team
 answered on 13 Feb 2013
11 answers
359 views
How can I display TabStrip Text on Andoid.. 
it's work great on IOS.. but android only show icon

thanks
Kamen Bundev
Telerik team
 answered on 13 Feb 2013
8 answers
352 views
HI ,

I have a main menu and sub menus inside it. While I am on the third lower level of the menu, the 2 topper hierarchy is not highlight. I want the highlight remains as I move in the lower levels of the sub menu.

For example

MY first level of menu is 

ELECTRONICS      FOOD      GAMES

My second level of menu, for example, in case of ELECTRONICS is as below

COMPUTERS    TVs     SOUNDS

My third level of menu, for example, in case of COMPUTERS is as below

LAPTOPS    DESKTOPS   STORAGE

Now, if i am on the page LAPTOPS, only LAPTOPS get highlighted but the above 2, ELECTRONICS and COMPUTERS do not get highlighted.

Please let me know how I highlight all the 3 levels of the menu level


S
Top achievements
Rank 1
 answered on 13 Feb 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Drag and Drop
Application
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?