Telerik Forums
Kendo UI for jQuery Forum
1 answer
113 views
Hi
  If you look at the textboxes in this example:

http://dojo.telerik.com/OzUz/3

You'll see the textboxes overlap. This is a reproduced example, on my original example it looks a bit worse because the font is larger so the boxes are larger

This is because of this kendo rule, if you override it it looks ok

.km-pane-wrapper *:not(.k-state-default) > input:not([type="checkbox"]):not([type="radio"]),
.km-pane-wrapper .k-mobile-list select:not([multiple]),
.km-pane-wrapper .k-mobile-list textarea,
.km-pane-wrapper .k-mobile-list .k-widget,
.km-pane-wrapper .k-edit-field > *:not([type="checkbox"]):not([type="radio"]):not(.k-button) {
  width: 80%;
  padding: .6em 0;
  margin: -0.5em 0;
}

Is this a bug/feature? I'm overriding it locally for now.

I'm using this for editing the grids contents, neither the popup nor inline editing is a good fit for my circumstances

thanks
Iliana Dyankova
Telerik team
 answered on 06 Aug 2014
1 answer
81 views
Currently I'm building a financial application for my company in HTML5. The visualisation of the charts went pefect with the help of the amazing Kendo framework. Now I'm trying to search for a good solution to visualize a financial balance in html. I've tried the Kendo grid possibilty but I can't group properly etc. Does anybody has any expercience in the visualisation of a financial balance in html?

Would be great

Thanks
Alexander Popov
Telerik team
 answered on 06 Aug 2014
2 answers
733 views
hi,

I am creating Kendo Grid which use SignalR for CRUD operation.

but now i want custom image upload control in grid and when image saved on physical path need that URL to save in db.


i have created grid and added custom control but don't know how to integrate it with signalr for custom control.

please help me to upload image with signalr methods and get URL in control for main grid submit button click.

Thank you.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div id="organizations-grid"></div>

<script>
    $(document).ready(function () {
        var orgnaizationPnl = {
            organizations: {
                init: function () {


                    function fileUploadEditor(container, options) {
                        $('<input type="file" name="fileUpload" id="fileUpload" />')
                            .appendTo(container)
                            .kendoUpload({
                                async: {
                                    saveUrl: "",
                                    removeUrl: ""
                                },
                            });
                    }


                    var organizationDataSource = new kendo.data.DataSource({
                        type: "signalr",
                        autoSync: false,
                        // Handle the push event to display notifications when push updates arrive
                        push: function (e) {
                            //var notification = $("#notification").data("kendoNotification");
                            //notification.success(e.type);
                        },
                        schema: {
                            model: {
                                id: "ShortName",
                                fields: {
                                    "ShortName": { editable: true, nullable: false, validation: { required: true } },
                                    "Image": { editable: true, nullable: false, validation: { required: true } },
                                    "Name": { editable: true, nullable: false, validation: { required: true } }
                                }
                            }
                        },
                        transport: {
                            signalr: {
                                promise: hubStart,
                                hub: hub,
                                server: {
                                    read: "readOrganizations",
                                    destroy: "destroyOrganization",
                                    update: "updateOrganization",
                                    create: "createOrganization"
                                },
                                client: {
                                    read: "readOrganizations",
                                    destroy: "destroyOrganization",
                                    update: "updateOrganization",
                                    create: "createOrganization"
                                }
                            }
                        }
                    });

                    var organizationGrid = $("#organizations-grid").kendoGrid({
                        dataSource: organizationDataSource,
                        height: 700,
                        toolbar: [{ name: "create", text: "Add Organization" }],  /*, "save", "cancel"*/
                        sortable: true,
                        pageable: true,
                        columns: [{
                            field: "ShortName",
                            title: "Organization Name",
                            width: 200
                        }, {
                            field: "Image",
                            title: "Image Url",
                            width: 200,
                            editor: fileUploadEditor
                        }, {
                            field: "Name",
                            title: "Title"
                        },
                        {
                            command: [{ name: "edit", text: "Edit" }, { name: "destroy", text: "Delete" }],
                            title: "&nbsp;",
                            width: 200
                        }],
                        editable: {
                            mode: "popup",
                            confirmation: true
                        },
                        edit: function (e) {
                            if (e.model.isNew()) {
                                e.container.data("kendoWindow").title('Add New Organization');
                                e.container.find(".k-button.k-grid-update").html("<span class='k-icon k-update'></span>Insert");
                            }
                            else {
                                e.container.data("kendoWindow").title('Edit Organization');
                                $('input[name=ShortName]').parent().html(e.model.ShortName);
                            }
                        },
                        save: function (e) {
                            if (e.model.isNew()) {
                                var currentShortName = e.model.ShortName;
                                var data = this.dataSource.data();
                                for (item in data) {
                                    if (data[item].id == currentShortName && data[item].ShortName == currentShortName) {
                                        e.preventDefault();
                                        alert("Organization Name Exists.");
                                    }
                                }
                            }
                        }
                    });
                }
            }
        }
        orgnaizationPnl.organizations.init();
    });
