Telerik Forums
Kendo UI for jQuery Forum
2 answers
201 views
Hey I was wondering how it is possible to achieve a format of 
    <text><image>
instead of 
    <image><text>
in a panelbar.  I want it to look akin to: http://demos.kendoui.com/web/treeview/templates.html

I was looking through the panelbar source file and found:
itemWrapper: template(
"<#= tag(item) # class='#= textClass(item, group) #'#= contentUrl(item) ##= textAttributes(item) #>" +
"#= image(item) ##= sprite(item) ##= text(item) #" +
"#= arrow(data) #" +
"</#= tag(item) #>"
),

Is there a simple way that I can switch the two when I configure a panel bar?  I've heard others extend widgets, but that looks to be overkill for this small modification.
Nick
Top achievements
Rank 1
 answered on 21 May 2012
2 answers
64 views
Hi,
I need to bind to the event of a tab clicked and it's content has been fully loaded. I want to be able to capture this event not only for when content is loaded via ajax but also when the tab is reopened (content is already on the client)... This is unfortunately captured by the existing event  onContentLoad which only fires after ajax finishes. Please let me know if there is a way to do this.

Thanks,
Valanto
Kamen Bundev
Telerik team
 answered on 21 May 2012
0 answers
141 views
When I delete grid row I want it  disappear on web page but when I press F5 to refersh not any row is deleted, furthermore I can't find any tutorial show total of records at the footer, how can I did ? the function update is ok.

Here is my code:

  <script>
                $(function(){
                    $("#grid").kendoGrid({
                    scrollable: true,
                    pageable: true,   
                    sortable:true,
                    filterable: true,
                    dataSource:
                                {
                                        transport:
                                                    {
                                                        read:"../data/all_products.php"
                                                        ,update:{url:"../data/update.php",type:"POST"}
                                                        ,destroy: {url:"../data/delete.php",type:"POST"}
                                                    }//pageSize:5,serverPaging: true,
                    ,schema:
                        {
                            data:"data"
                            ,total:function(result)
                               
                            {
                                var data=this.data(result);
                                return data ? data.length:0;
                            }
                            
                        , model:
                            {
                                id:"id",
                                fields:
                                   
                                {
                                    name:{editable:true}
                                    ,price:{type:"number",editable:true}
                                    ,thumbnail:{editable:false}
                                }
                             }
                        }
                    ,  pageSize:5
                    }    
                    ,columns:[
                                {field:"name"}
                                ,{field:"product_name",title:"product name"}
                                ,{field:"price", format:"{0:c0}"}
                                ,{field:"thumbnail",template:"<img src='#= thumbnail #' /> "}
                                ,{command:"destroy",title:"&nbsp;",width:110}
                                ]
                    ,navigatable: true                
                    ,editable: true   
                    ,toolbar:["save","cancel"]});
                });
            </script>

and here is my delete.php


<?php
   
   include ('../data/products.php');
   $db=new Database()  ;
 
 $verb = $_SERVER["REQUEST_METHOD"];
   
  if ($verb == "POST")
  {
      $product_id= mysql_real_escape_string($_POST['id']); 
       
      $sql="delete from tbl_products where id='".$product_id."' ";
      $rs=$db->Query($sql) ;
 
      echo json_encode($rs);
  }
?>
Quang
Top achievements
Rank 1
 asked on 21 May 2012
