Telerik Forums
Kendo UI for jQuery Forum
1 answer
320 views
Hi everybody!
I'm facing a problem on my grid (Kendo Web + PHP + MySQL).

Here's the sittuation:
I'm using a popup editing grid, and almost everything is going well, apart from the "delete" function. If i save a new record, and try to delete it without close the grid, is doesn't happen on my MySQL DB, only on the grid, because when i save, the ID remains as "null" (as ID is a Auto_increment field) on the grid.
Is there anything wrong on my code, or is there anything missing to refresh the ID ( I mean right after i save, it should get the ID from the db).

Please could someone help me?

Thanks in advance.


here's the code on JsFlddle
http://jsfiddle.net/63sCD/4/ 
Rosen
Telerik team
 answered on 11 Apr 2012
1 answer
244 views
Hi,
MVC + kendo
when i select the value from ddl the first chart get data in perfect way
but when i use the chart event its give me error in js 

please any advice  
 
thanks
omar

 <div id="example" >
             <label for="Mun">Mun:</label>
                <input id="Mun"/>
            <div class="chart-wrapper">
            <div id="chart"></div>
            <div id="BarChart"></div> 


            </div>
            <script>

                var transport = {
                    read: {
                        url: "@Url.Action("Read", "Plot")", 
                         type: "POST" 
                    }
                };
                var Muntransport = {
                    read: {
                        url: "@Url.Action("ReadMun", "Plot")", 
                         type: "POST" 
                    }
                };


                     var ReadByLandUsetransport = {
                    read: {
                        url: "@Url.Action("ReadByLandUse", "Plot")", 
                         type: "POST" 
                    }
                };




              
              
                   var PlotByLandUseDataSource = new kendo.data.DataSource({
                    transport: ReadByLandUsetransport                                    
                         
                });
              


                var MunDataSource = new kendo.data.DataSource({
                    transport: Muntransport,
                    sort: {
                        field: "MUNICIPALITYNAME_E",
                        dir: "asc"
                    }
                });
                var PlotDataSource = new kendo.data.DataSource({
                        transport: transport
                         
                    });


                function filterMun() {
                   var dropdownlist = $("#Mun").data("kendoDropDownList");
                   var value = dropdownlist.value();
                     PlotDataSource.filter([
                    
                    {field: "MUNICIPALITYNAME_E",operator: "equals", value:value}
                    
                    ]);
                } 


                   function filterLandUse(e) {
                   PlotByLandUseDataSource.filter([
                    
                    {field: "MAIN_LANDUSE_E",operator: "equals", value:e.category}
                    
                    ]);

                }

         
                      function createChart() {
                      
                        $("#chart").kendoChart({
                        theme: $(document).data("kendoSkin") || "metro",
                        dataSource: PlotDataSource,
                        autoBind: false,                  
                        title: {
                            text: "Elms Application Count Per municibality! "
                        },
                        legend: {
                            position:"bottom"
                        },
                        seriesDefaults: {
                          labels: {
                                visible: true,
                                 format: "{0:N0}"
                            }
                           
                        },
                        series: [{
                            type: "pie",
                            field: "PLOTCOUNTS",
                            categoryField: "MAIN_LANDUSE_E"
                        }],
                        tooltip: {
                            visible: true,
                            format: "{0:No}"
                        },
                        seriesClick: filterLandUse


                    });
                    }


                    function createSubLanduseChart() {
                      
                        $("#Barchart").kendoChart({
                        theme: $(document).data("kendoSkin") || "Metro",
                        dataSource: PlotByLandUseDataSource,
                        autoBind: false,                  
                        title: {
                            text: "Elms Sub Land use! "
                        },
                        legend: {
                            position:"bottom"
                        },
                        seriesDefaults: {
                          labels: {
                                visible: true,
                                 format: "{0:N0}"
                            }
                           
                        },
                        series: [{
                            type: "column",
                            field: "AREAGROUP",
                            categoryField: "SUB_LANDUSE_E"
                        }],
                        tooltip: {
                            visible: true,
                            format: "{0:No}"
                        }


                    });
                    }





                $(document).ready(function() {
                    $("#Mun")
                    .val("Abu Dhabi")
                    .kendoDropDownList({
                            dataSource: MunDataSource,
                            dataTextField: "MUNICIPALITYNAME_E",
                            dataValueField: "MUNICIPALITYNAME_E",
                            change: filterMun
                        });


                 createChart();
                    createBChart();
                    filterMun();                  
  
                       $("#example").bind("kendo:skinChange", function(e) {
                        createChart();
                        createBChart();
                        // 
                        plotDataSource.read();
                        PlotByLandUseDataSource.read();
        
                    });

                });
               </script>
        </div>
