Telerik Forums
Kendo UI for jQuery Forum
3 answers
419 views

On my website I have three charts of type "Bar" displayed side by side. Each chart has a different count of data. What I like to achieve:

1. each chart area should have the same height no matter if there are 1 or 10 bars in it

2. the bars should align on top, not center inside the chart area

How can I achieve that?

Regards
Heiko

Tsvetina
Telerik team
 answered on 10 May 2019
2 answers
1.8K+ views

Hi

I'm trying to enable/disable a button base on the datepicker value. If I pick the value from the calendar the change event triggers perfectly fine but if I clear the textbox selecting the value and hit "backspace" the change event trigger only if I click out the control. Here is what I have now. I will appreciate your help, Thank you in advance.

$('#dtpDOB, #dtpEffDate, #dtpRecDate').kendoDatePicker({
format: "MM/dd/yyyy",
change: paramChange
});

function paramChange()
{
var count = 0;
var dtpDOB = $("#dtpDOB").data("kendoDatePicker");
var dtpRecDate = $("#dtpRecDate").data("kendoDatePicker");
var dtpEffDate = $("#dtpEffDate").data("kendoDatePicker");
var button = $("#btnSearch").data("kendoButton");

if (dtpDOB.value() !== null)
count += 1;        
if (dtpRecDate.value() !== null)
count += 1;
if (dtpEffDate.value() !== null)
count += 1;

if(count >= 2)
button.enable(true);
else
button.enable(false);
}

Claudia
Top achievements
Rank 1
 answered on 10 May 2019
1 answer
117 views

Hi everyone, I've a scheduler with 2 different resources: buildings and classes.

a building is like this:

{ id: 1, name: "house A" }

 

a class is like this:

{ id: 1, name: "class A", buildingId: 1 }

 

Now, classes is a "subresource" of buildings, can I group the 2 resources so that for each building i see only the related classes?

 

I hope you can help me.

 

David

Veselin Tsvetanov
Telerik team
 answered on 10 May 2019
6 answers
856 views

Hi,

This Gantt in has Custom Field called "actualStart".
The default value of this field is null, but the view at this time want to blank rather than a "null" string.
Do you have any way?

 

actualStart: {
    from: "actualStart",
    type: "date",
    defaultValue: null
},
....
 
columns: [
    { field: "title", title: "title" },
    { field: "actualStart", title: "actualStart", format: "{0:d}" },
],

thanks.

Boyan
Top achievements
Rank 1
 answered on 10 May 2019
3 answers
336 views
i want to have a grid,which i can see the filters in left pane,then by draging and droping those filter,my grid filters accordingly ,is there such an option?
Tsvetina
Telerik team
 answered on 09 May 2019
1 answer
86 views

Hi, 

i would like to know whether the logic in kendo.date.weekInyear() method consider the browser local when calculating the week number. 

Because the first day of the first week does not always fall on the first day of the year
For example, in the US, the week that contains Jan 1 is always the first week. In the US, weeks also start on Sunday. If Jan 1 was a Monday, Dec 31 would belong to the same week as Jan 1, and thus the same week-year as Jan 1. Dec 30 would have a different week-year than Dec 31.

And i know that we can pass a parameter to kendo.date.weekInyear() method for weekStart(number between 0 to 6), If you consider browser local in method logic, how ti will behave once we also input weekStart as a paramter?

Veselin Tsvetanov
Telerik team
 answered on 09 May 2019
2 answers
1.1K+ views
I'm trying to set up a grid similar to the one you have in the demos. However, I only want to allow users to create new entries or delete existing entries. I've tried removing "edit" as an option, set editable: { update: false } in the configuration, and have not yet found a way to achieve my goal. Each of these attempts typically results in the newly added row (for a new entry) showing only the Delete button. The Update and Cancel buttons are not shown.

I finally noticed this thread discussing how to remove buttons in the onDataBound event, and I was able to get this to work: http://dojo.telerik.com/UhATo. Is that a good approach, or do you recommend a better way?

Thanks!
krishnaveni
Top achievements
Rank 1
 answered on 08 May 2019
16 answers
2.4K+ views
How do you set a Kendo menu item to open in a new window?
Dimitar
Telerik team
 answered on 08 May 2019
3 answers
549 views

Hello,

I have a problem in my angular Kendo Grid not passing specified values to the controller.