0 answers
294 views
i m facing one problem which is explain below..
i have used all the default actions of kendo grid (inline editor) and its working fine... but there is some problem in 'adding new record'
when i click on 'add new record' , in event 'edit' i check wheather its new row or previsouly added row. if its new row i assign its unique id and my unique field (predicate_id) from the global variable like this
edit: function(e) {
            var uid = e.model.uid;
           if (e.model.id == "") {
                e.model.id = PredicateListCounter;
               e.model.predicate_id = PredicateListCounter;
               PredicateListCounter++;
}

so when i add new record and edit any other row so the newly created row will be deleted (THIS IS DEFAULT - OK)
BUT
once i update the new added row and than click edit (so it will open inline edit mode) and without clicking update if i click on any other row edit button, SO THE NEWLY CREATED ROW DELETE FROM THE DATASOURCE

i uses the following event to use default behavior with little modification from

- dataBound : to bound the dropdowns and its list every time
- edit : too give new unique id to the row
- save : to make changes on other column (like if column 'Operator has value == '$NEAR' so column 'meters' should display its value else display empty)

can anyone plz tell me where i m going wrong... the bug is for sure is while adding new row to the datasource .. what major should take when assigning id to the new row...

i use global variable which assign values to model.id and model.predicate_id (my field)
here is the datasource and grid initalization :
var PredicateDataSource= new kendo.data.DataSource({
        data:PredicateData,
        schema:{
            model:{
                id:"predicate_id",
                fields:{
                    data_type:{ type:"string" },
                    lhs_source:{ type:"string" },
                    lhs:{ type:"string" },
                    operator:{ type:"string" },
                    rhs_source:{ type:"string" },
                    rhs1:{ type:"string" },
                    rhs2:{ type:"number" }

                }
            }
        }
    });
 var predicate_grid = $("#Predicate_Grid").kendoGrid({
        dataSource: PredicateDataSource,
        toolbar: [{ name: "create", text: "Add Condition"}],
        sortable:false,
        scrollable:false,
        batch: true,
        editable:"inline",
        columns:[
            {title:"LHS", field:"lhs_source", editor:LoadAdvPredicate_LHS, width:80},
            {title:"Property", field:"lhs", editor:LoadAdvPredicate_LHS_Property, width:150},
            {title:"Operator", field:"operator", editor:LoadAdvPredicate_Operator, width:100},
            {title:"RHS", field:"rhs_source", editor:LoadAdvPredicate_RHS, width:80},
            {title:"Property", field:"rhs1", editor:LoadAdvPredicate_RHS_Property, width:150},
            {title:"meters", field:"rhs2", editor:LoadAdvPredicate_Meters, width:80},
            { command: ["edit", "destroy"], title: "&nbsp", width: "180px" }

        ]

In short... when add new row and open its edit mode (click on edit) and than edit any other row (without clicking update on prev row which was open in edit mode) the newly created row deleted instead of calling row.cancelChanges();
fayaz
Top achievements
Rank 1
 asked on 21 May 2012
0 answers
111 views
Hei
I want to display Tabs as vertical with image like

 Registration      Contact Info       About us

When click on Registration it wud display under tab like

Registration P          Reg A      Reg C

How to achieve this using Tabstrip . Iam new to Kendo ui
Momi
Top achievements
Rank 1
 asked on 21 May 2012
2 answers
205 views
Hi guys,

We use Autocomplete with a remote data source and filtering on the server.
As you know when the filtering is done on the server the data is retrieved by making calls to the server each time the clients type something in the input box.
There are cases when it takes several seconds for the results to be returned from the server and we want to indicate this to the clients and give them some visual hints that they should wait for the results to be returned by showing an ajax busy loader.
All is good but we can't find a way to know when the data source has made a request to the server for retrieving the data (also when the data is returned to the data source, so that we can remove the ajax busy loader).
Do you know about any event of the data source or the autocomplete itself that could fit for our needs?

Many thanks
Erlend
Top achievements
Rank 2
 answered on 21 May 2012
3 answers
137 views
Hello,

I have created a simple test application and found that back button works only two times.

Open "mobile.html" in my attached example and click "Navigate". On the new page click "Back" button.
Repeat this action trice and found that "Back" button stops working. ((

What is the problem with it?

Vladimir
Volodymyr Oliinyk
Top achievements
Rank 1
 answered on 21 May 2012
1 answer
264 views
A treeview start out with no nodes selected.  Once a node is selected there is always a selected node -- you can't click on the selected node to deselect it.

Does anyone have a way to deselect a node when the selected node is clicked on ?

Why you might ask ?  I am trying to use a tree in a way that allows multiple nodes or none to be selected.
Nigel
Top achievements
Rank 1
 answered on 21 May 2012
1 answer
99 views
I have problem with selectbox in data-role="page" div -when i use this code in ScrollVIew  page div, its not response on clicks  and only show first "option".  In other place scrollbox works correctly, Can you help me ?


also there is a problem with input box.. there are  not editable.  where is the problem???
<select>
                <option value="First Option">First Option</option>
                <option value="Second Option">Second Option</option>
                <option value="Third Option">Third Option</option>
                <option value="Fourth Option">Fourth Option</option>
            </select>
Arshak
Top achievements
Rank 1
 answered on 21 May 2012
1 answer
132 views
It seems that he shift key values are being allowed (#$%^&, ect.)  Any ideas show to prevent this?

Thanks,
Joe
Georgi Krustev
Telerik team
 answered on 21 May 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
Form
View
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
AICodingAssistant
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
+? 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?