Telerik Forums
UI for ASP.NET MVC Forum
3 answers
105 views

Steps to reproduce...

1. Any old datagrid with a filter row enabled

2. Go to any numeric columns and enter a value in the filter field

3. Blur the field (tab out or click anywhere) the value

4. The value entered in the filter column is reformatted.

 ---

I was trying to filter my grid with a record number of 571339. It is just an int in my view model -- not formatted as Currency. When I tab out of the grid, it reformats it to 571,339.00. It's not breaking anything, but it's annoying one of my vocal customers.

 

How can I initialize my grid in MVC to not reformat numeric values to currency?

 

 

Viktor Tachev
Telerik team
 answered on 04 Dec 2015
6 answers
242 views
I'm grappling with how to pass two views to the Gantt chart properly.  I notice from the examples that Telerik are using Services to provide the datasources but I really wanted to Strongly Type my (partial) view and maintain the MV(VM)C convention.

So I have:

Viewmodel:
Namespace Models
 
    Public Class Tasks
        <Key> <Display(Name:="Job")> Public Property TaskID As Integer
        <Display(Name:="Project Name")> Public Property Title As String
        <Display(Name:="Start")> Public Property StartDate As Date
        <Display(Name:="End")> Public Property EndDate As Date
    End Class
 
    Public Class Dependencies
        <Key> <Display(Name:="Dependency Id")> Public Property DependencyID As Integer
        <Display(Name:="Predecessor Id")> Public Property PredecessorId As Integer
        <Display(Name:="Successor Id")> Public Property SuccessorId As Integer
        <Display(Name:="Type")> Public Property Type As Integer
    End Class
 
    Public Class TypeDep
        Public Task As IEnumerable(Of Tasks)
        Public Dep As IEnumerable(Of Dependencies)
    End Class
End Namespace


Controller:
Dim iTasks As IEnumerable(Of Models.Tasks)
Dim iDeps As IEnumerable(Of Models.Dependencies)
Dim TD As New Models.TypeDep
TD.Task = iTasks
TD.Dep = ideps   
Return PartialView("Gantt", TD)


View:
@ModelType ienumerable(Of IMS_2.Models.Typedep)
 
@(Html.Kendo().Gantt(Model).Name("chart").Title("Example Column Chart"))

I'm getting a syntactical error in the view in respect of TTaskModel not being able to be inferred.  I can't find any examples of this approach - could anyone give me guidance?

Many thanks

Alex Gyoshev
Telerik team
 answered on 04 Dec 2015
3 answers
359 views

I have a Grid with a popup that has an upload module. after uploading a file to the server, I want the "Success" event to populate a hidden field for the model.

The code is as follows.

GRID________________________________________________

@(Html.Kendo().Grid<BlueWebApp.Models.Note>()
    .Name("NoteGrid")
    .Columns(columns =>
    {
        columns.Bound(c => c.NoteID).Width(50);
        columns.Bound(c => c.NoteText).Width(150).Title("Text");
        columns.Command(c => c.Edit());
    })
    .HtmlAttributes(new { style = "height: 600px; width: 100%" })
    .Editable(ed => { ed.Mode(GridEditMode.PopUp).TemplateName("NoteEditTemplate"); })
.ToolBar(e => e.Create())
.Pageable(pageable => pageable
    .Refresh(true)
    .PageSizes(true)
    .ButtonCount(5))
.DataSource(dataSource => dataSource
    .Ajax()
    .Read(read => read.Action("GetNotes", "Note"))
    .Create(c => c.Action("CreateNote", "Note"))
    .Update(u => u.Action("UpdateNote", "Note"))
    .Model(m =>
    {
        m.Id(p => p.NoteID);
    })
    )
)
 

 

EDITORTEMPLATE_______________________________

@model BlueWebApp.Models.Note
 
<div style="height: 100px;">
    This is customized Person edit template
 
        @Html.HiddenFor(model => model.NoteID)
        <br />
        @Html.HiddenFor(model => model.NoteText, new { id = "test"})
                 
</div>
<div>
    @(Html.Kendo().Upload()
         .Name("files")
         .Events(events => events.Success(
         @<text>
    function(e) {
        $('#test').val(e.response.fileName);
    
    }
        </text>))
         .Multiple(false)
         .Async(a => a.Save("Save", "Note")
                      .Remove("Remove", "Note")
                      .AutoUpload(true)
        )
 
)
</div>
<br />

When clicking the "Update" button on the popup the hidden field with id Test has been given a value. but that value is not passed to the model.

 What am I doing wrong?

 
 

Dimiter Madjarov
Telerik team
 answered on 03 Dec 2015
5 answers
150 views

I have an event template:

<script id="event-template" type="text/x-kendo-template">
    <div style='background-color: #=Color#'>
        <span>#= title #</span>
    </div>
</script>

I base the color on the start date of the event which works fine for all events except for those with recurrence events.

Since the parent recurrence event was set up in the past it displays the color data from the parent and not the actual recurrence event which is in the future.

How can I setup the recurrence event data when it is displayed on the scheduler?

 

Georgi Krustev
Telerik team
 answered on 03 Dec 2015
1 answer
55 views

