Telerik Forums
Kendo UI for jQuery Forum
3 answers
206 views
I am stuck for a couple of days now with the kendo grid.
When I select a row in the grid, I save it inside an Angular scope variable.
When I click edit a custom edit screen opens with the data of the selected row.
After saving the changes, I want to call the "update" function from the dataSource.transport.
But my server returns a new "EditedDate", so I also want to call the e.success() callback in my update function.

When I call the dataSource.transport.update(editedObject), I only have the object in my function, without an e.success() to update the grid row.
When I call the dataSource.remove() or the dataSource.add() and then the dataSource.sync() everything goes well.

I'm just not able to update any row, because I also need the e.success().

create: function (e) {
 //custom createfunction with callback
 vm.CourseFactory.Insert(e.data, function success(data) {
  e.success(data);
 });
},
update: function (e) {
 //custom update function with callback
 vm.CourseFactory.Update(e.data, function success(data) {
  e.success(data);
 });
},
the dataSource.add(newObject), calls the create function with an e.data and an e.success
I need the same kind of function for my update function, but I only found add() and remove()
and dataSource.transport.update() is not what I'm looking for.

Any help would be appreciated!
Petur Subev
Telerik team
 answered on 25 Oct 2013
3 answers
139 views
Hi there,

I am using a kendoComboBox to load data from the server. I would like to limit the size of the initial control to, say 200px, but display the items that are returned from the server in a wider list, say 400px wide below the control.

How can this be done? I tried various things such as setting explicit widths on various CSS elements. I also used a template with a <div> that has a defined width, for each item but no matter what I try, the size of the items is constrained by the size of the original ComboBox control.

Are there any examples that show how to accomplish this?

Thanks in advance,

Imar
Kiril Nikolov
Telerik team
 answered on 25 Oct 2013
8 answers
362 views
Hi !

I was trying to create a scheduler using Kendo Scheduler.
It seems that there is no way for me to create a timeline view like Telerik Scheduler.

I'm trying to display monthly meeting but i want to the days display in horizontal way not in a calendar way.

Thanks in advance for your help

Atanas Korchev
Telerik team
 answered on 25 Oct 2013
3 answers
190 views
Issue 1: Drawer re-appears when using app.navigate()
I have several views that use a Drawer. Running into an issue when using ap.navigate().
Steps to reproduce:
1. I have 4 views that use the same Drawer
2. While on View 1, I bring up the Drawer and select a link (<a>) to bring up view 2
3. On view 2, I do a button click, which then does an app.navigate() back to view 1
4. Now, instead of displaying view 1 fully, I get view 1 with the Drawer already shown covering most of view 1.
How can I prevent the Drawer from showing up again unless the user explicitly brings up the Drawer?

Issue 2:
On views that have a Back button, clicking the back button brings up the Drawer if the view was shown by navigating thru the Drawer. Is there an option to prevent the Drawer from getting added to the history so that the back button doesn't navigate back to the Drawer?

Issue 3:
The iPhone simulator (that comes with Telerik Graphite) doesn't seem to work well with the Drawer. In the above scenario, when I navigate back to View 1, the Drawer displays one of the views instead of its own content. The same issue has been noticed on a desktop browser as well

Kiril Nikolov
Telerik team
 answered on 25 Oct 2013
1 answer
124 views
Hey guys

I'm wondering if I can make something like the home screen (I don't know exactly how it's called) from Windows Phone 8.
Not the full alphabetical list of apps, but the tiles to the left.

I tried altering some CSS, but things got a bit messy. I guess I should just use the Scroller widget, right? The only thing I'll miss is the virtual scrolling, which prevents performance problems for big lists.

Any thoughts?
Thanks!
Kiril Nikolov
Telerik team
 answered on 25 Oct 2013
3 answers
206 views
Hi 

I need to add Dropdownlist with binding data as column inside my grid..i checked in forum..but i didn't get proper solution..Here i have attached my screen for your reference.Kindly find the attachment.kindly do the needful.Thanks in advance.
Alexander Popov
Telerik team
 answered on 25 Oct 2013
2 answers
846 views
Is there a way to prevent the Horizontal Scroll Bar appearing in a dropdownlist.  (while keeping the vertical scrolling)

Many people would be happy for horizontal overflow to be hidden on a drop-down list.

The catch is you can't keep making the drop-down portion of a dropdownlist wider as if it's wider than the container div the control wraps to the next line and messes up the layout.
Juan Pablo
Top achievements
Rank 2
 answered on 24 Oct 2013
2 answers
416 views
Here is my situation: 

I have a kendo dropdown list box and a numeric text box in a view. When the user clicks a button, i want to display a kendo grid in a popup window. 
All i need to do is figure out how to pass the values from the dropdown and textbox to my mvc controller.

Here is the definition of the dropdown and text box:

@Html.Kendo().DropDownListFor(x => x.TrainList).BindTo(Model.TrainList).HtmlAttributes(new { style = "width:150px" }).DataTextField("CNX_AUT").DataValueField("Id").Name("trainList").Value("Id").Text("CNX_AUT")
 
