Telerik Forums
UI for ASP.NET MVC Forum
10 answers
450 views
I am using mvc telerik grid on my project and i have checbox inside this gridI just want to filter my checkbox like check or non checked in filter boxIs it possible?Is there any experience for this situation to help me?

     @( Html.Telerik().Grid<Orpac.Models.Time>()
                   .Name("timecmb")
                   .NoRecordsTemplate("No users to display")
                   .DataKeys(keys => keys.Add(k => k.Ident))
                   .DataBinding(d => d.Ajax().Select("GridTimeBinding", "Rule"))
                   .Columns(c =>{c.Bound(e => e.Ident).Width(90).ClientTemplate("<input type='checkbox' id='123' value='<#= Code #>'   <#=bit? checked='checked' : '' #> />").Title((string)ViewData["Select"]);c.Bound(e=>e.Code).Width(150).Title((string)ViewData["TimeCode"]);c.Bound(e=>e.Desc).Width(300).Title((string)ViewData["Description"]); })        
                   .ClientEvents(events => events.OnRowDataBound("onrowDataBoundtimepopup").OnDataBound("onDataBoundTimeRule"))
                  .Selectable()
                  .Footer(true)
                  .Sortable()
                  .Filterable(filtering => filtering.Enabled((bool)ViewData["filtering"]))
                  .Scrollable(scrolling => scrolling.Height(190))
                  .Pageable(p=>p.PageSize(10))
)
 
This is the example of my gridThnx
Dongfen
Top achievements
Rank 1
 answered on 04 Aug 2014
2 answers
110 views
Hello.

Now use the insert controls in the content editor.
I need to search for items on the "class" attribute using jquery function "find()".
As a container for search uses the <div> editor.
However, the function "find()" returns an empty set of elements, although the elements are within the editor.
Tell me how you can solve the problem?

Thank you.
Regards,
Alexey.
Alexey Shkuro
Top achievements
Rank 1
 answered on 04 Aug 2014
3 answers
163 views
I would like to avoid showing 0 in x axis as well as 0 in y axis while plotting a line graph.For example:My x axis shows number of days starting from zero(say 0-365).My Y axis showing average growth rate starting from zero(say 0-2.0).So here i would like to avoid showing 0 in x axis as well as 0 in y axis.Could you show how to do that?
Iliana Dyankova
Telerik team
 answered on 04 Aug 2014
1 answer
125 views
Hi, 

 Is there a method of the Grid (MVC or html) that would generate a url hash representing the current sorting & filtering selections?

Something like '#gridoptions=(sort:column1.desc,column3.desc+filter=state:CA)"

Likewise is there a method that can consume this string back again so that the next async load represents the selections in the hash string?

A demo with Angular or Sammy would be great too, if one exists.

It would be useful to have this in order to
* preserve sorting & filtering on page refreshes
* allow users to book mark a page with a specific sort & filter 
* persist this information in a store for retrieval later for metrics or user history features

Thanks!


Daniel
Telerik team
 answered on 04 Aug 2014
1 answer
375 views
Any ideas? I took a stab in the dark; just add
'disabled' class to the template, but this doesn't work:

01.if (User.Identity.IsAuthenticated)
02. {
03.    <script type="text/x-kendo-tmpl" id="template">
04.        <div class="post-view k-widget">
05.            <div class="edit-buttons">
06.                <a class="k-button k-button-icontext k-edit-button" href="\\#"><span class="k-icon k-edit"></span></a>
07.                <a class="k-button k-button-icontext k-delete-button" href="\\#"><span class="k-icon k-delete"></span></a>
08.            </div>
09.            <div class="post-header bg-azure">
10.                <p class="post-title">#:Name# </p>
11.                <p class="post-time">#:kendo.toString(CommentDate,'d')#</p>
12.            </div>
13.            <div class="post-msg">
14.                #=Comment#
15.            </div>
16.        </div>
17.    </script>
18. }
19. else
20. {
21.    <p>You must be logged in to contribute.</p>
22.     
23.    <script type="text/x-kendo-tmpl" id="template">
24.        <div class="post-view k-widget">
25.            <div class="edit-buttons">
26.                <a class="k-button k-button-icontext k-edit-button disabled" href="\\#"><span class="k-icon k-edit"></span></a>
27.                <a class="k-button k-button-icontext k-delete-button disabled" href="\\#"><span class="k-icon k-delete"></span></a>
28.            </div>
29.            <div class="post-header bg-azure">
30.                <p class="post-title">#:Name# </p>
31.                <p class="post-time">#:kendo.toString(CommentDate,'d')#</p>
32.            </div>
33.            <div class="post-msg">
34.                #=Comment#
35.            </div>
36.        </div>
37.    </script>
38. }
39.}


What would be the correct way?

Thanks


Dimiter Madjarov
Telerik team
 answered on 01 Aug 2014
2 answers
259 views
I am trying to setup a panel bar to open when clicked and closed when clicked again. I have tried everything I know to do and have tried the panelBar animation sample with the if statements but for some reason couldn't make it work. Can anyone tell me what I'm doing wrong? Here is my code:

