Telerik Forums
Kendo UI for jQuery Forum
1 answer
131 views
Hi,

I'm trying to use the Grid Filter, but without any success. I Attached the Project.
Please what's wrong here?

Thanks
Rene
Nikolay Rusev
Telerik team
 answered on 30 Apr 2013
3 answers
104 views
after upgrade to build 416 - tree items loaded at initialization time
LoadOnDemand set to true and TemplateId was initialized
if I remove TemplateId - all work fine
Please Help!
Alex Gyoshev
Telerik team
 answered on 30 Apr 2013
1 answer
107 views
Is there a way to set labels of radial gauges at specific intervals? Such as if I have a range of 0-300, and I want to set labels only at 65, 98, 194, 250. So far I have only been able to set them at equal distance range intervals. 
Iliana Dyankova
Telerik team
 answered on 30 Apr 2013
1 answer
94 views
I have this grid:
@(Html.Kendo().Grid<Payday.Website.Models.Message.MessageViewModel>()
.Name("Message")
.Columns(columns =>
{
columns.Bound(p => p.Id).Groupable(false);
columns.Bound(p => p.MessageType).ClientTemplate( "#= (MessageType.Name == null) ? ' ' :MessageType.Name #");
columns.Bound(p => p.Employee).ClientTemplate("#=Employee.FullName#");
columns.Bound(p => p.Responsible).ClientTemplate("#=Responsible.FullName#").EditorTemplateName("PayDayEmployee").Width(200);
columns.Bound(p => p.Sender).ClientTemplate("#=Sender.FullName#");
columns.Bound(p => p.SentDate).Format("{0:dd-MM-yyyy}");
columns.Command(command => command.Custom("Vis").Click("ShowMessage"));
columns.Command(command => command.Edit());
})
.ToolBar(toolBar =>
{
//toolBar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Groupable()
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.HtmlAttributes(new { style = "height:730px;" })
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.Batch(false)
.PageSize(25)
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Id).Editable(false);
model.Field(p => p.MessageType).Editable(false);
model.Field(p => p.Employee).Editable(false);
model.Field(p => p.Sender).Editable(false);
model.Field(p => p.SentDate).Editable(false);
})
.Read(read => read.Action("GetPayDayMessages", "Message"))
.Update(update => update.Action("UpdateMessages", "Message"))
)
)


I am able to enter edit mode and i can cancel it.
If i doesn't make any changes i can press update just fine.
If i make changes the changes are sent to the server but the grid remains in édit mode.
I can see i recieve a empty reply from the server and if there is an error in the data then i recieve the expected error message.
My server method looks like this:

 [AcceptVerbs(HttpVerbs.Post)]
public ActionResult UpdateMessages([DataSourceRequest] DataSourceRequest request,
[Bind(Prefix = "models")]IEnumerable<MessageViewModel> messages)
{
if (messages != null && ModelState.IsValid)
{
foreach (var m in messages)
{
var message = _iMessageRepository.GetById(m.Id);
if (m.Responsible != null)
{
message.Responsible = EmployeeRepository.GetById(m.Responsible.Id);
}
else
{
message.Responsible = null;
}
_iMessageRepository.Save(message);
}
}
// return Json(messages.ToDataSourceResult(request, ModelState));
return Json(ModelState.ToDataSourceResult(), JsonRequestBehavior.AllowGet);
}
I include files like this:
<link href="@Url.Content("~/Content/kendo/2013.1.319/kendo.common.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.1.319/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.1.319/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.1.319/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
<!--<script src="@Url.Content("~/Scripts/kendo/2013.1.319/jquery.min.js")"></script>-->
<script src="@Url.Content("~/Scripts/kendo/2013.1.319/kendo.all.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2013.1.319/kendo.aspnetmvc.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>


Any ideas ?
Winnie
Top achievements
Rank 1
 answered on 30 Apr 2013
2 answers
158 views
I'm currently converting an App from Telerik ASP.NET AJAX to the newest Kendo UI. The App heavily uses the "Filter" control which is attached to a Grid to sort through data. These filter configurations can then be saved to the database to allow Users to save/load Custom Grid Views.