Currently the Grid performs wonderfully as (pseudo coded the >> is the toggle button to hide/show the group).

>> Group1
Group1 - Row 1
Group1 - Row 2
>> Group2
Group2 - Row 1
Group2 - Row 2
>> Group3
Group3 - Row 1

Is it possible to remove the  "t-grouping-row" and instead just have

>> Group1 - Row 1
Group1 - Row 2
>> Group2 - Row 1
Group2 - Row 2
Group3 - Row 1

 

Group3 - Row1 has no toggle since it's only 1 member.

 The reason why is the client doesn't like the Group Row and would rather just see the full row entry as it is, but with the toggle there.

Rosen
Telerik team
 answered on 03 Dec 2015
1 answer
749 views

Hi all.

I'd like to display a preview of the image the user selected to upload. Problem is: I can't find the complete file path to insert into an img-tag.

How can I access the file path(s) of the selected file(s)?

Kind regards

Viktor Tachev
Telerik team
 answered on 03 Dec 2015
3 answers
707 views

I'm using ASP.NET Web API 5.2.3, and I'm having problems getting the DataSourceRequest to work properly.  I followed the instructions at http://docs.telerik.com/kendo-ui/web/grid/how-to/web-api-server-operations but it appears paging and filtering options are not coming through with the request.  Is the information on that page still valid for current releases?

Thanks,

Joel

Rosen
Telerik team
 answered on 02 Dec 2015
1 answer
315 views

 I'm having some issues when it comes to scrolling the scheduler vertically in mobile when using the Mobile(MobileMode.-tablet/phone etc-).

The scheduler seems to be overriding something in the mobile browser (android, chrome) causing the scrolling to not work. I've pasted a snippet below. Scrolling works when the mobile mode is off, but if the mobile mode is off i can't create any events due to the mobile not having "double"-clicks.

01.@(Html.Kendo().Scheduler<CalendarModel>().Name("scheduler")
02.    .Date(DateTime.Today)
03.    .StartTime(DateTime.Today.AddHours(8))
04.    .EndTime(DateTime.Today.AddHours(20))
05.    .WorkDayStart(DateTime.Today.AddHours(8))
06.    .WorkDayEnd(DateTime.Today.AddHours(20)).AllDaySlot(false)
07.    .Min(DateTime.Today).Selectable(false)
08.    .Events(e =>
09.    {
10.        e.DataBinding("data_binding");
11.        e.Add("scheduler_add");
12.        e.Save("scheduler_save");
13.    })
14.    .Views(views =>
15.    {
16.        views.DayView();
17.        views.WeekView();
18.        views.MonthView();
19.        views.AgendaView();
20.    }).Editable(e => e.TemplateId("customEditorTemplate").Move(false).Create(true).Resize(false).Update(false).Destroy(false)).BindTo(Model).DataSource(d => d.Model(m =>
21.    {
22.        m.Id(f => f.Id);
23.        m.Field(f => f.Title).DefaultValue("No title");
24.        m.Field(f => f.RoomId);
25.        m.Field(f => f.ErrorMessage);
26.    })
27.    .Create("Create", "CreateEvent")
28.    ).Mobile(MobileMode.Auto))

 

 

 

 

Georgi Krustev
Telerik team
 answered on 02 Dec 2015
1 answer
593 views

Hi

 

I have a sum-row in my grid and I want to do a calculation with a fixed value from my database

 

So, passing it via the ViewModel won't work, has anyone a suggestion other than sending the value with each row of the dataset?

 

.ClientFooterTemplate("<div class=\"total_sum\">" + @Labels.Total + ": #= sum # = #= sum * [INSERT VALUE HERE] # €</div>");

 

Kind regards

Florian

Marin
Telerik team
 answered on 02 Dec 2015
1 answer
74 views

I evaluating your component.

I need to retrive filtered data with custom filter into custom header with refresh button click

Client:

.Pageable(p => p.Refresh(true))

.Sortable()

.Selectable()

.Scrollable(scrollable => scrollable.Height(30))

.Filterable()

.HtmlAttributes(new { style = "height:550px;" })

.DataSource(dataSource => dataSource

.Ajax()

.PageSize(20)

.Model(model => model.Id(p => p.Id))

.ServerOperation(true)

.Read(create => create.Action("IncomingRead", "Grid", new { topRow = ""}))

)

Server:

public ActionResult IncomingRead([DataSourceRequest]DataSourceRequest request)

 

 

{

 

string virtualPath = "";

var customerWhereCondition = "";

var userIdWhereCondition = "";

var versionNumberWhereCondition = "";

var json = Helper.GetDataFromDb(virtualPath, 100, "-1", customerWhereCondition,

userIdWhereCondition, versionNumberWhereCondition, new DateTime(2015, 4, 1), DateTime.Now);

return Json(json.ToDataSourceResult(request));

 

 

}

 

 

how to set filter into request object(client) and get filter into the server for execute new query?

 

thankyou in advance.

Regards,

Flavio

 
 
Maria Ilieva
Telerik team
 answered on 30 Nov 2015
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
Rating
ScrollView
ButtonGroup
CheckBoxGroup
Licensing
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
Iron
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
Iron
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?