Telerik Forums
Kendo UI for jQuery Forum
3 answers
283 views
Hi,

We are using the Kendo grid for angular, we are having issue with the date format -
We have tried below 2 ways and neither works:
          $scope.dbColumns = [               
                {"field": "date",
                    "sortable": true,
                    "title": "First date",
                    "template": "#= kendo.toString(dateFirst, '{0:dd-MMM-yyyy}') #"
                },                
                {
                    "field": "dueSecond",
                    "sortable": true,
                    "title": "Second date",
                    "type": "date",
                    "fomrat":"{0:dd-MMM-yyyy}"
               }];
  Both cases we get the format as => 2014-05-30T11:13:51.6006636-04:00











Siddhartha
Top achievements
Rank 1
 answered on 10 Jun 2014
1 answer
208 views
Here is the situation. I've 2 views: grid-view and add-view. When page loads, grid-view is visible. By clicking on "New" button, add-view comes into the picture. Both views are into the layout.Here's the code:

var customerSearchLayout = new kendo.Layout($('#customer-search-view-template').html());
    customerSearchLayout.render($("#searchCust"));
 
    var addCustomerView = new kendo.View($('#add-customer-view-template').html());
        var customerGridView = new kendo.View($('#customer-grid-view-template').html());
        var layout = new kendo.Layout("<div id='content' class='contentDiv'></div>");
 
        layout.render($("#main")); 
        layout.showIn("#content", customerGridView);

"New" button is inside customer-search-view-template.

var customerSearch = kendo.observable({
        customerName: "Customer name",
 
        searchClicked: function() {
            this.set("customerName", "Search clicked");                    
        },     
        newClicked: function(e){
              e.preventDefault();
              this.trigger("newCustomerClicked");
        }  
    });
 
    customerSearch.bind("newCustomerClicked", function(){
        layout.render($("#main"));
        layout.showIn("#content", addCustomerView, "swap");
    });
 
    // Bind the view model to the customer element.
    kendo.bind($('#searchCustomer'), customerSearch);

When "New" button is clicked, it triggers newCustomerClicked event and displays add-view. add-view has a form to add a new customer. The form is nested inside a <div>.

<form id="addCustForm">
<label for="txtFname">First name</label>                       
<input id="fname" data-bind="value: firstName" class="k-textbox"  />
</form>
 
// observable object of add customer
    var customerAdd = kendo.observable({       
        firstName: "Hello world!"
    });
 
    // Bind the view model to the customer element.
    kendo.bind($('#addCustForm'), customerAdd);

Each template has a wrapping element.

I've tried to bind viewmodel customerAdd with form, with parent div, with container div but none of these worked.
I couldn't figure out what is the issue with binding here.
So, how do I bind viewmodel customerAdd with form ?????

Petyo
Telerik team
 answered on 10 Jun 2014
3 answers
204 views
Hi Telerik team,

I'm a new bie in ASP.net MVC and telerik. When i create my project, i met the problem in multicolumn in combobox like your demo at : http://demos.telerik.com/aspnet-mvc/combobox/template... I don't attach the headertemplate because i don't need the title of column. But it cannot run when i add template ..hope your suggestion.

here is test.cshtml file:
@(Html.Kendo().ComboBox()
          .Name("test")
          .DataTextField("Category")
          .DataValueField("Category")
          .Filter("startswith")
          .MinLength(1)
          .HtmlAttributes(new { style = "width:250px" })
          .DataSource(source =>
          {
              source.Read(read =>
              {
                  read.Action("GetCategory", "User");
              })
              .ServerFiltering(false);
          })
              .Template("<span class=\"k-state-default\">#: data.Category #</span>" +
                        "<span class=\"k-state-default\">#: data.ProductID #</span>")
)

and the getcategory method in  usercontroller:

public JsonResult GetCategory()
        {
            var a = new DataClasses1DataContext().Dat_Hangs.Select(b => new OrderViewModel
            {
                ProductID = b.ProductID,
                ShopID = b.ShopID,
                OID = b.OID,
                Category = b.Category,
                Quantity = b.Quantity,
                Price = b.Price
            });

            return Json(a, JsonRequestBehavior.AllowGet);
        }