I do not see a Filter control within the Kendo UI controls, is there an alternative to this functionality I could use to filter/sort the Kendo UI Grid?

Regards,
Landon
Landon
Top achievements
Rank 2
 answered on 29 Apr 2013
6 answers
576 views
Hi All,

I am trying to pass parameters to controller action method from listview. But mvc controller action is not firing.. Script is below.
   
    <script type="text/x-kendo-tmpl" id="titletemplate">
                <div class="titleClass">
                <input type='checkbox' class='titleCheck' id=${CplGuid}  value=${aaaa}" > ${bbbb} </div>            
                </script>
                @(Html.Kendo().ListView<Dcip.KeyVault.Portal.Areas.KeyVaultUI.Models.DownloadKdmPE>()
        .Name("titles")
                        //.Events(events => events.DataBound("OnKeyDataBound"))
        .TagName("div")
        .ClientTemplateId("titletemplate")
        .DataSource(source =>
        source.Read(
        read => read.Action("xxxx", "yyyy").Data("filterTitles"))
        .PageSize(25)
        )       
        .Selectable(selection =>
        {
            selection.Enabled(true);
            selection.Mode(ListViewSelectionMode.Multiple);
        })
                        //.Pageable(pager => { pager.PageSizes(true); pager.ButtonCount(1); })
        .Pageable(pager => { pager.PageSizes(new int[] { 10, 20, 25 }); pager.ButtonCount(1); })
        )

<script type="text/javascript">
 function filterTitles() {
        alert('Hi Titles');
        return { xxId: 1 ,yyId:1 };
    }
</script>


Immediate help would be appreciated.

Regards,
Partha.
David
Top achievements
Rank 1
 answered on 29 Apr 2013
1 answer
194 views
I have a kendo grid that has editor template for the popup editor. Whenever I call a property directly on the model i.e. @Html.DropDownListFor(model=>model.MyProperty,SomeSelectList) everything Works fine. When I do associated properties on the other hand I get the no parameterless constructor. All of my associated properties specifically have a default constructor. So why am I getting this error when I use @Html.DropDownLIstFor(model=>model.AssociatedPropertyObject.AssociatedPropertyProperty) when both the model and the associatedproperty object have default constructors specified.

This is how my models are set up.
01.public class MyClass
02.{
03.public MyClass()
04.{
05.AssociatedObject=new AssociatedObject();
06.}
07.public AssociatedObject AssociatedObject
08.{get; set;}
09.}
10.public class AssociatedObject
11.{
12.public AssociatedObject()
13.{
14.//do something
15.}
16.}
Chrys
Top achievements
Rank 1
 answered on 29 Apr 2013
5 answers
493 views
Hi.

I have a treeview which I implemented with checkchildren set to true, but causes IE8 to show a message about a long running script when there is over 100 nodes.

I therefore tried to implement my own functionality using jquery. I managed to check/uncheck children based on parent with the code:

function onTreeDataBound () {
        $("input:checkbox[name=checkedNodes]").on('click', function () {
            var checkedStatus = $(this).is(':checked');
            $(this).closest(".k-item").find(".k-group .k-item input:checkbox[name=checkedNodes]").each(function () {
                    $(this).attr('checked', checkedStatus);
                });
        });
    }
This seems faster then the built in functionality. What i need now is a way to uncheck parents if one child is unchecked and check parents if all children is checked.

Does anyone have a sample code for this? Or a tips on how I can get the built in functionality to work better with IE8?
Alex Gyoshev
Telerik team
 answered on 29 Apr 2013
1 answer
151 views
Hi,

I can't get this working when I've checked each control for a ToClientTemplate for it to render properly
1st grid = fine
1st tabstrip = fine
2nd grid = not working
2nd tabstrip within grid = fine

<h2>Awards Listed By Programs</h2>
@(Html.Kendo().Grid<Scholarship2013.Models.Category>()
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.CategoryID);
        columns.Bound(p => p.CategoryDescription);
    })
    .ClientDetailTemplateId("employeesTemplate")
    .Pageable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("Program_Read", "Student"))
        .PageSize(10)
    )
    .Sortable()
    //.Events(events => events.DataBound("dataBound"))
)
 
