Telerik Forums
Kendo UI for jQuery Forum
9 answers
768 views
Hi, I am trying to put a relative URL against a read property in a dataSource but when the page is rendered, the dataSource always seems to be prefixing the URL with a '/' making it look from the root.  Any way to get around this please?
Chris
Top achievements
Rank 1
 answered on 02 Jan 2013
5 answers
161 views
Hello,
First time data is bound okay via controller.

    @(Html.Kendo().ListView<Models.InterfaceModel>(Model)
                .Name("listView").Events(ev => ev.Change("onSelected"))
        .TagName("div")
        .ClientTemplateId("list-view-template")
        .DataSource(dataSource => dataSource
                    .Model(model => model.Id("InterfaceId"))
            .PageSize(6)
            .Read(read => read.Action("ReadInterfaceListView", "Home"))
        )
        .Pageable()    
        .Selectable()
    )

after I navigate to another partial view and return to the partial view with above kendo listview, data is not bound (though it IS sent from controller okay - I see it in debug Model is filled okay)

Any help would be appreciated.

Thanks
Shabtai
Top achievements
Rank 1
 answered on 02 Jan 2013
1 answer
58 views
Using IE9, if you browse to http://demos.kendoui.com/web/treeview/animation.html and expand/collapse the “Decor” tree item, unwanted artifacts appear below the treeview
Petur Subev
Telerik team
 answered on 02 Jan 2013
1 answer
85 views
The numeric pad key "." is mapped as "," for polish keyboards but when you enter a number in the numerictextbox the key is blocked by the widget. Is there a workaround for this problem?
Daniel
Telerik team
 answered on 02 Jan 2013
4 answers
516 views
Hello, 
I am trying to visualize data from our company's server through Kendo Grid. The data itself is avabile through secure WCF service over HTTPS with authentication. Since the server is in another domain and we need the authentication, i have to use CORS. Without authentication it works just fine using jasonp, but unforunattely that's not an option for us. So my code looks something like this:
var DS = new kendo.data.DataSource({
      type: "odataCors",
      transport: {
        read: {
          url: "https://.../TestData",
          crossDomain: true,
          withCredentials: true,
          beforeSend: function (req) {
            req.setRequestHeader("Authorization", "Basic"  + auth);
          }
        }
      }
    });
I am using odataCors extension, which i found somewhere here on the forums. Requestwise it looks allright and it works like it should when i call DS.read() - ajax sends OPTIONS message with Origin, server responds with adequate headers, ajax sends GET message with auth cookie and server returns valid jsonp odata. 

Trouble begins when i want to attach this datasource to the grid. It doesn't work, it seems like it is processing a response from the OPTIONS response and not from the second one, which actually returns data. 

Is there a way to make it work? Any help would be appriciated very much!
Thank you.


Rostislav
Top achievements
Rank 2
 answered on 02 Jan 2013
1 answer
322 views
How can I hide columns in Listview?

<script id="list-view-template" type="text/x-kendo-template">
        <div class="product-view">
                <dl>
                    <dd style='visibility:hidden'>${InterfaceId}</dd>
                    <dd>${InterfaceName}</dd>
                    <dd>${ViewName}</dd>
                </dl>
        </div>
    </script>

Worked