Dimiter Madjarov
Telerik team
 answered on 10 Jun 2014
5 answers
170 views
Hello,

I am using Kendo UI with MVC 2014.1.540.440.  I am using Kendo Chart to create bubble diagrams.  Elements that appear at the right side of the chart, have cropped tooltips.  Please see the attached image.  

I would really appreciate your help on this!

Best regards




Iliana Dyankova
Telerik team
 answered on 10 Jun 2014
9 answers
1.5K+ views
I am unable to set the Grid Datasource Group Header Title. My code is as follows

var gridDataSource = new kendo.data.DataSource({});
gridDataSource.group([{ field: "Group1" }, { field: "Group2"}]);

after adding the data in Datasource, the Grid is showing the grouping, but Group Header is showing as "Group1" (The field name), but I need to show different Header Name. Please let me know how this can be achieved.

Emmit
Top achievements
Rank 1
 answered on 10 Jun 2014
1 answer
272 views
I have a problem and I can't figure out how to solve.

1.  I'd like to present a list of records, grouped by a single column and the default (initial) presentation to the user should have the group collapsed, hiding the detail records for the user.  (I think we've got this one figured out).

2.  in addition to 1 above, I would like to apply the grouping on the server side before the Page size is applied.  The end result being if we have a Page Size of 10, we will show 10 groups, collapsed, regardless of how many detail records there are.  Basically set the paging on the grouping not the total number of detail records.

Any thoughts on how to accomplish this will be greatly appreciated.

 
Alexander Popov
Telerik team
 answered on 10 Jun 2014
1 answer
374 views
how to save kendo grid data to database using stored procedure in web based application using javascript? 
Alexander Popov
Telerik team
 answered on 10 Jun 2014
6 answers
181 views
hi,
I want to define in a mobile page 3 kendoMobileListView. 2 of them are regular list and the last one is endlessScroll listview.
the regular lists are shown but the endlessScroll listview is not shown
is it possible to define them in one page?
Ofer
Top achievements
Rank 1
 answered on 10 Jun 2014
1 answer
69 views
Hi,
Please, check my code here:
http://trykendoui.telerik.com/Ipij/12

I try add on template variable <div>#=ds# </div> in function
 function change(e) {
   ds = e.page; }
But i see 0 on (0-2) pages and only 3 page variable chache

Can anyone help me?
Petyo
Telerik team
 answered on 10 Jun 2014
1 answer
113 views
Hello there.

I'm working in an implementation using SignalR and the Kendo Scheduler. When a new task is created (for exemple), the SchedulerDataSource transport send the connection hub id to the server as an additional parameter:

parameterMap: function (options, operation) {
   if (operation == "destroy" && options.models) {
      return JSON.stringify({ taskId: options.models[0].Id, callerId: $.connection.hub.id });
   }
   if (operation !== "read" && options.models) {
      return JSON.stringify({ tasks: options.models, callerId: $.connection.hub.id });
   }
}

The server do whatever it has to do, and send a notification to every other user, except de caller:

[HttpPost]
public JsonResult CreateTask(List<ScheduledEvent> tasks, string callerId)
{
   ...create task and other stuff

   //broadcast the newly created object to everyone except caller
   var hubContext = GlobalHost.ConnectionManager.GetHubContext<Notebooks.Hubs.SchedulerHub>();
   hubContext.Clients.AllExcept(callerId).UpdateSchedule(task);

   //return the object to caller
   return Json(task);
}

Once the other clients receive a new task from the hub, it is added to the SchedulerDataSource:

hub.client.updateSchedule = function (scheduledEvent) {
   schedulerDataSource.add(scheduledEvent);
}

Everything seems to work fine, and it really took me some time to realize this behavior: if a client have the scheduler window open, this window is closed once the schedulerDataSource is updated. This is expected or am I doing something wrong?
Vladimir Iliev
Telerik team
 answered on 10 Jun 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?