Telerik Forums
Kendo UI for jQuery Forum
1 answer
308 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
155 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
177 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
83 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
39 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
5 answers
1.0K+ 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
112 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
705 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
1 answer
165 views
Hi,

Is there build-in functions to validate integer vs decimal? Date format? Or do I need to use regular expression?
What about comparing 2 strings (equalTo)?

Thank you~
Rosen
Telerik team
 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)
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
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
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?