Telerik Forums
Kendo UI for jQuery Forum
2 answers
1.2K+ views

Please see attached.  We are trying to use a set of radio buttons for a cell editing template.  The code is below:  This works except that I have to click in the cell once to put in edit mode and then click on the radio button.  What I would like is to be able to click directly on the radio button once.  Thanks for your help.

 {
    field: "Accomplished", title: "Accomplished", width: 200,
    
    template: "<label><input ng-disabled='true' type='radio' value='#= Accomplished #' #= Accomplished == '0' ? 'checked' : ''# >&nbsp;NA&nbsp;</label>"
        + "<label><input ng-disabled='true' type='radio' value='#= Accomplished #' #= Accomplished == '1' ? 'checked' : ''# >&nbsp;Yes&nbsp;</label>"
        + "<label><input ng-disabled='true' type='radio' value='#= Accomplished #' #= Accomplished == '2' ? 'checked' : ''# >&nbsp;No&nbsp;</label>",
    
    editor: "<label><input name='Accomplished' type='radio' data-bind='checked:Accomplished' value='0'>&nbsp;NA&nbsp;</label>"
    + "<label><input name='Accomplished' type='radio' data-bind='checked:Accomplished' value='1'>&nbsp;Yes&nbsp;</label>"
    + "<label><input name='Accomplished' type='radio' data-bind='checked:Accomplished' value='2'>&nbsp;No&nbsp;</label>"
},

Douglas
Top achievements
Rank 1
 answered on 09 Jul 2015
2 answers
85 views

Is it possible to enable text selection for content inside sortable panels? Even after removing "user-select: none" from the CSS files, I am unable to select text inside the panels. It seems that text selection is disabled from within the Kendo js file, because I can select content inside the panels when I don't include the kendo.all.js file.

 Thanks!

Shawn V. III
Top achievements
Rank 1
 answered on 09 Jul 2015
1 answer
502 views

Hi,

We are working with the Kendo Context Menu. The problem we are dealing with happens when we are trying to bind one context menu to multiple targets (each row in a grid has a button, and each of those buttons should open the same menu). 

In our click listener, it seems that the event.target element is not always the correct target that was clicked on. 

A simple example is here: http://dojo.telerik.com/aYiTi/2

Are we doing something wrong? Is there a more reliable way to get the element that was clicked on?

Alexander Popov
Telerik team
 answered on 09 Jul 2015
3 answers
319 views

I have a scenario where I want to prevent users from uploading a file if another file with the same name has been uploaded elsewhere. I create the upload like this

this.$("#templateFile_" + id).kendoUpload({
async: {
saveUrl: "/KendoUploadFileHandler.ashx?upload=1",
removeUrl: "/KendoUploadFileHandler.ashx?remove=1",
autoUpload: true
},
showFileList: false,
multiple: false,
upload: this.onUpload,
success: this.onSuccess,
progress: this.onProgress,
select: this.onSelect,
error: this.onError
 
});
 

 

The upload handler is a custom httphandler where I inspect 

HttpPostedFile postedFile = context.Request.Files["templateFile"];

 to see if postedFile.FileName already exists on disk. If so, I'd like to return an error to the client and carry this information along.

If I set context.Response.StatusCode to e.g. 500 (InternalServerError) I hit my error handler (onError) - but the error get caught in kendo.web.min.js as well and I get the entire server response dumped to console from kendo.web.min.js. This also happens if I set StatusCode to "OK" but provide a value in context.Response.Status.

If I just return a statuscode OK with a statusdescription, I never hit my error handler. 

There is very little documentation about this, I am out of idead for further trial-and-error tests. Could you please provide a simple working example (or some sample code) where some validation in the httphandler HandleRequest(HttpContext context) will cause the clientside code to end in either onSuccess or onError. 

Thanks for any help!

/Jan

Jan Hansen
Top achievements
Rank 1
 answered on 09 Jul 2015
1 answer
175 views
Is there a way to integrate grid with meteor.js ?
Plamen Lazarov
Telerik team
 answered on 09 Jul 2015
9 answers
971 views
Hello,

I'm using Kendo grid with CRUD functionality. The problem is, the first create functionality works fine but when I want to add another data then i get:
TypeError: d is undefined
in Firebug and I cannot even close the create dialog.
This is the response from server that is a Json file:
{"Data":[{"Id":364,"UserName":"a","Path":"a","PathEscaped":"a\\%"},{"Id":365,"UserName":"b","Path":"b","PathEscaped":"b\\%"}],"Total":2,"AggregateResults":null,"Errors":null}

