Telerik Forums
Kendo UI for jQuery Forum
4 answers
1.2K+ views

I have a number of Drop Downs on a page, each representing a separate asset with their own identifier.  The drop down options for each of these lists should be populated using an AJAX call to a service page that I have written which expects to be sent the identifier in the request.  Here is a stripped down version of the code: 

<script language="JavaScript">
 
$(document).ready(function() { 
 
$(".id_select").kendoDropDownList({
    dataTextField: "name",
    dataValueField: "my_id",
    dataSource: {
        transport: {
            read: {
                url: "service_page.cfm",
                data: {
                    identifier: ????
                }
            }
        }
    }
});
 
});
     
</script>
 
<html>
 
<input name="id_ABC" id="id_ABC" data-identifier="ABC" class="id_select"></input>
 
<input name="id_DEF" id="id_DEF" data-identifier="DEF" class="id_select"></input>
 
<input name="id_GHI" id="id_GHI" data-identifier="GHI" class="id_select"></input>
 
<input name="id_JKL" id="id_JKL" data-identifier="JKL" class="id_select"></input>
     
</html>

 

 

So what I want is when each input is instantiated as a KendoDropDownList for the DataSource's Read to be executed for each of the inputs with class "id_select" and sent the value of that input's particular "data-identifier" value (where I have put the ????'s in the example above).  However I don't see any way to reference the data for the particular input from within the inline DataSource.  

I have tried making the transport.read a function, using a parameterMap and anything else I could think of to throw at this.  I'm beginning to wonder whether this is possible at all. 

 

Thank you,

Matt

 

Eyup
Telerik team
 answered on 09 Nov 2018
6 answers
651 views

I have the following function which works perfectly in Chrome but not IE11.

 

kendo.drawing.drawDOM($(".pagePDF"), { forcePageBreak: ".page-break" })
        .then(function (group) {
            var PAGE_RECT = new kendo.geometry.Rect([0, 0], [mm(215.9 - 25), mm(279.4 - 25)]);
 
            var content = new kendo.drawing.Group();
            content.append(group);
 
            //kendo.drawing.align(content, PAGE_RECT);
            kendo.drawing.fit(content, PAGE_RECT);
            kendo.drawing.pdf.saveAs(group, $("#Nom").val() + ".pdf");
             
            return kendo.drawing.exportPDF(content, {
                paperSize: "Letter",
                margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" },
                Landscape:true                   
            });
        })

 

It starts working in IE11 if I take out the forcePageBreak. If there are any properties, the "then" instruction is never executed. There is just nothing happening.

And, again, it is working fine in Chrome.

 

Can anybody help me with this problem?

Thanks in advance!

Erwin
Top achievements
Rank 1
 answered on 08 Nov 2018
5 answers
1.8K+ views

Hello Telerik,

I'm currently trying to get some columns in a KendoUI Grid to display a value OTHER than the value I want to pass in the "read" function to use in filtering the servery side query.  Right now all the other columns are using the actual displayed value to pass back to the filtering query on the backend.  So we're frequently using strings like "John Doe, Jane Doe" instead of a lstUserIDs "1,2" because we can't seem to get filtering functions to pass the id values instead of display values.  Here's a sample of the actual case in question.  I wasn't able to determine from the serverside demo in the docs how this might be accomplished, or even if it could.  

With the column configured as below, I end up with an error "VM8499:3 Uncaught ReferenceError: asset_class_nm is not defined".  Changing the inner field to "asset_class_nm" works, but then I again have a text list of the names instead of the list of internal bigint IDs that I'd like.  Thanks!

,{         
                    field: "asset_class_nm",
                    title: "Asset Class",
                    attributes: {
                        style: "text-align: left;"
                    },
                    filterable: {
                        dataSource: {
                                transport: {
                                    read: {
                                        url: "srv_get_asset_classes.cfm",
                                        dataType:"json",
                                        data: {
                                            field: "asset_class_id"
                                        }
                                    }
                                }
                        },
                        multi: true
                    }
                }
Alex Hajigeorgieva
Telerik team
 answered on 08 Nov 2018
1 answer
117 views

hello,

i'm trying to Integrate kendoDraggable with kendoSortable (inside ListView)

here is an example : https://dojo.telerik.com/iZOfuNoW

 

i want to drag a button and drop it inside Sortable ListView 

Tsvetina
Telerik team
 answered on 07 Nov 2018
1 answer
619 views

My dropdownlist is absolutely fine until if surround it with an MVC if statement. It then becomes invisible, while the text around it is visible.

Before Adding If

  <b>Central Hub</b>
         
  @(Html.Kendo().DropDownList()
      .Name("postcodeServiceExclusionsHubSelector")
      .HtmlAttributes(new { style = "width: 70px;" })
      .DataTextField("DepotNumber")
      .DataValueField("DepotID")
      .BindTo(Model.CentralHubs)
      .OptionLabel("Select...")
)

After Adding MVC If Statement

@if (Model.CanSelectCentralHub)
{
    @:<b>Central Hub</b>
    @:      
    Html.Kendo().DropDownList()
        .Name("postcodeServiceExclusionsHubSelector")
        .HtmlAttributes(new { style = "width: 70px;" })
        .DataTextField("DepotNumber")
        .DataValueField("DepotID")
        .BindTo(Model.CentralHubs)
        .OptionLabel("Select...");
     
    @:            
}

 

Dimitar
Telerik team
 answered on 07 Nov 2018
1 answer
206 views
I use  MultiColumnComboBox with MVVM  but I can't filter multi column. I tried filterFields and data-filterFields  attribute  but could not run . Source code is below. 
Thanks for your help

<input data-role="multicolumncombobox"
                   data-filter="contains"
                   data-filterFields= "[ProductName, ProductID]"
                   data-placeholder="Type a product e.g. 'Chai'"
                   data-text-field="ProductName"
                   data-value-field="ProductID"
                   data-columns="[
                   {field: 'ProductID', title: 'Urun Kodu'},
                   {field: 'ProductName', title: 'Urun Adı'}
                   ]"
                   data-bind="value: selectedProduct,
                              source: products
                              }"
                   style="width: 100%" />