<div id="organizer">
        @(Html.Kendo().PanelBar()
     .Name("panelBar")
     .Animation(true)
      
     .ExpandMode(PanelBarExpandMode.Single)
     .Items(PanelBar =>
         {
             PanelBar.Add()
                 .Expanded(false)                         
                 .Content(@<div>
                    <div class="col-md-5">
                        <div class="panel-body">
                            <div id="employeeInfo">
                                <dl class="dl-horizontal">
                                    <dt>Office:</dt>
                                    <dd>Asheville, NC</dd>
                                    <dt>Department:</dt>
                                    <dd>FTG</dd>
                                    <dt>Position:</dt>
                                    <dd>Manager</dd>
                                    <dt>Phone: </dt>
                                    <dd>336-822-4442</dd>
                                    <dt>Email: </dt>
                                    <dd>victor.canipe@dhgllp.com</dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                    <div class="myTable">
                        <div class="table-responsive">
                            <table class="table table-bordered table-condensed" style="margin-bottom:0px;">
                                <tr>
                                    <th>Skills</th>
                                    <th>Industries</th>
                                    <th>Services</th>
                                </tr>
                                <tr>
                                    <td>Language</td>
                                    <td>Lorem Ipsum</td>
                                    <td>Lorem Ipsum</td>
                                </tr>
                                <tr>
                                    <td>Technology</td>
                                    <td>JAVA</td>
                                    <td>JAVA</td>
                                </tr>
                                <tr>
                                    <td>Technology</td>
                                    <td>Access</td>
                                    <td>Access </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <div class="col-md-2 col-md-push-6">
                            <a id="more"><i class="fa fa-info-circle"></i>More</a>
                        </div>
                    </div>
                </div>
                 );
          })
        )
    </div>
Kamen Bundev
Telerik team
 answered on 01 Aug 2014
6 answers
381 views
I am having an issue creating a template for the Scheduler. What I am trying to do is set the event style class to one of four classes depending on the value of a given eventstate value from the model.  here is what I have for my whole kendo mvc schelduer with template. Can someone help show me how to write the template so it can do this and be in a valid state.

                @(Html.Kendo().Scheduler<SBAS_Web.Models.AppointmentModel>()
                      .Name("scheduler")
                      .Date(new DateTime(startdate.Year, startdate.Month, startdate.Day))
                      .StartTime(new DateTime(startdate.Year, startdate.Month, startdate.Day, 8, 00, 00))
                      .ShowWorkHours(true)
                      .Views(views => views.DayView(day => day.Selected(true)))
                      .Editable(false)
                      .AllDaySlot(false)
                      .EventTemplate(
                      "<div class='appointment-template  # if(AppointmentState == 'Default'){# DefaultColor #}#  if(AppointmentState == 'Completed'){# CompletedColor #}#  if(AppointmentState == 'ReadyForInvoicing'){# ReadyForInvoicingColor #}#  if(AppointmentState == 'Invoiced'){# InvoicedColor #}#'>" +
                        "<p>" +
                            "#= kendo.toString(start, 'hh:mm') # - #= kendo.toString(end, 'hh:mm') #" +
                        "</p>" +
                        "<p>#= title #</p>" +
                     "</div>")
                      .Timezone("Etc/UTC")
                      .DataSource(d => d
                          .Model(m =>
                          {
                              m.Id(f => f.AppointmentId);
                              m.Field(f => f.Title).DefaultValue("No title");
                              m.RecurrenceId(f => f.RecurrenceID);
                          })
                          .Events(e => e.Error("error_handler"))
                          .Read("Appointments_Read", "Appointment")

                        //.Update("Appointments_Update", "Appointment")
                      )
                      .Group(grp => grp.Orientation(SchedulerGroupOrientation.Vertical))
                )
Georgi Krustev
Telerik team
 answered on 01 Aug 2014
1 answer
292 views
Hi,

I'm wondering if it's possible to separate the input from the icon picker in the DateTimePicker.  To be more clear, I want to use the input to enter the time and have the user select the date from the calendar (it's much quicker and easier to type times, and repetitive to type the date over and over again when it changes far less frequently).

Right now if I apply a format and mask to a DateTimePicker to only display the time and change it, the value reverts to today at whatever time I've entered.  I'm also not sure how I could perhaps hide the clock icon to save some space.

Thanks for any help you can provide,
Kevin
Georgi Krustev
Telerik team
 answered on 31 Jul 2014
2 answers
134 views
Hello,

I'm looking for some guidance on how to implement a page where the user can drag items from a treeview control on to a grid.
The constraints are:
Don't allow the tree to be reorganized via drag and drop function.
The tree is to be lazy loaded.

I've tried to implement this using the kendoDraggable (using a selector to identify the nodes on the treeView) and a kendoDropTarget (with the gird as the target) this allowed me to drag the items, however the drop event never fired on the kendoDropTarget.

I've tried to implement this using the treeView's DragAndDrop functionality, however I don't know how to retrieve the treeView node information from the parameter passed into the kendoDropTarget's drop event.

any suggestions?

thanks in advance
-bill
Bill
Top achievements
Rank 1
 answered on 31 Jul 2014
5 answers
219 views
I have modified the  filter-menu-customization example to perfor server side filtering based on the filter value. I created this action method:

public ActionResult FilterMenuCustomization_Titles([Bind(Prefix="filter[filters][0][value]")]string filterValue)
{
    var db = new SampleEntities();
    var employeeTitles = db.Employees
                           .Select(e => e.Title)
                           .Where(t => t.StartsWith(filterValue))
                           .Distinct();
    return Json(employeeTitles, JsonRequestBehavior.AllowGet);
}

This works fine, but the Bind attribute and the prefix string looks fragile to me. I'm pretty sure there should be a better way to perform the filterValue binding. I imagine there should be a IModelBinder for FIlterDescriptor, so that I could leverage the other aspects of the filter descriptor (starts with, equals, logic operator etc). But I failed to find it.

I posted my example here on Github.

Any suggestions?



Marijn
Top achievements
Rank 1
 answered on 31 Jul 2014
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
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
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?