Telerik Forums
Kendo UI for jQuery Forum
3 answers
796 views
I'm using a basic Kendo Grid with a WebApi data source. The calls to Create, Read and Update work just fine, even with additional data through .Data(), using a JavaScript function. However, when I try to do the same for the Delete call, it won't reach the method. The problem is, our DBA has not created a unique key for the rows I'm working with - I only have a composite key, which is why I need two values. Note that when I remove the additional parameter and additional data, the Delete action is called.

How do I achieve this?

The WebApi Delete method:
1.public void Delete(int id, long receiptId)
2.{
3.    service.Delete(receiptId, id);
4.}

The Destroy() on the DataSource:
1..Destroy(c =>
2.    c.Url(Url.HttpRouteUrl(
3.        "DefaultApi",
4.        new { controller = "ReceiptLines",
5.        id = "{0}" })
6.    ).Data("getSelectedReceiptId"))

And finally, the JavaScript getSelectedReceiptId function:
01.function getSelectedOntvangstId() {
02.    var gridOntvangsten = $("#GridOntvangsten").data("kendoGrid");
03.    var selectedRow = gridOntvangsten.select();
04.    var data = gridOntvangsten.dataItem(selectedRow);
05.    var obj = {
06.        OntvangstId: 0
07.    };
08. 
09.    if (data !== null) {
10.        obj.OntvangstId = data.OntvangstId;
11.    }
12. 
13.    return obj;
14.}
Kiril Nikolov
Telerik team
 answered on 17 Oct 2014
1 answer
171 views
Hi,

I have a list of items in a dropdownlist.  Each item contains 3 properties.  The name, the acronym, and the Id.  I'm currently using the name and Id which works perfectly fine.

As the list is long, it's typical for a user to open the dropdownlist and start typing to find the item they are after.  Our users like to search/type the acronym, not the full name.  So because we only show the full name in the dropdown text, typing the acronym usually does not get you to the correct item.

How can I display the full name, but type-ahead on the acronym?

Thanks!
Daniel
Telerik team
 answered on 17 Oct 2014
1 answer
130 views
If I manually create window (.kendoWindow()) the open event is called when window automatically open for the first time.
But not if initialize with MVVM.

Just in case link.
Alex Gyoshev
Telerik team
 answered on 17 Oct 2014
1 answer
118 views
Hi there, I am not a jquery expert, and this is the very first time I am attempting to create an app that is 100% Telerik-driven. I have included the image attachments of my related codes, I have an AddNew method within my Web API that accepts the entity object that I want to create. So now, with a form created on the front end, how do I post the values from the form to the method in the API? Is this the best method? Otherwise, what will you recommend?
Kristian Nikolov
Telerik team
 answered on 17 Oct 2014
2 answers
327 views
In  Grid documentation in section editable.template  show how bind value to numeric text box :
     <label>Age: <input data-role="numerictextbox" name="age" /></label>

I need bind value to dropdown list. I change code like this:

<script id="popup-editor" type="text/x-kendo-template">
  <h3>Edit Person</h3>
  <p>
    <label>Name:<input name="name" /></label>
  </p>
  <p>
    <label>Age: <input data-role="dropdownlist" data-bind="value: age, source: dataSource" /></label>
  </p>
</script>
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: "edit" }
  ],
  dataSource: {
    data: [
      { id: 1, name: "Jane Doe", age: 30 },
      { id: 2, name: "John Doe", age: 33 }
    ],
    schema: {
      model: { id: "id" }
    }
  },
  editable: {
    mode: "popup",
    template: kendo.template($("#popup-editor").html())
  }
});
 
  var dataSource = new kendo.data.DataSource({
  data: [ 21,22,23,24  ]
}); 
</script>

But  dataSource do not bound. Whats wrong?


Rodion Nikolaev
Top achievements
Rank 2
 answered on 17 Oct 2014
8 answers
1.4K+ views
Hi
  Apologies as this is probably somewhere in the documentation, but...

I want to use theming on a fieldset, I'm not sure what classes to use for the fieldset and the legend to get the kendo look and feel?

Just to complicate things slightly I'm using a bootstrap 'well' class to get the bootstrap styling for the fieldset.

I don't know if these can be integrated in some way, I don't know if you can only use bootstrap elements if you're using the bootstrap theme?

If not is there a 'pretty' kendo fieldset? The bootstrap one looks much nice than the html default

thanks

Iliana Dyankova
Telerik team
 answered on 17 Oct 2014
1 answer
208 views
Hello,

we are using treeview, loading nodes on demand having checkboxes (.Checkboxes(cb => cb.CheckChildren(true)).  The tree has 500-1000 nodes.

One requirement is,  if a user changes a checkbox, the checkbox state must be set to all the children of this node.

My questions are

- has TreeView such functionality built in ?
- Is it possible to expand all sub nodes (complete structure) of  a given node when loaded on demand ?


Many thanks in advance.

Regards
Thomas
Alex Gyoshev
Telerik team
 answered on 17 Oct 2014
2 answers
418 views
Hi, I am initializing a kendo grid from a table that already has a header, and tbody with rows and columns,
I am not sure how to add grouping/aggregates to this table, or can this only be done when using a datastouce??

I want to add a grouping on the DATE column, with an aggregate sum on the CHARGE column,

can you please help

$(document).ready(function () {
        $("#Journeys").kendoGrid({
            scrollable: false,
            pageable: true,
            sortable: {
                mode: "single",
                allowUnsort: false
            },
            filterable: true
        });
 
    });


<table id="Journeys">
    <colgroup>
        <col style="width: 28px;" />
        <col style="width: 180px;" />
        <col style="width: 210px;" />
        <col style="width: 150px;" />
        <col style="width: 130px;" />
    </colgroup>
    <thead>
        <tr>
            <th data-field="rank"></th>
            <th data-field="Date">Date/Time</th>
            <th data-field="Journey">Journey/Action</th>
            <th data-field="Charge">Charge</th>
            <th data-field="Action"></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var model in Model)
        {
            <tr>
                <td></td>
                <td>@Html.Encode(model.Date)</td>
                <td>@Html.Encode(model.JourneyDescription)</td>
                <td>@Html.Raw(model.FormattedCharge)</td>
                <td></td>
            </tr>
        }
    </tbody>
</table>
Kiril Nikolov
Telerik team
 answered on 17 Oct 2014
3 answers
66 views
Hi,

We are trying to use Kendo UI for in our MVC development. To start with as demo, we tried to create Calendar, Dropdown List and Grid. But none of these controls are working or rendering on any of the browsers i.e. in IE 11.0.9600, FireFox 33.0 or Chrome 37.0.2062.124. We have Telerik version 2014.2 903 and we are using VS .Net 2012 Express for Web.

Can you please give a hint what could be gone wrong to this?

As this is very urgent at the moment, if I get the reply as soon as possible will be very helpful.

Regards!
Venkat
Top achievements
Rank 1
 answered on 17 Oct 2014
3 answers
162 views
Hi
I´m using your grid and have to set the width of the columns. I´m also using the filter feature in row mode. 
If i´m doing so, the filter column has a default width which is greater than my column so your filter icons are not shown.
I´ve tried to set the template for the column, which is working with Q2 but no more with your servicepacks as you
changed the templates.

Could you please post a sample with filterable template where you change the colums width.


Thank's in advance.

Gregor
Gregor
Top achievements
Rank 1
 answered on 17 Oct 2014
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
Application
Drag and Drop
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?