Plamen
Telerik team
 answered on 06 Nov 2018
1 answer
211 views

I use  MultiColumnComboBox with MVVM  but I can't filter multi column. I tried filterFields and data-filterFields  attribute  but could not run . Source code is below. 

Thanks for your help

 

<input data-role="multicolumncombobox"
                   data-filter="contains"
                   data-filterFields= "[ProductName, ProductID]"
                   data-placeholder="Type a product e.g. 'Chai'"
                   data-text-field="ProductName"
                   data-value-field="ProductID"
                   data-columns="[
                   {field: 'ProductID', title: 'Urun Kodu'},
                   {field: 'ProductName', title: 'Urun Adı'}
                   ]"
                   data-bind="value: selectedProduct,
                              source: products
                              }"
                   style="width: 100%" />

Plamen
Telerik team
 answered on 06 Nov 2018
6 answers
371 views

Hi,

 

Is there any way that I can load the column settings of kendo grid using an XML. I will have the columns settings such as Column Name, width, visibility,order of display saved in a form of an XML some where in the configuration. User can manipulate the XML based on how he want to view the columns, so he has the complete command on which columns to display and in what order. There is always an option of reading the XML, form a Array of objects and assign it to "columns" property in the grid.

But is there any way that I can read that XML directly from a source and load or assign it to property so that my job gets easier?

 

Thanks,

Sag

Konstantin Dikov
Telerik team
 answered on 06 Nov 2018
3 answers
288 views

Hi!

I am attempting to add required validation to a text cell.

Here's a demo attempt: https://dojo.telerik.com/uPoZUgAy/3

I only succeed if I uncomment the function in the "from" property, otherwise it crashes. 

The fix I found is probably a hack-y approach, so I am opening this thread to find the recommended approach for my situation...

 

Thanks!

Marin Bratanov
Telerik team
 answered on 06 Nov 2018
1 answer
4.8K+ views
I have a grid (integrated into ember/javascript) with an ajax response assigned as its datasource. Based on the response I can come up with my column title and width and i want to assign that to my grid. But everything i do i dont see any change reflected to the grid. I was wondering how i can change column properties after grid initialization.
Konstantin Dikov
Telerik team
 answered on 05 Nov 2018
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?