Telerik Forums
Kendo UI for jQuery Forum
0 answers
153 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
326 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
132 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
275 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
152 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
290 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
113 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
160 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
4 answers
387 views
Hello,

I have found 2 more bugs in kendo UI with DropDownList.

About bugs:
1. When html element "body" has a border -> drop down list opened area has a wrong location.
2. When drop down list is created in the hidden container and then showed -> drop down list opened area has a wrong size (too small).

Please see the attached example.

Vladimir

PS. Unfortunately KendoUI is not so bugs free now as it should and it is hard for me now to develop something using it.
Could you tell me when will be the next release where, I hope, we all will have good & stable library.
Kamen Bundev
Telerik team
 answered on 21 May 2012
1 answer
211 views
Hi,

the click-events of the buttons, do they handle the touchstart-event or the common click-event?

Look here to know what I mean:

http://floatlearning.com/wp-content/uploads/2011/03/touchstart_demo.html

Petyo
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
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
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?