Telerik Forums
Kendo UI for jQuery Forum
6 answers
816 views
I understand you are providing in the next release the ability to sort columns, (I assume this means the user can sort column order in the Grid, correct?)

What about a column/field chooser? I have 16 columns and they are getting cluttered. I have been looking for a "visible" property in the column array (I have not found anything). Is there a best practice way to add/remove columns in code?

But also, it would be nice that if your are adding the sort column feature, to add a hide/show column or field chooser option.

Ramon
Top achievements
Rank 1
 answered on 30 Aug 2012
2 answers
149 views
Hello, dear Support

Let me ask you - how to handle event, like pageinit in JQMobile ? In general I need make someth like this: 
$('#div').live('pageinit', function() {
 alert ('event pageinit');
},400);

Richard
Top achievements
Rank 1
 answered on 30 Aug 2012
1 answer
136 views
I switched my app over to Kendo from Jquery Mobile. It works on the desktop but when I compile it for IOS or Android the javascript doesn't load at all. Any clue what could be causing this?
Richard
Top achievements
Rank 1
 answered on 30 Aug 2012
0 answers
54 views
hi

i was just wondering if it is possible to filter out the field it self rather than the value inside field?
for example, i might have 3 fields like lastname, firstname and address in the json file i read from.
and i only want to show lastname and address on my grid, is there are way to take out or remove a field?by command? 
Justin
Top achievements
Rank 1
 asked on 30 Aug 2012
2 answers
116 views
Hi,

Is there a way make the Save Changes, Cancel Changes buttons have state so they are only enabled when changes have been made?

Thanks

Chris



Christopher
Top achievements
Rank 1
 answered on 30 Aug 2012
1 answer
158 views
We are seeing a problem where the pagination numbers (page X of Y) and number of rows (1 - A of A items) are being formatted as decimals. See the attached screenshot. This appears to happen only when viewing the application in Internet Explorer.

Does anyone have any advice on what's causing this?
Ed
Top achievements
Rank 1
 answered on 29 Aug 2012
0 answers
47 views
Why PanelBar minimized if I turn on a particular item (link) in it? 
Igor
Top achievements
Rank 1
 asked on 29 Aug 2012
0 answers
66 views
 Sorry wrong
Igor
Top achievements
Rank 1
 asked on 29 Aug 2012
0 answers
112 views
I am using the MVC extensions for the Kendo grid and everytime i insert 1 record it goes through OK but then when i try to insert another record, any jQuery that i have on the page doesn't work. For instance i am using a Google map to populate latitude and longitude fields in the popup editor of the grid. The first time, i use jQuery to populate the textboxes and the it works fine, but when i insert that record and try to insert another record after that, the same jQuery functions do not work anymore. Any ideas?
michal
Top achievements
Rank 1
 asked on 29 Aug 2012
2 answers
737 views
Please help ... 
[1] at the beginning, I create an index.htm file, the template is also defined in the same file.
It works perfectly!!! but the problem is in the second part....

<div id="mydiv">
    <div id="listView" data-role="listview" data-editable="true" data-template="my-template"
         data-bind="source: MySource">
    </div>
</div>
 
<script id="my-template" type="text/x-kendo-template">
    <div>${Status}</div>
    <div>
 
      # if (Status.toUpperCase() == "SINGLE"){#
 
            <img src="imgs/black_acs.png" alt="black_acs image" />
 
      #}else if (Status.toUpperCase() == "MARRIED"){#
 
            <img src="imgs/blue_acs.png" alt="blue_acs image" />
 
       #}else if (Status.toUpperCase() == "OTHER"){#
 
             <img src="imgs/red_acs.png" alt="red_acs image" />
 
       #}#
 
    </div>
</script>
 