But when I try to hide via JS:
      $("#listView").kendoListView({
            dataBound: function (e) {
$(".product-view dd:first").hide();
});

didn't work.

Any help would be appreciated. Thanks
Shabby
Nikolay Rusev
Telerik team
 answered on 02 Jan 2013
1 answer
97 views
I was playing with the Radial Gauge and wanted to use the data initialization attributes but it seems that kendoui ignores somehow other attributes I set:
<div data-role="radialgauge" data-pointer="{ value: 20 }"></div>
 the attribute data-pointer is ignored and the gauge is set to the default 0.
Daniel
Telerik team
 answered on 02 Jan 2013
5 answers
1.2K+ views
Is it possible to use a partial view (.cshtml) as the template for the grid's popup editor in Javascript? Essentially I want to set the "template" property of the "editor" from Javascript. I see that it's possible by using the MVC wrapper's HTML helper property TemplateName, but I don't want to use the helper. From what I see the helper creates a string version of the partial view and sets the "template" property as viewed in the resulting Javascript generated by the view engine.
editable: { mode: 'popup', template: 'can I set this value from JS?' },

Thanks,
Dave
Daniel
Telerik team
 answered on 02 Jan 2013
1 answer
195 views
I am wondering if this can be done as I have not seen a specific example.  What I would like to do is this:

<script type="text/x-kendo-template" id="template">
     
    <div id="details-container">
        <h2>#= EnterpriseImageFileName #</h2>
        <h2>#=EnterpriseImageID#</h2>
        <img src='@Url.Action("RenderImage", "Member", new { enterpriseImageID = #=EnterpriseImageID# }, @Request.Url.Scheme)'/>
    </div>
</script>
 
<script type="text/javascript">
    var detailsTemplate = kendo.template($("#template").html());
 
    function showDetails(e) {
        e.preventDefault();
                 
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var wnd = $("#Details").data("kendoWindow");
 
        wnd.content(detailsTemplate(dataItem));
        wnd.center().open();
    }
</script>
However, the template value can't referenced from the Razor syntax.  Is there a way to gracefully, get the value of #=EnterpriseImageID# and use it in the call to to Action?

As an FYI - this works but I would like to use the Action helper method if possible:

<script type="text/x-kendo-template" id="template">
    <div id="details-container">
        <h2>#= EnterpriseImageFileName #</h2>
        <h2>#=EnterpriseImageID#</h2>
        <img src='../RenderImage/?enterpriseImageID=#=EnterpriseImageID#' />
    </div>
</script>
Petur Subev
Telerik team
 answered on 01 Jan 2013
1 answer
115 views
I have Kendo Grid and used a window for editing.
i want closing window with condition.

if (person.FName =="Jone")
 close window
else
 msgbox "You can not Closing this window!"

how to do?


my controller:
public ActionResult UpdatePerson([DataSourceRequest] DataSourceRequest dsRequest, PersonViewModel person)
     {           
         if (person != null && ModelState.IsValid)
         {
             var db = new PersonDBEntities();

         //... Condition
                //   if (person.FName =="Jone")
                //......
                //........

             var toUpdate = db.tblPerson.FirstOrDefault(p => p.PersonID == person.PersonID);
 
             if (toUpdate != null)
             {
                 toUpdate.FName = person.FName;
                 toUpdate.LName = person.LName;
                  db.SaveChanges();
             }
         }
         return Json(ModelState.ToDataSourceResult());
     }
and Index Form:
@{
    ViewBag.Title = "Person";
}
 
@(Html.Kendo().Grid<KendoMVCWrappers.Models.PersonViewModel>().Name("persons")
    .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model=>model.Id(m=>m.PersonID))
        .Read(read => read.Action("GetPersons", "Person"))
        .Create(up => up.Action("CreatePerson", "Person"))
        .Update(up => up.Action("UpdatePerson", "Person"))
        .Destroy(del => del.Action("DeletePerson", "Person"))
             
    )
    .ToolBar(cmd => cmd.Create().Text("Add"))           
    .Columns(columns =>
    {
        columns.Bound(c => c.FName).Width(100);
        columns.Bound(c => c.LName).Width(200);
        columns.Command(cmd =>
        {
            cmd.Edit().UpdateText("Save").CancelText("Cancel").Text("Detail");
            cmd.Destroy().Text("Del");
        });
         
         
    })
        
    .Pageable()
    .Selectable(sel => sel.Mode(GridSelectionMode.Single))
    .Filterable()
    .Sortable()
    .Editable(ed=>ed.Mode(GridEditMode.PopUp).TemplateName("PersonDetail").Window(w => w.Title("Detail")))      
)


and PersonDetail:
@model KendoMVCWrappers.Models.PersonViewModel
 
    <div class="k-content">
        <div id="detail">
            <ul>
                <li>
                    <label for="fname" class="required">First Name</label>
                    <input type="text" id="fname" name="fname" class="k-textbox" data-bind="value: FName" /> 
                </li>
                <li>
                    <label for="lname">Last Name</label>
                    <input id="lname" name="lname" type="number" class="k-textbox" data-bind="value: LName"/>
                </li>
                <li style="height:250px">
                </li>
            </ul>
        </div>
</div>

please hel me.
Petur Subev
Telerik team
 answered on 01 Jan 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?