</script>
Atanas Korchev
Telerik team
 answered on 06 Aug 2014
1 answer
308 views
Hi.

I have two dropdownlists where values of second depend on values of first.
First is something like that:

<select id="Id1"
 kendo-drop-down-list
 k-change="change"
 k-data-bound="prjDataBound"
 k-data-text-field="'Value'"
 k-data-value-field="'id'"
 k-data-source="somesource"
  >
 /select>

and second is the similiar.
For now to change the value in second dropdownbox  I use change method:
1.$scope.change = function (e)
2.{
3.  $scope.mpr = this.dataItem();
4.  var cfLevel = $("#cfLevelId").data("kendoDropDownList");
5.  cfLevel.value($scope.mpr.SomeValue);
6.  $scope.$apply();
7.};


So, I would like to avoid lines 4-5 and  bind to mpr.SomeValue declaratively.
And yes, it is not about cascding.

Is it possible?

Thanks in advance.

Petyo
Telerik team
 answered on 06 Aug 2014
2 answers
398 views
Hi,
    I am just starting to develop a project using kendoui framework. i want bind listview in tabular format and give alternate background color of listview item. like attached image,
Plz help me.

Thanks.
Taresh
Phil H.
Top achievements
Rank 2
 answered on 06 Aug 2014
6 answers
333 views
Hi,

The following piece of code has some strange behaviour:
$('.fx-modal-ajax').livequery(function() {
        $(this)
            .removeClass('fx-modal-ajax')
            .click(function(e) {
                e.preventDefault();
                var modalTitle = $(this).attr('data-modal-title');
                var modalUrl = $(this).attr('data-modal-url');
                var modalWidth = $(this).attr('data-modal-width');
                $('<div></div>')
                    .kendoWindow({
                        width: modalWidth,
                        title: modalTitle,
                        content: modalUrl,
                        modal: true
                         
                    })
                    .data("kendoWindow")
                        .center()
                        .open();         
            });   
    });
 As you can see, we get the initialisation values from the dom object that is initialised as follows:

<a class="fx-modal-ajax"
  data-modal-width="750px"
  data-modal-url="'index.php?_c=productaccountrefill&_a=ajaxquickrefill"
  data-modal-title="Add credit to your account"
  href="#">Add credit</a>

This works fine, but for some reason, the height of the opened windows is always 100% of the viewport, even though the loaded content is much less in height.

When in stead of getting the url from the link data-attribute, I pass the link directly in the javascript code, we have no problem whatsoever, and the windows resizes to the actual height of the loaded content.

Any idea?
Tyrone
Top achievements
Rank 1
 answered on 05 Aug 2014
1 answer
142 views
Hi there,

I'm using data binding on the kendo scheduler to call out to our server for reading/creating/updating/destroying events. The only transport url have currently implemented is read, the others just return 404, although I have given paths for them in the scheduler.

I'm currently trying to implement the create event functionality but I'm finding the behaviour of the scheduler erratic.

* When I double click a time-slot to create a new event and just press 'save' without modifying any fields the event is added to the scheduler with no corresponding API call.

* After that, if click again to add a new event (different time slot) and then change the title and press 'save', it calls my 'update' API call (which fails with a 404).

* Lastly, repeating the same thing again (same time slot) results in the scheduler calling my 'create' API call, which is what I would have expected it to do in every case.

Here is the js I'm using to configure the scheduler:

$("#scheduler").kendoScheduler({
             
            date:  new Date("2014-07-17"),
             
            dataSource: {
                batch: true, // Enable batch updates
                transport: {
                    read:
                    {
                        url: "/appointments/get",
                        dataType: "json",
                        type: "POST",
                        contentType: "application/x-www-form-urlencoded",
                    },
                    create:
                    {
                        url: "/appointments/create",
                        dataType: "json",
                        type: "POST",
                        contentType: "application/x-www-form-urlencoded",
                    },
                    update:
                    {
                        url: "/appointments/uodate",
                        dataType: "json",
                        type: "POST",
                        contentType: "application/x-www-form-urlencoded",
                    },
                    destroy:
                    {
                        url: "/appointments/create",
                        dataType: "json",
                        type: "POST",
                        contentType: "application/x-www-form-urlencoded",
                    },
            
                    parameterMap: function (options, operation)
                    {
                        if (operation === "read")
                        {
                            // make sure we send the start and end date to the server in unix time, and urlencode them
                            var scheduler = $("#scheduler").data("kendoScheduler");
 
                            var startDate = DateToUnixTime(scheduler.view().startDate());
                            var endDate = DateToUnixTime(scheduler.view().endDate());
 
                            // if start and end are the same, bump end by 24 hours
                            if (endDate === startDate)
                            {
                                endDate += gPageConstants.kSecondsIn24h;
                            }
 
                            var result = {start_time:startDate, end_time:endDate};
                            return $.param(result);
                        }
                        else if (operation === "create")
                        {
                            console.log(options);
                        }
                        else
                        {
                            return $.param(options);
                        }
                    }
                },
                schema: {
                    model: {
                        id: "uid", // The "id" of the event is the "taskId" field
                        fields: {
                            // Describe the scheduler event fields and map them to the fields returned by the remote service
                            taskId: {
                                from: "uid", // The 'TaskID' server-side field is mapped to the 'taskId' client-side field
                                type: "number"
                            },
                     
                            start: { type: "date", from: "start" },
                            end: { type: "date", from: "end" },
 
                            title: { from: "notes", defaultValue: "No title", validation: { required: true } },
                            description: { from: "Description", defaultValue: "No description" },
                            recurrenceId: { from: "RecurrenceID", defaultValue: null },
                            recurrenceRule: { from: "RecurrenceRule", defaultValue: null },
                            recurrenceException: { from: "RecurrenceException", defaultValue: null },
                            isAllDay: { type: "boolean", from: "IsAllDay", defaultValue: false }
                        }
                    }
                }
            }
        });