Iliana Dyankova
Telerik team
 answered on 11 Apr 2012
3 answers
214 views
Hello,

I am trying to create an editable grid, whose dataSource contains fields with empty strings, which should then be set by the user. However, the Kendo Grid does not seem to support editing of cells whose content is empty.

You can try it out on jsFiddle
Is this a known issue, and how can I bypass it?

Thanks,
Szilard
Alexander Valchev
Telerik team
 answered on 11 Apr 2012
3 answers
748 views
Hi,
first, im sorry for my bad english.

I have grid, and i have window, which via ajax insert into db new row, close itself, and try refresh grid in ajax succes function. Close is sucessfull, but grid reload doesnt do anything :(

I try button with onclick="ted()" and function is: 


function ted() {
var grid = $("#grid_clients").data("kendoGrid")
grid.refresh();
}


But refresh doesnt working still.. please can u tell me, what is wrong?
Dimo
Telerik team
 answered on 11 Apr 2012
1 answer
305 views
Code:

var datasourceBrokers = new kendo.data.DataSource({
                        
                        transport: {
                            read: {
                                url: "@Url.Action("GetBrokersFromEvent", "Allianz")" + "?id=" +  $("#input").data("kendoComboBox").value(),
                                type: "POST"
                             },
                            update: {
                                url:"@Url.Action("SaveBroker", "Allianz")",
                                type: "POST"
                            },
                            parameterMap: function (data, operation) {
            
                                    if (operation != "read") {
               
                                        var result = {};

                                        for (var i = 0; i < data.models.length; i++) {
                                            var broker = data.models[i];

                                            for (var member in broker) {
                                                result["broker[" + i + "]." + member] = broker[member];
                                            }
                                        }
                                        
                                        return result;
                                    }

                                }
                        },
                        batch: true,
                        schema: {
                            model: {
                                id: "ID",
                                fields: {
                                    ID: { editable: false, nullable: false },
                                    Titlecode: { editable: false, nullable: true },
                                    FirstName: { editable: false, nullable: true },
                                    LastName: { editable: false, nullable: true },
                                    Email: { editable: false, nullable: true },
                                    Businessphone: { editable: false, nullable: true },
                                    Mobilephone: { editable: false, nullable: true },
                                    Language: { editable: false, nullable: true },
                                    EventId: { editable: false, nullable: true },
                                    FirmaId: { editable: false, nullable: true },
                                    Registered: { editable: false, nullable: true },
                                    ImportLabel: { editable: false, nullable: true },
                                    FirmaCustomerID: { editable: false, nullable: true },
                                    LanguageCode: { editable: false, nullable: true },
                                    ParentCustomer: { editable: false, nullable: true },
                                    AllianzContactId: { editable: false, nullable: true },
                                    AccountId: { editable: false, nullable: true },
                                    SegmentationParentCustomer: { editable: false, nullable: true },
                                    NoofEmployeesParentCustomer: { editable: true, nullable: true },
                                    ContactId: { editable: false, nullable: true },
                                    NordSud: { editable: false, nullable: true },
                                    Acmaad: { editable: false, nullable: true },
                                    Acmavi: { editable: false, nullable: true },
                                    ContacManager: { editable: true, nullable: true },
                                    OverFlow12: { editable: true, nullable: true },
                                    OverFlow13: { editable: false, nullable: true },
                                    OverFlow14: { editable: false, nullable: true },
                                    OverFlow15: { editable: false, nullable: true }
                                }
                            }
                        }
                      
                    });
                    
                    $("<div/>").appendTo(e.detailCell).kendoGrid({
                        dataSource: datasourceBrokers,
                        scrollable: false,
                        sortable: true,
                        pageable: true,
                        editable: true,
                        toolbar: ["save", "cancel"],
                        columns: [
                        { field: "ParentCustomer", title: "Broker" },
                        { field: "FirstName", title: "First Name" },
                        { field: "LastName", title: "Last Name" },
                        { field: "SegmentationParentCustomer", title: "Segmentation" },
                        { field: "ContacManager", title: "Invited by" },
                        { field: "OverFlow12", title: "Status" }
                    ]
                    });
                }
            }