<script>
$(document).ready(function ()
            {
        var viewModel = kendo.observable({
           MySource: new kendo.data.DataSource({  // name and status
            transport: {
                      read: {
                        url: "http://xxx.com/REST.VN/AService/GetData",
                        type: "GET",
                        dataType: "json",
                        contentType: "application/json; charset=utf-8",
                        data: function ()
                            {
                                    var jsonParameters = {};
                                jsonParameters.parameter = "XXX";
                                    return jsonParameters;
                            }
                }
             }
        });
 
    kendo.bind($("#mydiv"), viewModel);
});
 
</script>


[2] ... after that, I decide to move the template as external file so that it can be reused by other pages.
I create another file called: template1.tmpl.htm 
This is the content in the file. 
<script id="my-template" type="text/x-kendo-template">
    <div>${Status}</div>
    <div>
 
      # if (Status.toUpperCase() == "SINGLE"){#
 
            <img src="imgs/black_acs.png" alt="black_acs image" />
 
      #}else if (Status.toUpperCase() == "MARRIED"){#
 
            <img src="imgs/blue_acs.png" alt="blue_acs image" />
 
       #}else if (Status.toUpperCase() == "OTHER"){#
 
             <img src="imgs/red_acs.png" alt="red_acs image" />
 
       #}#
 
    </div>
</script>


In the index.html, I create a template loader function as suggested in http://docs.kendoui.com/howto/load-templates-external-files 
on the top of the page: <script src="templateLoader.js"></script>

At the script section, I modify:
<script>
 
$(document).bind("TEMPLATE_LOADED", function (e, data) {
                _itemTemplate = kendo.template($("#my-template").html(), { useWithBlock: false });
                _itemTemplate(data);
                bindMe();
            });
 
$(document).ready(function ()
           {
        templateLoader.loadExtTemplate("template1.tmpl.htm");
            });
 
function bindMe()
{
     var viewModel = kendo.observable({
           MySource: new kendo.data.DataSource({  // name and status
            transport: {
            read: {
            url: "http://xxx.com/REST.VN/AService/GetData",
            type: "GET",
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            data: function ()
                {
                    var jsonParameters = {};
                    jsonParameters.parameter = "XXX";
                return jsonParameters;
                }
            }
         }
    });
 
    kendo.bind($("#mydiv"), viewModel);
}
 
</script>




The result is not showing at all.....
I thought it is not loading the template, so I start debugging. The template is loaded.
(I won't think it is a data issue because it works fine when the template is on the same file.)


Then .... I think something might not correct in the template definition... (it should work fine since it works when template is on the same file)

I removed every thing from the template file:

<script id="my-template" type="text/x-kendo-template">
    <div>fixed text</div>
</script>


This time ... it works with fixed text .... !?!? it becomes interesting....

Then, I start adding data to the template
<script id="my-template" type="text/x-kendo-template"> 
<div>${Status}</div> 
</script> 

Guess what !? ... it is not working ...
After trying ....
<script id="my-template" type="text/x-kendo-template"> 
<div>${data.Status}</div> 
</script> 
It works.... I am able to get the list of Status.

Why do we have to use "data." in the template (external template file)? Previously, the template is defined in the same file, I don't have to put .data in front of field name.
 
Now... conditioning ..
If I remove .toUpperCase(), it works. but I NEED to use the function (and other functions) in the if-else statements.
Since the data can be SiNgle, sinGLE etc.
Why it is not working when I exclude the template from the original file? 
<div>
                  # if (
data.Status.toUpperCase() == "SINGLE"){#
                        <img src="imgs/black_acs.png" alt="black_acs image" />
                  #}else if (
data.Status.toUpperCase() == "MARRIED"){#
                        <img src="imgs/blue_acs.png" alt="blue_acs image" />
                  #}else if (
data.Status.toUpperCase() == "OTHER"){#
                         <img src="imgs/red_acs.png" alt="red_acs image" />
                  #}#
        </div>
 


Please help ....
Jan
Top achievements
Rank 1
 answered on 29 Aug 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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?