Telerik Forums
Kendo UI for jQuery Forum
0 answers
70 views
Instead of a 'delete this record?' prompt I would prefer to hint at what is being deleted.

Supposing a
model: {
    id: "treeview",
    fields: {
        treeview:   { editable:false, field: "treeview/text()" },
        name:       { editable:true,  field: "name/text()", defaultValue:"" },
        timestamp:  { editable:false, field: "timestamp/text()", defaultValue:"" }
    }

A grid with this config does not prompt with the ${name}
editable: { mode:"popup", confirmation: "Delete ${name}? Really?" }

nor can I use a function for the confirmation message

Any ideas ?
Richard
Top achievements
Rank 1
 asked on 21 May 2012
1 answer
170 views
Please refer image.

1. Using vertical splitter results in a scrollbar. Why ? What is the fix ?

2. How do I target content into a particular pane ? For eg., in the image, when I click on a menu item I want to target the content onto right content pane

3.  This might be related to Menu styling - When menu item content doesnt fit the splitter pane size, I would like it to overflow into the nearby pane. How do I set that ?

Thanks
Aparna
Aparna
Top achievements
Rank 1
 answered on 21 May 2012
0 answers
431 views
I'm trying to create a new Category but I get this error
 "Cannot read property 'index' of undefined  Error"

    
<script type="text/javascript">
        $(function () {
            var category = kendo.data.Model.define({
                Id: "Id"
            });
 
            var dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "/Home/GetCategories",
                        dataType: "json"
                    },//read
                    create : {
                        url: "/Home/CreateCategory",
                        type : "POST",
                        data : {
                            name: $("#categoryName").val()
                        }
                    }
                }, //transport
                schema: {
                    model: category
                }
            });
 
            $("#category").kendoGrid({
                dataSource: dataSource
            });
 
 
            $("#createCategory").bind("click", function () {
               dataSource.add({ Name: $("#categoryName").val() });
                dataSource.sync();
                dataSource.read();
            });
 
        });
    </script>
}
 
<h2>@ViewBag.Message</h2>
 
 
<table id="category">
    <tr>
        <th data-field="Id">ID</th>
        <th data-field="Name">Name</th>
    </tr>
</table>
 
<input type="text" id="categoryName" name="name"/>
<input type="button" value="Create" id="createCategory"/>
Mahmoud
Top achievements
Rank 1
 asked on 21 May 2012
0 answers
129 views
Hei

Iam new to Kendo ui . Iam trying to add the Second Level of Tabstrip but its not working . Example Like you have 3 tabs like

Registration        Insurance      MinSide

Now when click on Registration it should open 3 more tabs like

Reg.1  Reg2  Reg3

How to achieve this functionality . I have searched a lot but didnt fint any answer .

Please help
Momi
Top achievements
Rank 1
 asked on 21 May 2012
10 answers
138 views
[{"FirstName":"James","LastOrCompanyName":"Hancock","MiddleName":"Robert","Suffix":{"value":"Sr.","text":"Sr."},"Salutation":"Mr.","Individual":false,"UserName":null,"DateOfBirth":null,"PublicSecurityPermissionID":null,"Sex":0,"BloodType":0,"WebSiteTheme":null,"PublicDescription":null,"ID":"545e6d6e-3bac-440f-86bb-5fb575e5ce68"}]

Note that the Suffix is value/text instead of just the value.

This comes from the value being bound like so:

<input data-role="combobox" data-text-field="text" data-value-field="value" id="cboSuffix" maxlength="20" data-bind="source: Suffixes, value: Contact.Suffix" style="width: 80px" />

It should have returned Suffix: "Sr."

Nothing else.

How do I get it to persist back just the actual value instead of both the value and the text from the combo item?
James
Top achievements
Rank 1
 answered on 21 May 2012
2 answers
229 views
Hi,

I am trying to use the popup editing of a grid that shows information from users table. The grid fields structure looks like:

[ Username | Email | Fullname | RegistrationDate ]

Except the above fields, the servers json response contains UserID & Password.
I need to open a popup editing window, where the admin(me) can edit NOT ONLY [ Username | Email | Fullname ]
but also enter Password & Confirm.
I do not need to include Password & Confirm at the grids data structure, but only at the Popup Window.
Currently, I open successfully the editing window but I cannot see Password & Confirm because they are not included in the grid's listing.

So, my question is: how can I add fields to the grid's editing window that are not presented to the grid's list. Also, Confirm is not an existing database field, because it is being used for password mistyping. In addition, your answer could be applied to the "Add new record" button/form.

Thank you. 
Iliana Dyankova
Telerik team
 answered on 21 May 2012
0 answers
146 views
hi
I need to validate cell that user just enter number in cell.
sorry for my bad english.
Meysam
Top achievements
Rank 1
 asked on 21 May 2012
3 answers
993 views
Hello Everyone,

grid is loading very slow when database records are more then 15000

i developed one kendo ui grid,
but sometimes i got the error like "jsonmaxlength exceeded "
for this error i given maximum length in web.config file, when i got this error my database has 36500 row .


