Telerik Forums
Kendo UI for jQuery Forum
1 answer
932 views

I am replacing a webforms grid with the Kendo UI Grid and have come across an odd situation. We have a column that contains 2 pieces of information (Created By and Created Date). I initially set up the column with a template that includes both pieces

<td>
    <div>{{::dataItem.created | date: 'short'}}</div>
    <div>{{::dataItem.createdby.fullname}}</div>
</td>

and then set up the column in the columns array as

{
    field: 'created',
    title: 'Created Date<br/>User',
    width: '110px',
}

This works fine and sorts on the created date. However, the current webforms grid targets the sort based on where in the header the user clicks. If they click on 'Created Date', it sorts by created. If they click on 'User', it sorts by createdby.

I have seen a few posts on rewriting the column header, but I am not sure what to put in the <a> tag to distinguish between the created and createdby sorts. When I try to change it with something like

var newHeader = '<div ng-click="vm.sortCreated(created);">Created Date</div>' +
    '<div ng-click="vm.sortCreated(createdby);">User</div>';
var colHeader = $('#myGrid th[data-field=created]');
colHeader.html(newHeader);

I end up showing all of the html tags and the click events don't work.

Is this possible to do, or do I need to just create 2 separate columns? Thanks!

Konstantin Dikov
Telerik team
 answered on 13 Mar 2017
1 answer
525 views
Is it possible with the Dialog widget to load the content with AJAX request like the Window widget?
Ivan Danchev
Telerik team
 answered on 13 Mar 2017
5 answers
652 views

Is there a way to create a heat map kind of visualization over geojson map layers in kendo map

for eg something like this :

 

Alex Hajigeorgieva
Telerik team
 answered on 10 Mar 2017
1 answer
1.3K+ views

I have the following switch that retrieves the group by dropdown selected value:

 

                  switch (groupValue) {
                case "1":
                    groupField = { field : "GroupByEvent"};
                    break;
                case "2":
                    groupField = { field: "GroupByHorse" };
                    break;
                case "3":
                    groupField = { field: "ProductName" };
                      alert(groupField.field);
                    break;
                case "4":
                    groupField = {field: "GroupByPaymentMethod"};
                    brak;
                default:
                    groupField = { field: null };
                    break;
                      
            }

 

how can I change the kendo grid group by according to the case? (default means no grouping)

 

 $("#grid").kendoGrid({
                        dataSource: {
                            transport: {
                                read: {
                                    url: "https://demos.telerik.com/kendo-ui/service/Products",
                                    dataType: "jsonp"
                                }
                            },
                            pageSize: 5,
                         
                            group: {
                                groupField ???
                            }
                         },

Tsvetina
Telerik team
 answered on 10 Mar 2017
2 answers
256 views

I am working on a search page where search results will get displayed in a grid. I have a search button that will trigger the to execute http call to the server to retrieve the data. However, only when for the first time search button clicked request gets sent once, every subsequent click two requests are being sent. I am out of ideas what is causing this.
Here is the code that gets executed once each time search button is clicked:

$scope.gridData = new kendo.data.DataSource({ transport: { read: function (e) { $http.post('/Provider/ProviderSearchResult', angular.toJson(dataTransferObject)) .then(function success(response) { e.success(response.data); console.log("success: " + response.data); }, function error(response) { alert('something went wrong') console.log("error: " + response); }) }, }, pageSize: 10, sort: { field: "rating", dir: "desc" }, });

Any help would be appreciated. Thank you.

Irmantas
Top achievements
Rank 1
 answered on 10 Mar 2017
1 answer
170 views

Hi Guys, I'm wondering if the desktop widgets support flexbox?  Can you point me towards any documentation?

I'm debating moving to the Bootstrap 4 Alpha, which has been redesigned to use Flexbox.

Thanks

marc

Ivan Zhekov
Telerik team
 answered on 10 Mar 2017
1 answer
597 views
Hello,

I'm experimenting with the Kendo Grid's filtering API function. I'm wondering if the API has any functionality for taking in an SQL string for filtering, at least a WHERE clause. Something like the following:

        $('#kendoGrid').data('kendoGrid').dataSource.filter('WHERE status = N');

Thank you.
Stefan
Telerik team
 answered on 10 Mar 2017
10 answers
2.0K+ views
I have a MVC Grid which is loading fine on the initial load. It uses the following code:

.DataSource(dataSource => dataSource 
        .Ajax()
        .PageSize(100)
    .Read(read => read.Action("AccountByType", "Organization", new { AccountType = 1 }))
)

I can successfully refresh the grid by calling the following:

$("#AccountGrid").data("kendoGrid").dataSource.read();

However, I need to change the query value that is passed in based on different selections the user makes on the page. So for example, I need to change the AccountType from 1 to 2 and refresh the grid. I tried the following:

$("#AccountGrid").data("kendoGrid").dataSource.options.transport.read.url = "/Organization/AccountByType?AccountType=2";
$("#AccountGrid").data("kendoGrid").dataSource.read()

But it doesn't work. Any suggestions on how to make this work?



Stefan
Telerik team
 answered on 10 Mar 2017
8 answers
681 views

Hi,

I want something like progress bar in each cell. Please see attachment. so let say in my cell, i show something like 100/1000 (i.e 10%) then a small progress bar should be shown under the value of cell. please see attachment's "Total" column. also it should be dynamically changing. so lets say user changes some value in other cell and due to this, at client side, the total becomes (200/1000) then progress bar should be changed accordingly.

if its not provided by telerik, can you please guide how to achieve the same.

Alex Hajigeorgieva
Telerik team
 answered on 10 Mar 2017
10 answers
317 views

I have a spreadsheet, with a datasource which retches remote data. When I sort the spreadsheet and edit row 2 (which was originally row 100), the datsource thinks that I have edited row 100. Is there a solution to this?

Marc

Marc
Top achievements
Rank 1
 answered on 10 Mar 2017
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?