This problem is very similar to these posts but the solutions didn't make a difference.

http://www.telerik.com/forums/how-do-i-use-the-datasourcerequest-object-as-an-asp-net-mvc-action-parameter

and

http://www.telerik.com/forums/datasourcerequest-sort-is-null

 

Here is the description:

 

I am so close and yet so far...
I am using an angular kendo grid with MVC end point for data. I have no problem getting the data to show so then I moved on to paging. Client side paging works but since the record count is high I would prefer serverside paging.

This is where I am missing something. My grid displays "Showing 1-5 of 18" so it is somehow parsing the count for the grid legend but the actual grid shows all 18 rows??

my _layout has among other files:

<script src="@Url.Content("~/Scripts/kendo/2016.1.412/kendo.aspnetmvc.min.js")"></script>

 

my grid:

$("<div/>").appendTo(e.detailCell).kendoGrid({
                dataSource: {
                    transport: {
                        read: function (f) {
                            $http.get('http://localhost:59722/SCat/GetSubCategories?categoryid=' + e.data.Id).
                            success(function (data, status, headers, config) {
                            f.success(data)
                            }).
                            error(function (data, status, headers, config) {
                            alert('something went wrong with subCategories')
                            console.log(status);
                            });
                        },
                        create: function (c) {
                            alert('adf');
                            $http.post('http://localhost:59722/Cat/AddNewSubCategory').
                            success(function (data, status, headers, config) {
                            f.success(data)
                            }).
                            error(function (data, status, headers, config) {
                            alert('something went wrong with update')
                            console.log(status);
                        });
                        }
                    },
                    pageSize: 5,
                    serverPaging: true,
                    serverFiltering: true,
                    schema: {
                        data: "Data",
                        total: "Total",
                        errors: "Errors"
                    }
                },
                pageable: true,
                filterable: true,
                editable: "inline",
                toolbar: ["create"],
                columns: [
                    { field: "SubCategoryName", title: "Category Name" },
                    { field: "SCategoryId", title: "Parent Id" },
                    { command: ["edit"]}
                ]
            })
        }
 
    })

 

MVC Action:

public async Task<JsonResult> GetSubCategories([DataSourceRequest] DataSourceRequest request,  int? categoryid)
{
        int categoryId = categoryid ?? -9999;
        if (categoryId == -9999)
        { return Json("[{Error -9999 for categoryId}]"); }
 
 
        HttpResponseMessage responseMessage = await client.GetAsync(url + "/" + categoryId);
        if (responseMessage.IsSuccessStatusCode)
        {
            var responseData = responseMessage.Content.ReadAsStringAsync().Result;
            var x = JsonConvert.DeserializeObject<List<SubCategories>>(responseData);
 
            return Json(x.ToDataSourceResult(request) , JsonRequestBehavior.AllowGet);
 
        }
 
        return Json("[{Error}]");
     }

 

Fiddler 200 json

{ "Data":[
    {"Id":1,"SubCategoryName":"asdfe","CategoryId":1},
    {"Id":3,"SubCategoryName":"Self-Righteousness","CategoryId":1},
    ...removed brevity...
    {"Id":18,"SubCategoryName":"Viuyhj","CategoryId":1}
    {"Id":19,"SubCategoryName":"zcxv","CategoryId":1}
    ],
"Total":18,
"AggregateResults":null,
"Errors":null}

Now I think I am missing something in my angular grid because my DataSourceRequest is ALWAYS full of default values.
Further if I explicitly assign the page value everything works.

public async Task<JsonResult> GetSubCategories([DataSourceRequest] DataSourceRequest request,  int? categoryid)
{
  request.PageSize = 5;
  ....snip
}

o it has something to do with my Angular grid but I'm missing what???

Boyan Dimitrov
Telerik team
 answered on 07 May 2019
11 answers
401 views
Reference this demo: http://demos.kendoui.com/web/mvvm/elements.html

Okay so when a checkbox is checked, the array gets updated right...

Then when the array changes, I need to fire off a callback to a service, AND update the checkbox by adding\removing a class.

What seems to happen is that the click event fires first, so the callback doesn't send back the proper values from the array (like I'm always one selected value behind).

?

Steve
Veselin Tsvetanov
Telerik team
 answered on 07 May 2019
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?