I'd appreciate some advice! :)

Cheers, Paul.

Paul
Top achievements
Rank 1
 answered on 05 Aug 2014
2 answers
101 views
            $("#sampleDate").focus(function () {
                $(this).select();
            });

add this doesn't seem to work.  Is there a clear button?
danparker276
Top achievements
Rank 2
 answered on 05 Aug 2014
0 answers
108 views
I have used the Entity Framework in order to pull my SQL data and to make a grid, but when I go to update it doesn't do anything, but the cancel button has proper functionality. I am not sure what I am doing wrong here. I have followed the tutorial from the Kendo page in order to do this; therefore, I am not sure what I have missed.

Model
public class PQAViewModel
  {
     public string Jobber { get; set; }
     public int Dealer { get; set; }
     public int OptInd { get; set; }
     public DateTime establish_date_time { get; set; }
     public string establish_id { get; set; }
  }


View
@(Html.Kendo().Grid<TelerikMvcApp1.Models.PQAViewModel>()
     .Name("grid")
     .Columns(columns =>
         {
              columns.Bound(opt => opt.Jobber).Width(90);
              columns.Bound(opt => opt.Dealer).Width(95);
              columns.Bound(opt => opt.OptInd).Width(110);
              columns.Bound(opt => opt.establish_date_time);
              columns.Bound(opt => opt.establish_id);
               columns.Command(commands =>
        {
                              commands.Edit();
        }).Title("Commands").Width(200); 
     })
            .Editable(editable => editable.Mode(GridEditMode.InLine))
            .Filterable()
            .Pageable()
            .DataSource(datasource =>
            datasource.Ajax()
              .Model(model =>
                   {
                       model.Id(opt => opt.Dealer);
                       model.Field(opt => opt.Jobber).Editable(false);
                       model.Field(opt => opt.Dealer).Editable(false);
                       model.Field(opt => opt.OptInd).Editable(true);
                       model.Field(opt => opt.establish_date_time).Editable(false);
                       model.Field(opt => opt.establish_id).Editable(false);
                    })
                   .PageSize(20)
                   .Read(read => read.Action("ProductQualityFileFull_Read", "PQA"))
                   .Update(update => update.Action("Opt_Update", "PQA"))
                      )
                  )



Controller

namespace TelerikMvcApp1.Controllers
   {
       public class PQAController : Controller
           {

               public ActionResult Baseline()
               {
                      return View();
               }

               public ActionResult ProductQualityFileFull_Read([DataSourceRequest] DataSourceRequest request)
                 {
                       using (var pqa = new PQAEntities())
                    {
                       IQueryable<ProductQualityFileFull> opt = pqa.ProductQualityFileFulls;
                       DataSourceResult result = opt.ToDataSourceResult(request);
                       return Json(result);
                    }
                }

               public ActionResult UpdateOptIn()
                  {

                      return View();

                  }


           public ActionResult Opt_Update([DataSourceRequest] DataSourceRequest request, PQAViewModel opt)
           {
               if (ModelState.IsValid)
                {
                     using (var pqa = new PQAEntities())
                {
                        var entity = new ProductQualityFileFull
                   {
                         Jobber = opt.Jobber,
                         Dealer = opt.Dealer,
                         OptInd = opt.OptInd,
                         establish_date_time = opt.establish_date_time,
                         establish_id = opt.establish_id
                      };

              pqa.ProductQualityFileFulls.Attach(entity);

              pqa.Entry(entity).State = EntityState.Modified;
 

             pqa.SaveChanges();
              }
           }

               return Json(new[] { opt }.ToDataSourceResult(request, ModelState));

      }
   }


 

 





Kacee
Top achievements
Rank 1
 asked on 05 Aug 2014
1 answer
82 views
I have a sample here:

http://dojo.telerik.com/@linush/aLOX

When you expand "SubTeams" and "All Milestones" I don't see the value in each individual cell. I do see sub totals and grand totals. Is this a bug? Notice I have only 4 values - one for each crossing.

Also, the "expand" property doesn't seem to work. I have it set to "true" for all column and row fields but only 2 of them are expanded initially.

Nikolay Rusev
Telerik team
 answered on 05 Aug 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
Map
Drag and Drop
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
AIPrompt
TimePicker
AICodingAssistant
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?