This is the code in the view:

$("#rulesTable").kendoGrid({
            columns: [
            { field: "UserName", title: "UserName", width: "300px" },
            { field: "Path", title: "Path" },
            { command: ["destroy"], title: " ", width: "200px" }
            ],
            editable: "popup",
            pageable: true,
            toolbar: ["create"],
            dataSource: {
                serverPaging: true,
                pageSize: 10,
                schema: {
                    data: "Data",
                    total: "Total",
                    model: {
                        id: "Id",
                        fields: {
                            UserName: { type: "string", editable: true, nullable: false, validation: { required: true } },
                            Path: { type: "string", editable: true, nullable: false, validation: { required: true } }
                        },
                    }
                },
                batch: true,
                transport: {
                    create: {
                        url: "Rules/AddRule1",
                        type: "POST",
                    },
                    read: {
                        url: "Rules/GetRules",
                        contentType: "application/json; charset=utf-8",
                        type: "POST",
                        dataType: "json",
                    },
                    destroy: {
                        url: "Rules/DeleteRule1",
                        type: "POST",
                        data: {
                            Id: $("#input").val()
                        },
                    },
                    errors: function (response) {
                        var errorData = $.parseJSON(e.responseText);
                        alert(errorData.errorMessage);
                        $("#loading").innerHtml = "error";
                    },
                    parameterMap: function (data, operation) {
                        if (operation === "read") {
                            return kendo.stringify(data);
                        }
                        else {
                            var result = {};
                            for (var member in data) {
                                result["" + member] = data[member];
                            }
                            return result;
                        }
                    }
                },
                sort:
                {
                    field: "UserName",
                    dir: "asc"
                },
                },
            });
Could you please help me why i get this error?
Vladimir Iliev
Telerik team
 answered on 09 Jul 2015
12 answers
2.0K+ views
Hello guys!

On a grid, is it possible to change the default filter method for a string type column? To me, "contains" makes more sense than "is equal", as it will be used more often.

We've tried to change it on the columnMenuInit event, but on the first attempt to filter, the DropDownList is reset to the "is equal" option.

Thanks!
Vladimir Iliev
Telerik team
 answered on 09 Jul 2015
3 answers
423 views
Hello, i'm new, how can i enable Header filtering in a Row Template grid.


I'm using, an exemple i found in this forum ....

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" />
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>
<body>
            <div id="example" class="k-content">
            <table id="grid">
                <colgroup>
                    <col class="photo" />
                    <col class="details"/>
                    <col/>
                </colgroup>
                <thead>
                    <tr>
                        <th>
                            Picture
                        </th>
                        <th>
                            Details
                        </th >
                        <th data-field="EmployeeID">
                            ID
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td colspan="3"></td>
                    </tr>
                </tbody>
            </table>
            <script id="rowTemplate" type="text/x-kendo-tmpl">
           <tr>
           <td class="photo">
                       image
           </td>
           <td class="details">
          <span class="title">#: Title #</span>
          <span class="description">Name : #: FirstName# #: LastName#</span>
          <span class="description">Country : #: Country# </span>
           </td>
           <td class="employeeID">
              #: EmployeeID #
           </td>
          </tr>
            </script>

            <style scoped>
                .photo {
                    width: 140px;                    
                }
                .details {
                    width: 400px;
                }                
                .title {
                    display: block;
                    font-size: 1.6em; 
                }
                .description {
                    display: block;
                    padding-top: 1.6em;
                }
                .employeeID {
                    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
                    font-size: 50px;
                    font-weight: bold;
                    color: #898989;
                }
                td.photo, .employeeID {
                    text-align: center;
                }
                .k-grid-header .k-header {
                    padding: 10px 20px;
                }
                .k-grid td {

                }
            </style>
        </div>


</body>
</html>
Dimiter Madjarov
Telerik team
 answered on 08 Jul 2015
1 answer
378 views

I need to remove the black border around the k-widget class.

I used the following CSS to get it this far.

.k-widget{       
        background:transparent;
        border:none;
}

Sebastian
Telerik team
 answered on 08 Jul 2015
1 answer
102 views
Is there a way to rerender a symbol on a bubble layer when the data item for it is changed?  I can probably make it work by copying the whole data source, emptying it, and then copying it back in with the updated values, but that seems like overkill.  I just want to be able to change things on some symbols.
T. Tsonev
Telerik team
 answered on 08 Jul 2015
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?