Telerik Forums
Kendo UI for jQuery Forum
0 answers
100 views
Hi,

I have an object in my Model that must be bounded to two ViewModels. This object is loaded with ajax from the server.

This object must be  bounded to two regions of my screen that have, each one, different ViewModels. I would like that when the response arrives from my Ajax service the two widgets, bounded to my ViewModels, be updated.

How can I do this.

Thanks
mvbaffa
Top achievements
Rank 1
 asked on 27 Jul 2012
4 answers
341 views
OK, not exactly a question on ListView per se, but spinning wheels for some reason on this guy.

I have the following template and ListView on a page:
$("#top3").kendoListView({
                dataSource: dataSourceCustomers,
                template: kendo.template($("#top3template").html())
});
 
 
<script type="text/x-kendo-tmpl" id="top3template" >
        <div class="top3item">
            <dl class="subtitle">
                <dt><b>${CustomerName}</b></dt>
                <dd>${kendo.toString(Value, "c")}</dd>
            </dl>
        </div>
     
</script>

What I'm looking for is a way for format the FIRST item on the list returned (bold, diff color, etc.).  It sounds simple enough I should be able to do it with jQuery alone, but its just not coming to me.  Any ideas on formatting the first item returned?  Thanks in advance for the help!
Iliana Dyankova
Telerik team
 answered on 27 Jul 2012
2 answers
629 views
I am trying to add radio button in a template column of the grid -

columns.Bound(r => r.Approved)
    .ClientTemplate(" <input type='radio' id='Approve' name='chkApprove' /><input type='radio' id='Deny' name='chkDeny' />")
    Title("Approve");

But the radion buttons show up as a single checkbox control. Can anyone help me with this?

 

 

 


Vaishali
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
122 views
I have copied and pasted the code from the "Build Apps With Kendo UI Mobile" how-to but it doesn't appear to be working.  The tabstrip navigation at the bottom appears and I can navigate to the "about.html" page with a slide transition but when I click on the "Home" link it doesn't take me back.  Any help would be greatly appreciated.

Todd
Telerik team
 answered on 27 Jul 2012
2 answers
125 views
Hi,
In TreeView ver. 2012 q2 the findByText not function if the node is not visible ?

Thanks
Vitantonio
Top achievements
Rank 1
 answered on 27 Jul 2012
0 answers
81 views
Hi all,

I've got a grid where I want to implement the DELETE action. When I click on the DELETE button it calls the url for that action, but no value is passed to that URL.
I'm using PHP for catching the DELETE action, but both $_GET and $_POST variables are empty.

This is my grid:

<script>
    $(document).ready(function(){
 
         
        var dataSource = new kendo.data.DataSource({
            transport: {
                read:  {
                    url: '<?= site_url('adwords/admin/getKeywordsDetails') ?>',
                    dataType: "json"
                },
                destroy: {
                    url: '<?= site_url('adwords/admin/deleteKeywordDetail') ?>',
                    dataType: "json",
                    Type: "POST"
                },
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {models: kendo.stringify(options.models)};
                    }
                }
            },
            pageSize: 50,
            autoSync: true,
            schema: {
                model: {
                    id: "id",
                    fields: {
                         
                        id: { editable: false, nullable: true },
                        segment: { type: "string" },
                        keyword: { type: "string" },
                        exact_monthly_search_target: { type: "number" },
                        broad_monthly_search_target: { type: "number" },
                        exact_competition: { type: "number" },
                        exact_estimated_avg_cpc: { type: "number" }
                    }
                }
            }
        });
        $("#keyword_ideas_result_grid").kendoGrid({
             
            dataSource: dataSource,
            scrollable: true,
            sortable: true,
            filterable: true,
            serverPaging: true,
            type: "json",
            editable: {
                update: false,
                destroy: true,
                confirmation: "Are you sure you want to remove this item?"
            },
            pageable: true,
            columns: [ {
                    field: "segment",
                    title: "<?= __("Segment") ?>"
                } , {
                    field: "keyword",
                    title: "<?= __("Keyword") ?>"
                } , {
                    field: "exact_monthly_search_target",
                    title: "<?= __("Local Exact") ?>"
                } , {
                    field: "broad_monthly_search_target",
                    title: "<?= __("Local Broad") ?>"
                } , {
                    field: "exact_competition",
                    title: "<?= __("Competition Exact") ?>"
                                 
                }, {
                    field: "exact_estimated_avg_cpc",
                    title: "<?= __("CPC Exact") ?>"
                                 
                },
                { command: "destroy", title: " ", width: 110 }
            ]
        });
    });
</script>