@Html.Kendo().NumericTextBoxFor(x => x.BeltScaleWeight).Name("beltScaleWeight").HtmlAttributes(new { style = "width:150px" })
Here is the button definition that will display the pop up window: 
<button class="k-button" id="applyToCars" style="width:150px" >Apply To Cars</button>

Here is the definition for my grid inside the pop up window's div:
<div id="GridWindow">
      <br/>
      <br/>
       @(Html.Kendo().Grid<CNX.Domain.Entities.EDIRailcar>()
          .Name("RailCarGrid")
          .Columns(columns =>
            {
                columns.Bound(o => o.Id).Visible(false);
                columns.Bound(o => o.EDI_417_TRAIN_GUID).Visible(false);
                columns.Bound(o => o.EQUIPMENT_INITIAL);
                columns.Bound(o => o.EQUIPMENT_NUMBER);
                columns.Bound(o => o.WEIGHT);
                columns.Bound(o => o.TARE_WEIGHT);
                columns.Bound(o => o.AS_RECEIVED_WEIGHT);
                columns.Bound(o => o.Pile);
                columns.Bound(o => o.Class);
                columns.Bound(o => o.STATUS);                           
            })
            .DataSource(dataSource => dataSource.Ajax()
                                                .PageSize(10)
                                                .Read(read => read.Action("ApplyWeights", "MenuWeight")
                                                .Type(HttpVerbs.Post))
                                                .Model(model => model.Id(o => o.Id)))                                               
            .Pageable()
            .Sortable()           
            .Filterable()    
         
        )
    </div>



Here is the javascript/jquery from my view : 

<script type="text/javascript">
 
    $(document).ready(function () {
       var win = $("#GridWindow").kendoWindow({
            actions: ["Maximize", "Minimize", "Close"],
            draggable: true,
            height: "500px",
            width: "500px",
            modal: true,
            resizable: true,
            visible: false,
            position: { top: 100, left: 100 }
        }).data("kendoWindow");
    });
 
    $("#applyToCars").click(function () {
        var selectedTrain = $("#trainList").data("kendoDropDownList");
        var weightValue = $("#beltScaleWeight").data("kendoNumericTextBox");
        var win = $("#GridWindow").data("kendoWindow");
        var grid = $("#RailCarGrid").data("kendoGrid");
       /*How do i pass the values they selected to the controller? */
        grid.dataSource.fetch();
        win.title('Railcar weights for ' + selectedTrain.text()  );
        win.center();
        win.open();
    });
 
 
</script>

Kinda under the gun on this one as far as time is concerned. Any help would be most appreciated.
 
Matt Miller
Top achievements
Rank 1
 answered on 24 Oct 2013
1 answer
443 views
Hi All ,

Please help me ......

I have a kendo grid and i have bind it a controller function , there is a document filed(Attachment Name) in it and it is showing different document name Now i wil have to add a image on the basis of document in each row corresponding document name . and i have written a function in controller  that is returning a string image path . I just want to call a function in grid column and bind it into a image URl of image control .

 $.ajax({
                type: "POST",
                "url": '@Url.Action("TSController", "TSFunction")',
                "data": data,
                "dataType": this.datatype,
                "contentType": "application/json; charset=utf-8",
                "success": function (data) {

                    if (data.length > 0) {

                        $("<div/>").appendTo(e.detailCell).kendoGrid({
                            dataSource: data,
                            columns: [
                             {
                         title: "",width: 30,template: "<img src='../../Images/accent.png' width='10px' height='10px'/>"
                    },
                    {
                        field: "DocName", title: "Attachment Name"
                    },
                    {
                        field: "DocPrimaryId", title: "DocumentId", hidden: true
                    },
                    {
                        field: "TSd", title: "TSd", hidden: true
                    },
                    {
                        field: "AttachmentType", title: "Attachment Type"
                    },
                    {
                        command: { text: "Re-Link Attachment",
                            click: RelinkAttachment,
                            title: "Action",
                            width: "140px"
                        }
                    },
                    {
                        command: { text: "Download",
                            click: DownloadAttachment,
                            title: "Action",
                            width: "140px"
                        }
                    },
                   {
                       command: { text: "Delete",
                           click: DeleteAttachment,
                           title: "Action",
                           width: "140px"
                       }
                   }
                    ]
                        })
                    }
                    else {

                    }
                },
                error: function (result) {
                    var data = jQuery.parseJSON(result);
                    alert("Error :" + data);
                }
            });
Ignacio
Top achievements
Rank 1
 answered on 24 Oct 2013
1 answer
158 views
Is there a way to add methods to a Model's definition after it's already been defined?

I have a Product Model that is reused throughout my application. There a form when which I bind to this Product model in my app that needs a few extra methods on it so for the "Save" button using MVVM. However I don't want to add this to the Product Model definition because this particular form is the only one that needs the "Save" method.

Here is the jsfiddle working, without adding the Save function to the Model
http://jsfiddle.net/lelong37/RvsCg/1/

Here is the jsfiddle not working when I try to add the Save method to the Model
http://jsfiddle.net/lelong37/t8Bq2/3/

Your help is greatly appreciated.
Daniel
Telerik team
 answered on 24 Oct 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
DropDownTree
ListBox
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?