<script>
    function dataBound() {
        this.expandRow(this.tbody.find("tr.k-master-row").first());
    }
</script
<script id="employeesTemplate" type="text/kendo-tmpl">   
    @(Html.Kendo().TabStrip()
            .Name("TabStrip_#=CategoryID#")
            .SelectedIndex(0)          
            .Items(items =>
            {
                items.Add().Text("Awards").Content(@<text>
                    @(Html.Kendo().Grid<Scholarship2013.Models.Award>()
                        .Name("Awards_#=CategoryID#")
                        .ClientDetailTemplateId("awarddetailTemplate")
                        .Columns(columns =>
                        {
                            columns.Bound(o => o.AwardID).Width(101);
                            columns.Bound(o => o.AwardName).Width(140);
                                
                            columns.Bound(e => e.AwardName)
                                .ClientTemplate("# if(AwardDetails[0].IsApplicationOpen >= 0 && AwardDetails[0].IsApplicationClosed < 0) {# <span class='redfont'>*</span> #=AwardName# #} else {# #=AwardName# #} #")
                                .Width(500);
                             
                        })
                        .DataSource(dataSource => dataSource
                            .Ajax()
                            .Read(read => read.Action("Award_Read", "Student", new { categoryID = "#=CategoryID#" }))
                        )
                        .Pageable()
                        .Sortable()
                        .ToClientTemplate()
                        )
                </text>                      
                );
                             
            })
            .ToClientTemplate()          
         
   )   
</script>
 
<script id="awarddetailTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().TabStrip()
            .Name("AwardDetailTabStrip")
            .SelectedIndex(0)
            .Items(items =>
            {
                items.Add().Text("Award Details").Content(@<text>
                   
                   <div id="details-container2">
                    @*    <h2>#= AwardName #</h2>*@
                    <dl>
             
                            @*<dt>Award Name: #= AwardName #</dt>    *@
                            <dt> Award Detail ID: #= AwardDetails[0].AwardDetailID #</dt>    
                            <dt> Award Amount: #= AwardDetails[0].AwardAmount #</dt>    
                            <dt> Number of Awards: #= AwardDetails[0].NumberOfAwards #</dt>    
                            <dt> Criteria: #= AwardDetails[0].ConditionsText #</dt>    
                            <dt> Deadline: #= AwardDetails[0].ApplicationDeadlineDate #</dt>    
                            <dt> Special Instructions: #= AwardDetails[0].SpecialInstructions #</dt>          
                    </dl>
                  </div></text>
                );
            })
            .ToClientTemplate()
            )
</script>


. I'm having an issue particularly in the 2nd grid and on this part (perhaps its the AwardDetails[0] field/object

columns.Bound(e => e.AwardName)
                                .ClientTemplate("# if(AwardDetails[0].IsApplicationOpen >= 0 && AwardDetails[0].IsApplicationClosed < 0) {# <span class='redfont'>*</span> #=AwardName# #} else {# #=AwardName# #} #")
                                .Width(500);

Thanks for your help.

Aaron
Daniel
Telerik team
 answered on 29 Apr 2013
1 answer
100 views
We added our custom filter to the grid since we want to use google type filter.  The issue is how can we take advantage of the Kendo Grid that will allow us to re-order the column.  Right now if we re-order it, the filter remains the same therefore it filter incorrectly.
see attachment.
Header1 | Header 2 
------------  |-------------
Filter1      |  Filter 2 <--- custom filters (free text and drop dropdown)
-----------   | -----------
data1       | data 2

Now if I dragged Header 2 to Header one, it looks correct but the filter remains so not filter 1 is under Header 2 and Filter 2 is under Header one.

Header2 | Header1 
------------  |-------------
Filter1      |  Filter 2 <--- unchanged
-----------   | -----------
data2       | data1

Do I need to do something to accomplish the re-ordering properly?
Alexander Valchev
Telerik team
 answered on 29 Apr 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?