Telerik Forums
Kendo UI for jQuery Forum
1 answer
94 views
<transfered to UserVoice>
Dimo
Telerik team
 answered on 05 Jul 2012
1 answer
104 views
To get data from remote web-service for my grid I have to login and get sessionID.
Ok I can pass this sessionID 
read: {
url: someurl,
                                    data: {
                                        action: "GetList",
                                        sessionID: Auth.sessionID,
                                    }, 
                                    type: "POST",
                                },

The problem is that this  sessionID have rather short lifetime. In other words it can expire while a user work with my grid.
So I have to relogin sometimes(if web-servers tells me "session is expired").

Is there an elegant way to intercept such auth error from my server and resend failed call?
Alexander Valchev
Telerik team
 answered on 05 Jul 2012
3 answers
289 views
Are other people noticing this:

I have a Grid with         selectable:"multiple, row", and pageable set to true. When there are multiple pages, the selections that I made on page 1, will disapear (no longer be highlighted in blue) when I switch to page 2, and then back to page 1.

However, this is only a visual bug. calling .clearSelections()  or .select() with no parameters will still find all the ones that are selected.

In addition. Let's say that I have 300 rows, at 30 items per row. If do a:

grid.select(grid.tbody.find(">tr[data-uid]"));
console.debug("Selected all " + grid.select().length);

then I see that 300 items were selected. But visually on the items on the page that is displaying will get the blue highlight. None of the other pages visually show that they are selected.

Rosen
Telerik team
 answered on 05 Jul 2012
3 answers
442 views

Hi,

Just sampling your UI and it seems to be just what I am after. I have tried as the first project to use a combo box. Firstly I got the box working using your example on my site, now I am trying to bind a JSON data source to it.

the box initializes OK, but the values are filled with "undefined".

The code used to start the box is as follows:

<script type="text/javascript">
$(document).ready(function() {
    $("#titles").kendoComboBox({
        index: 0,
        dataTextField: "name",
        dataValueField: "value",
        filter: "q",
        dataSource: {
            type: "json",
            serverFiltering: true,
            serverPaging: true,
            pageSize: 20,
            transport: {
                read: "http://www.xxxxxxxxxx.net/kendo_getjson5.php"
            }
        }
    });
});
        
</script>

The data being returned by the script is as below. i am not sure what the top level element in the JSON should be>? I set it to dataSource? Maybe this is the problem?
Also my script accepts a query string with q= , so the filter should be set to q?

Also its not reading cross domain, its all on the same domain, so json is the correct type?

{"dataSource":[ {"value":"1366","name":"TAD1341GE "},{"value":"1367","name":"TAD1342GE "},{"value":"1368","name":"TAD1343GE "},{"value":"1369","name":"TAD1344GE "},{"value":"1370","name":"TAD1345GE "},{"value":"943","name":"TAD1640GE "},{"value":"944","name":"TAD1641GE "},{"value":"945","name":"TAD1642GE "},{"value":"1254","name":"TAD531GE "},{"value":"1255","name":"TAD532GE "}]}


Regards and TIA

Charlie

I have checked my datasournce with JSONLint to make sure its valid.

James Shelton Agar
Top achievements
Rank 2
 answered on 04 Jul 2012
4 answers
176 views
Hi,

I am trying to add a new row to a grid using the inline editor. One of the columns is a drop down list. I think it is setup properly. When the drop down list control loses focus, the cell reverts from the text value to the option value. How do you structure the drop down list to keep the text and not replace the cell with the value?

function vendorDropDownEditor(container, options) {
  $('<input data-text-field="name" data-value-field="id" data-bind="value:' + options.field + '"/>')
    .appendTo(container)
    .kendoDropDownList({
      dataTextField: "name",
      dataValueField: "id",
      autoBind: false,
      dataSource: [{"id":1,"name":"aaa"},{"id":2,"name":"bbb"},{"id":3,"name":"ccc"},{"id":4,"name":"ddd"},{"id":5,"name":"eee"},{"id":6,"name":"fff"}]
  });
}

Any tips on why the drop down leaves the value behind and not the text much appreciated. 


Jose
Top achievements
Rank 1
 answered on 04 Jul 2012
2 answers
553 views
I have used the following trick (which I saw in this forum) to create Kendo windows that have no <div id='xxxx'> in the HTML source. But it is not working for ListViews:

$("<div id='ColumnNamesTMP' />").kendoListView({
     dataSource: dataSource,
     pageable: false,
     dataBound: function(e) {
         var html = $("#ColumnNamesTMP").html();
         GridData.columnChooser.content(html);
     },
     template:kendo.template(template)
 });