And my PHP receptor is ver simple:
// adwords/admin/deleteKeywordDetail
        var_dump($_GET);
        var_dump($_POST);

Have you got any idea why I'm getting those variables empty?
The READ method is working alright as I see the grid full of data, but the DESTROY is somehow not sending any parameter.

Thanks!

Juan
Juan
Top achievements
Rank 1
 asked on 27 Jul 2012
1 answer
200 views
I have a datasource which could have any number of items, therefore the total of items will be unknown.  I would like to have a maximum of 10 items per page and would ideally like to scroll through these items using the endless scroll feature.  However, the endless scroll will continue to loop through the datasource items when the last item has been reached. 

I would like to use the endless scroll feature until the last item has been displayed and then this stops.  I will therefore need to perform a check  and stop returning records after all items have been requested.  The problem is, I have no idea where to start with implementing this.  I am using PHP.  Can anyone advise?

var DataSource = new kendo.data.DataSource({
     pageSize: 10,
      transport: {
          read: "data.php",
          dataType: "json",
    }
     sort: { field: "created", dir: "desc" },                                        
            
     });

  $("#list").kendoMobileListView({
              dataSource: DataSource,
              pullToRefresh: true,
              appendOnRefresh: false,    
              endlessScroll: true,
              scrollTreshold: 30, //treshold in pixels                            
              style: "inset",       
              template: $("#list").text()
          });

I assume I need to use the serverPaging and page  attributes that are in the documentation but this does not give any examples that help.
Georgi Krustev
Telerik team
 answered on 27 Jul 2012
2 answers
305 views
hi,
Is there any way to change the style from normal to tool tip like Silverlight when the mouse goes over the text-box and then the error appear? instead of having it on the side of the textbox?

thanks
James
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
292 views
Below is the code that i have written. On click of create/update data is not being send to webapi layer and on every click it is calling create operation. Help me to resolve the above issue.

(function ($) {
    // Update API url
    var UPDATEUSER_API_URL = 'api/UserManagement/PostUpdateUser';
    // Delete API url
    var DELETEUSER_API_URL = 'api/UserManagement/DeleteUser';
    // Search API url
    var GETUSER_API_URL = 'api/UserManagement/GetUser';
    // Search By Id API url
    var GETUSERBYID_API_URL = 'api/UserManagement/GetUserById';


    $(function () {
        debugger;
            dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: GETUSER_API_URL,
                        dataType: "json"
                    },
                    update: {
                        url: UPDATEUSER_API_URL,
                        contentType: 'application/json;charset=utf-8',
                        dataType: "json",
                        type: "PUT"
                    },
                    destroy: {
                        url: DELETEUSER_API_URL,
                        contentType: 'application/json;charset=utf-8',
                        type: "DELETE",
                        dataType: "json",
                    },
                    create: {
                        url: UPDATEUSER_API_URL,
                        dataType: "json",
                        type: "POST",


                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    }
                },
                batch: true,
                pageSize: 10,
                schema: {
                    model: {
                        id: "UserProfileID",
                        fields: {
                            UserProfileId: { validation: { required: false } },
                            Password: {type: "string", validation: { required: true } },
                            Username: { editable: true, validation: { required: true } },
                            FirstName: {type: "string", validation: { required: true } },
                            LastName: {type: "string", validation: { required: true } },
                            EmailId: {type: "string", nullable: false, validation: { required: true } },
                            IsSuperUser: { type: "boolean", validation: { required: false } },
                            RoleName: {nullable: false, validation: { required: true } },
                        }
                    }
                }
            });
        debugger;
        $("#grid").kendoGrid({
            dataSource: dataSource,
            pageable: true,
            height: 400,
            toolbar: ["create"],
            columns: [
                "Username",
                { field: "Password", title: "Password", width: "1px" },
                "FirstName",
                "LastName",
                { field: "EmailId", title: "Email Id", width: "170px" },
                { field: "IsSuperUser", title: "SuperUser", width: "90px" },
                { field: "RoleName", title: "Roles", width: "90px"  },
                { command: ["edit", "destroy"], title: "&nbsp;", width: "210px" }],
            editable: "popup"
        });
    });
Ednei
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
652 views
hi,
im passing in a datasource for my grid schema, however the row ID (data-uid) isn't getting set to the ID of the datasource?

(i'm upgrading from v2011.3.1407 to v2012.2.710)

ok found a way:
var dataRow = $("#grid").data("kendoGrid").dataSource.getByUid(row.data("uid")); 

datarow contains "id" and another other property you assigned to it. 
Atanas Korchev
Telerik team
 answered on 27 Jul 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
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?