Telerik Forums
Kendo UI for jQuery Forum
3 answers
744 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
301 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
149 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
170 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
77 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
112 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
5 answers
989 views
Hi,
We have 10 digit phone numbers coming from a database (as numerical types, not strings) and I want to format them in the kendo grid. I can't seem to find the right formatting string. Any ideas?
Thanks,
ian
Gary
Top achievements
Rank 1
 answered on 10 Apr 2012
1 answer
99 views
The value of the variable ClimateDropDown is undefined in the following, which causes an error when I try to call ClimateDropDown.value(). The dropdownlist is created properly and gets initialized with the data from the remote data source.

              <input id="ClimateDropdown" />

            .......

            $("#ClimateDropdown").kendoDropDownList(
              {
                dataTextField: "Name",
                dataValueField: "NodeID",
                dataSource:
                {
                  transport:
                    {
                      read: "JSONClimateSpaceNodes.aspx",
                      dataType: "json"
                    }
                }
              }
            );

           ......

            var ClimateDropDown = $("#ClimateDropDown").data("kendoDropDownList");
            $.get("JSONIndoorClimate.aspx", "s=" + ClimateDropDown.value(), IndoorClimateResponse);

I am sure I am overlooking something simple and will appreciate a quick pointer to get me on the right track.

Thanks/Anker
Anker Berg-Sonne
Top achievements
Rank 1
 answered on 10 Apr 2012
15 answers
687 views
I am trying to create a grid that has a row template with controls in them using MVVM.  There are two problems I am struggling with:

1)  It seems that the grid does not know how to deal with row templates that have controls in them.   There are several problems here:
     a)  In IE, the column headers do not align with the rows, but it seems to work in Chrome.
     b)  In both browsers, it does not seem to know what size the controls are and cannot properly size the grid.   The dropdowns get chopped, and the unfortunate part, is I need them to auto-size because I don't know in advance what the size of the dropdown will be.

2)  I am not sure how to get the drop downs to use MVVM when inside of the grid.    The content of the dropdown needs to be bound to a property within the view model, not a property within the products list.  Essentially, I do not want to embed within the products the list for each item.

See this fiddle for effectively what I am attempting to do:

http://jsfiddle.net/blackhawk/xFLfZ/4/


Steven
Top achievements
Rank 1
 answered on 10 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?