Telerik Forums
Kendo UI for jQuery Forum
0 answers
199 views
Hello,
I am using the Kendo UI ComboBox with an external, XML DataSource. Here's the DataSource code:

    try
        {
            var csDataSrc = new kendo.data.DataSource(
            {
                transport:
            {
                read: "Data/StateList.xml",
                dataType: "xml",
                create: { cache: true }
            },
            schema:
            {
                type: "xml",
                data: "/States/State",
                model:
                {
                    fields:
                    {
                        id: "id/text()",
                        name: "name/text()"
                    }
                }
            }
        });
        csDataSrc.read();
    }
    catch (err)
    {
        log.error(err.message);
    }


That creates the data source, here's the code that creates the kendo combobox:


    $("#stateList").kendoComboBox(
    {
   index: 0,
   placeholder: "Begin typing Coverage State...",
   dataTextField: "name",
   dataValueField: "id",
   filter: "contains",
   dataSource: csDataSrc,
   text: $("#hdnStateName").val(),
   value: $("#hdnStateKey").val(),
   change: function(e)
   {
   $("#hdnStateKey").val(this.value());
   $("#hdnStateName").val(this.text());
   }
    });


This works really well but the data for the real list is enormous and I'd like to store it in local storage with something like this:
    localStorage.setItem("state_key", csDataSrc);
Then when the page loads instead of building and reading from the server side xml all the time, I'd like for it to be something like this:


    var csDataSrc = localStorage.getItem("state_key");
    if(csDataSrc === null)
    {
        // create the data source with the above code
        // and store it in localStorage.
    }
Then bind it here...


    ...kendoComboBox(
    {
        ...,
        .dataSource: csDataSrc,
        ...
    });


I create the data source fine, it seems to store correctly in localStorage but when you leave the page and come back the data source is always null.  I can see it using the resources tab of the Chrome developer tools but it won't bind to the combo box correctly.
Any help or if I need to elaborate on anything to make this clearer please let me know


Thanks
-s

Sean
Top achievements
Rank 1
 asked on 19 Oct 2012
0 answers
136 views
I have a grid that has one column with checkbox.It uses batch editing to save the changes. I need to make cells editable/uneditable  in the row when checkbox in that row is checked/unchecked.

Thanks,
Sanjeev
Sanjeev
Top achievements
Rank 1
 asked on 19 Oct 2012
0 answers
83 views
Unable to get value of the property 'get': object is null or undefined

A very similar issue is reproduceable on IE9 with this example http://jsfiddle.net/rniemeyer/UgUVK/


 IE9 version 9.0.8112.XX
niall
Top achievements
Rank 1
 asked on 19 Oct 2012
3 answers
285 views
Hi,
I can't print grid with css style.
I need print a information and haven't positive result.
Helpme Please!

Thanks.
Dimo
Telerik team
 answered on 19 Oct 2012
0 answers
96 views
I am using the mobile button widget, but tweaking the style. Running in Chrome on the desktop (w/ iPad user agent) the button does not draw a box shadow, which is what I want. Running on the iPad simulator or actual device, there is a border around the button. If I use the remote inspector in Safari to play with styles, I can turn the box-shadow off, as shown/defined here, and it looks and works fine:

.km-ios .km-button {
    ...
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
    -webkit-box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
}

So when I define a custom style to override this, it removes the border but I lose the highlight feedback on touch/tap of the button. I've defined the custom style like this:

#tasklist .km-button {
    box-shadow: none;
    -webkit-box-shadow: none;
}

I've also tried redefining it as the same box-shadow values except not "inset". Same result. Any ideas?
Dennis
Top achievements
Rank 1
 asked on 19 Oct 2012
1 answer
1.0K+ views
If I have a <th> element that has text where the first character is a numeric value (e.g. '1 Title'), the attempt to create a KendoGrid from the table fails.  For example, the following code fails, but if I replace '1 Title' with something like 'A1 Title', it works.  Is it suppose to work that way?

<
table id='OneTable'>
  <thead>
    <tr>
      <th>One Title</th>
      <th>1 Title</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>One Data</td>
      <td>1 Data</td>
    </tr>               
  </tbody>
</table>
 
<script type="text/javascript">
    $(document).ready(function () {
        $('#OneTable').kendoGrid();
    });
</script>
Dimo
Telerik team
 answered on 19 Oct 2012
4 answers
450 views
Maybe I missed this in the documentation but can I declare the absolute width for the legend? It does not seem to work well with my defined width of the chart and items get cut off. How does the legend decide when to drop items to another line? Can I control this?
Oscar
Top achievements
Rank 1
 answered on 19 Oct 2012
16 answers
1.3K+ views
Maybe I am missing something basic, once I set up the application, i'd like to navigate to a view programatically (e.g. if the user isn't logged in, I want to navigate to the login view). Is this possible?
Daní
Top achievements
Rank 1
 answered on 19 Oct 2012
6 answers
383 views
Using the new release, I enabled inline editing mode. Everything works well except that the row should remain in editing mode if there's an error performing an update to the server. Right now it just changes back to view mode. There should really be some method of displaying server-side errors in this scenario, but I'd be happy to just have it not switch out of editing mode, which gives the wrong impression that the update succeeded.
Vivi
Top achievements
Rank 1
 answered on 19 Oct 2012
1 answer
225 views
Hi,

I'm attempting to unit test(using Jasmine) an angular directive containing a call to jquery('element').kendoAutoComplete(...). We are using jstestdriver to launch our unit tests in a chrome browser, and this also allows us to breakpoint the javascript and create watch expressions.
We have added the kendo.all.min.js and kendo.core.js scripts to the jsTestDriver configuration and they are visible when the browser is open during the unit test runs.
My problem is, that at the point of creating the xyz = new kendo.data.DataSource(...) the DataSource has not been initialized and is tripping up my unit tests. I am able to create a watch expression(in Chrome) on the kendo.data portion, so it seems that some of kendo is loading and working. We do have other tests running on things like the kendoDatePicker and those run fine.

I have tried searching for ways to mock out the DataSource, but it would help if I could see the code behind the object to know what needs to be mocked however I have been unsuccessful in finding the source for the kendo DataSource object(can someone help me with this?).

The actual code evaluates properly when deployed in the main application and doesnt have this issue. Could this be as a result of the DataSource not being attached due to missing code/a missing function call? Is there some way of me manually getting it to be attached?
Keir
Top achievements
Rank 1
 answered on 19 Oct 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
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
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?