This is my webmethod:

    <WebMethod(enableSession:=True)> _
    Public Function BindStyles() As String

        Dim obj As KendoData

        If Session("kendodata") Is Nothing OrElse DateDiff(DateInterval.Minute, CType(Session("kendodata"), KendoData)._time, Date.Now) >= 20 OrElse CType(Session("kendodata"), KendoData).StyleJSON Is Nothing Then
            ' obj.data = "[{Style:'S\'1',Color:'C1'},{Style:'S2',Color:'C2'}]"
            Dim dsresult As DataSet = Charts.BindStyles()
            Dim lst As New List(Of stylelookup)
            If dsresult IsNot Nothing AndAlso dsresult.Tables.Count > 0 AndAlso dsresult.Tables(0).Rows.Count > 0 Then
                lst = (From p In dsresult.Tables(0).AsEnumerable Select New  _
                                               stylelookup With _
                                               {.Color = CStr(p("color")).Trim, .Description = CStr(p("desc")).Trim, .Division = CStr(p("division")).Trim, .Group = CStr(p("group")).Trim, .primkey = CInt(p("primkey")), .Scale = CStr(p("scale")).Trim, .Season = CStr(p("season")).Trim, .selectstyle = CBool(p("select")), .Status = If(CStr(p("status")).Trim.ToLower.Replace("a", "") = "", "Active", "In-Active"), .Style = CStr(p("style")).Trim, .Whlprice = CDec(p("whlprice")), .Year = CInt(p("year"))}).ToList

            End If

            Dim objser As New JavaScriptSerializer()
            Dim json As String = objser.Serialize(lst)

            obj = New KendoData
            obj.StyleJSON = json
            obj._time = Date.Now
            Session("kendodata") = obj

            Return json

        Else
            obj = Session("kendodata")
            Return obj.StyleJSON

        End If
    End Function

and this is my default.aspx:

 function webmethod() {
               analytics.BindStyles(succ, failed);
    }
    function succ(res) {
        data = eval(res);
        load();
    }
    function failed(ex) {
      
        alert(ex._message);
    }


    function load() {
                      $("#grid").kendoGrid({
            dataSource: {
                data: data,
                pageSize: ((__gridH - 30 - 30) / 35),
                serverPaging: true, serverFiltering: true, serverSorting: true
            },
            dataBound: function (arg) {
                ___gridobj = this;
                $("#totalcount").html('' + this.dataSource._data.length + '');
                Pageing(this._data, this._data.length);

            },
            height: __gridH,

            scrollable: true,
            sortable: true,
            filterable: true,
            pageable: true,

            columns: [
         { title: "Select", width: "50px", filterable: false, sortable: false, template: '#= mycheckbox(primkey,selectstyle)#'
         },
                            {
                                field: "Style",
                                width: "100px",
                                title: "Style"
                            },
                            {
                                field: "Color",
                                width: "60px",
                                title: "Color"
                            },

                            {
                                field: "Description",
                                width: "120px",
                                title: "Description"
                            },
                            {
                                field: "Division",
                                width: "50px",
                                title: "Div"
                            },
                             {
                                 field: "Season",
                                 width: "70px",
                                 title: "Season"
                             },
                            {
                                field: "Scale",
                                width: "60px",
                                title: "Scale"
                            },
                             {
                                 field: "Status",
                                 width: "70px",
                                 title: "Status"
                             },
                             {
                                 field: "Group",
                                 width: "50px",
                                 title: "Grp"
                             },
                            {
                                field: "Whlprice",
                                width: "70px",
                                title: "WhlPrice"

                            },
                            {
                                field: "Year",
                                width: "40px",
                                title: "Year"
                            }

                      ]
        });
        return false;
    }

i attached my grid,

Can you explain how to bind grid with parameter like take ,skip,page,pagesize
Karl Mikesell
Top achievements
Rank 1
 answered on 21 May 2012
2 answers
235 views
Hey I was wondering how it is possible to achieve a format of 
    <text><image>
instead of 
    <image><text>
in a panelbar.  I want it to look akin to: http://demos.kendoui.com/web/treeview/templates.html

I was looking through the panelbar source file and found:
itemWrapper: template(
"<#= tag(item) # class='#= textClass(item, group) #'#= contentUrl(item) ##= textAttributes(item) #>" +
"#= image(item) ##= sprite(item) ##= text(item) #" +
"#= arrow(data) #" +
"</#= tag(item) #>"
),

Is there a simple way that I can switch the two when I configure a panel bar?  I've heard others extend widgets, but that looks to be overkill for this small modification.
Nick
Top achievements
Rank 1
 answered on 21 May 2012
2 answers
77 views
Hi,
I need to bind to the event of a tab clicked and it's content has been fully loaded. I want to be able to capture this event not only for when content is loaded via ajax but also when the tab is reopened (content is already on the client)... This is unfortunately captured by the existing event  onContentLoad which only fires after ajax finishes. Please let me know if there is a way to do this.

Thanks,
Valanto
Kamen Bundev
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?