The dataBound function is never being called.

However, if I add  <div id="ColumnNames" style="visibility: hidden;"/> to the source HTML file, then the dataBound function is called and GridData.columnChooser (which is a kendoWindow) has it's contents filled in. But as you see I have to go and use jQuery to rip out the <DIV> from the DOM:

$("#ColumnNames").kendoListView({
    dataSource: dataSource,
    pageable: false,
    dataBound: function(e) {
        var html = $("#ColumnNames").html();
        $("#ColumnNames").remove();
        GridData.columnChooser.content(html);
    },
    template:kendo.template(template)
});

I can use http://handlebarsjs.com to do this sort of template generation of HTML, but I am looking for a KENDO only solution if possible.

If you are wondering why I want to completely dynamically created kendoList, the answer is that the the list is going to be placed in a kendoWindow that is also created on the fly and added to the DOM:

$("<div id='colChooser'/>").kendoWindow({
    actions:["Maximize", "Minimize", "Close"],
    width:"14em",
    height:"25em",
    title:"Choose Columns",
    modal:true
});
GridData.columnChooser = $("#colChooser").data("kendoWindow");

the content will be filled in later with:
GridData.columnChooser.content(html);







Dr.YSG
Top achievements
Rank 2
 answered on 04 Jul 2012
3 answers
760 views
Setting step for a NumericTextBox seems to only affect the behaviour of the spinners.
"Manual" user input is not validated, so the user can enter numerals that aren't multiples of the step value.
Neither does using a Kendo Validator work.

See this fiddle:

http://jsfiddle.net/Ns6sd/2/ 
Alexander Valchev
Telerik team
 answered on 04 Jul 2012
0 answers
58 views

In the kendo.grid.js I can see a line:

html += kendo.attr("title") + '="' + th.title.replace(/'/g, "\'") + '" '

Please look at replace part. It replaces apos with apos.
I think your intention was to handle quot.

Thanks.

 

 

Vladimir
Top achievements
Rank 1
 asked on 04 Jul 2012
5 answers
266 views
Hi,

I am having a table with three columns Id,name and Bit
I want to display the names of the tabstrip from the name column which contains some names
and the i want to display the content also based on the bit filed the bit filed is a boolean value
i.e either true or false.If the bit filed is 0 i want to display some content and if the bit field is 1 i want
to display another content.And i am trying to do this entire process dynamically.

Is it possible using kendoUI,please provide me sample or examples

Thanks
Alexander Valchev
Telerik team
 answered on 04 Jul 2012
2 answers
206 views
 I have problem with de popup editable i have the next code is equals that example to kendo,but does not work:

<div id="example" class="k-content">
      <div id="grid">
      </div>
      <script type="text/javascript">
            $(document).ready(function () {
                  var crudServiceBaseUrl = "http://demos.kendoui.com/service",
                        dataSource = new kendo.data.DataSource({
                              transport: {
                                    read: {
                                          url: crudServiceBaseUrl + "/Products",
                                          dataType: "jsonp"
                                    },
                                    update: {
                                          url: crudServiceBaseUrl + "/Products/Update",
                                          dataType: "jsonp"
                                    },
                                    destroy: {
                                          url: crudServiceBaseUrl + "/Products/Destroy",
                                          dataType: "jsonp"
                                    },
                                    create: {
                                          url: crudServiceBaseUrl + "/Products/Create",
                                          dataType: "jsonp"
                                    },
                                    parameterMap: function (options, operation) {
                                          debugger;
                                          if (operation !== "read" && options.models) {
                                                return { models: kendo.stringify(options.models) };
                                          }
                                    }
                              },
                              batch: true,
                              pageSize: 30,
                              schema: {
                                    model: {
                                          id: "ProductID",
                                          fields: {
                                                ProductID: { editable: false, nullable: true },
                                                ProductName: { validation: { required: true} },
                                                UnitPrice: { type: "number", validation: { required: true, min: 1} },
                                                Discontinued: { type: "boolean" },
                                                UnitsInStock: { type: "number", validation: { min: 0, required: true} }
                                          }
                                    }
                              }
                        });


                  $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        columns: [
                            { field: "ProductName", title: "Product Name" },
                            { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "150px" },
                            { field: "UnitsInStock", title: "Units In Stock", width: "150px" },
                            { field: "Discontinued", width: "100px" },
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "210px"}],
                        editable: "popup"
                  });
            });
      </script>
</div>
look at the  image , the file attached, the popup does not work, 

Trevor
Top achievements
Rank 1
 answered on 04 Jul 2012
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
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
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?