Error (after changes in the grid, and update clicked):in  kendo.web.min.js:
a is undefined

The code in parameterMap gives the right objects.


Sven
Top achievements
Rank 2
 answered on 11 Apr 2012
0 answers
152 views
Hello,
I'm facing a problem with the dropdownlist :

Hello,

I just want to click on a specific item in the list, on my local machine the following code works perfectly :
 public static void ClickScrollableControl( HtmlDiv uIPointsList, User accessPoint)
{
   HtmlCell uICell = uIPointsList.GetControl<HtmlCell>(HtmlControl.PropertyNames.InnerText, accessPoint.Name)
Mouse.Click(uICell);
}

the playback engine scroll till the cell is visible, and it click on it.

When running the same code on the TestAgent (log automatically), the scrolling doesn't work.

My question is just how to scroll manually. I've tried this code but without success :

 public static void ClickScrollableControl( HtmlDiv uIPointsList, User accessPoint)
{
   HtmlCell uICell = uIPointsList.GetControl<HtmlCell>(HtmlControl.PropertyNames.InnerText, accessPoint.Name)
Mouse.Click(uICell);
Rectangle uICellRectangle = uICell.BoundingRectangle;

Rectangle uIPointsListRectanle = uIPointsListRectangle.BoundingRectangle;

int wheel = 1;
 while (!uIPointsListRectangle.Contains(uICellRectangle))
 {
     Mouse.MoveScrollWheel(wheel);
     wheel = wheel + 1;
          
     HtmlCell uICell = uIPointsList.GetControl<HtmlCell>(HtmlControl.PropertyNames.InnerText, accessPoint.Name)

    Rectangle uICellRectangle = uICell.BoundingRectangle;
  }

Mouse.Click(uICell);
}

it doesn't scroll at all !!!, any idea ?
issamo
Top achievements
Rank 1
 asked on 11 Apr 2012
1 answer
173 views
The suggestion list seems to search with "starts with".

If my list is "Wedding", "Teddy Bears", and "Eddie Money", and I type "Edd" into the box I only get Mr. Money but I'd like to get all three since all three contain "Edd".

(Note: This question is in no way meant to be some sort of admission that I like Eddie Money.)
Cesar
Top achievements
Rank 1
 answered on 11 Apr 2012
0 answers
81 views

Hi,

I'm trying to generate controls from the server side.  The textbox controls rendered by ASP.Net will have <input type="text">.
I was able to replace type="text" with type="email" or other Kendo type I want using a script.  However, it works with all other browsers except IE(8.0+).

Thanks,

Helen

Helen
Top achievements
Rank 1
 asked on 11 Apr 2012
0 answers
38 views
Where can I find the available events for the pager?  I need to wire up some click events to the kendo listview items on each page, but I'm not sure how to go about it.

Would I need to unbind the click on the items on page1 before I hit page2 for example, and what's the event to hook into in order to re-wire the events.
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 asked on 11 Apr 2012
2 answers
115 views
I can't get the custom editor function : customEditor : to trigger.

<p>
  Rental - selector</p>
<div>
  <p>
    Mini class</p>
  <div id="rentalList">
  </div>
  <p>
    Compact class</p>
</div>
<div id="rentalList2">
</div>
<p>
  Select your car</p>
<script type="text/javascript">

  var cars = new kendo.data.DataSource({
    transport: {
      read: {
        url: '@Url.Action("GetCars")',
        dataType: "json"
      },
      update: {
        url: '@Url.Action("EditCars")',
        dataType: "json"
      }
    },
    schema: {
      model: {
        id: "CarSeq",
        fields: {
          CarModel: { editable: true },
           Name: { editable: true }
        }
      }
    }
  });


  function customEdit(container, options) {
    alert('function called');
  }


  $("#rentalList").kendoGrid({
    selectable: "row",
    height: 200,
    editable: true,
    dataSource: cars,
    columns: [
      { title: "Brand", field: "Name" },
      { title: "Model", field: "CarModel", editor: customEdit }
    ]
  });


  $("#rentalList2").kendoGrid({
    selectable: "row",
    height: 200,
    dataSource: carDataSource
  });

</script>

Can't see that anything is missing in the Kendo part of the javascript. Any clues why this won't trigger?
Jason
Top achievements
Rank 1
 answered on 10 Apr 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)
SPA
Filter
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
OrgChart
TextBox
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?