Telerik Forums
Kendo UI for jQuery Forum
4 answers
1.0K+ views
Hello.  I have a grid where the user can set the Primary key value of the table.  This is great, but I don't want them editing that value.
I only want the edit field to show up on creates.  I want it to be locked for normal edits.

If i set it to .Editable(False) then I can't add new ones.

I tried putting and onEdit event in which called a javascript which sought out that cell and called the .closecell() but that didn't work.  Maybe I was doing something wrong.

Is there an easy bit of javascript for closing cell 4 on an edit of an existing item.

I've added what I think I should be using..i'm just missing something...please help!
<script>
    function onEdit(e) {
        //if the model isn't new (editing)
        if (!e.model.isNew()) {
            var grid = $("#Devices").data("kendoGrid");
        //missing code I want her
            grid.closecell();
            }
    }
</script>

Tony
Top achievements
Rank 1
 answered on 07 Feb 2013
1 answer
114 views
I'm developing a module in Dotnetnuke 7 with Kendo UI Web v2012.3.1315.
the local jquery at  Dotnetnuke 7  is 1.7.2. The problem: kendoWindow can't popup in Chrome.
After upgrade  jQuery to 1.8.2 in Dotnetnuke, the kendoDatePicker,kendoDropDownList can't popup select panel.How to solve it?

Daniel
Telerik team
 answered on 07 Feb 2013
2 answers
450 views
I have a service (ASP.NET WebApi) whose URL returns a single object:

http://localhost:60000/api/approvals/90a11073-cbfe-4442-9330-9b94d83d53a2

But I can't get the datasource to handle the scenario. The request is made and the response is ok but in the change event I don't have any data. the ok from qunit fails.

datasource.bind("change", function (e)
    {
        var element = datasource.get('90a11073-cbfe-4442-9330-9b94d83d53a2')
        ok(element);
        start();
    });

Also inspecting e.sender.data() shows that there are no elements in the result!

Is this supported? How?

Thanks,
Pedro

pedro
Top achievements
Rank 1
 answered on 07 Feb 2013
5 answers
182 views
We are doing some feasibility testing with the kendoui window for our application.  One of the requirements is to be able to have a custom menu (like kendomenu) that will provide interaction on each window instance.  The menu will need to pass requests to the server and update the window content based on the action.  Can you provide us with an example that uses the kendo window custom action click to create an action menu for that window instance?

Also, another requirement is to use an iframe to show google earth maps.  We are experiencing a z-index issue that shows the content over the top of every window (outside the iframe) instance.  Is there a fix for that?  We have tried implementing an iframe shim hack but that doesn't seem to work inside the window.

Thanks for your time.  We are looking forward to using your ui framework our portal application.

Alexander Valchev
Telerik team
 answered on 07 Feb 2013
1 answer
120 views
Can someone please explain me how to use the filter menu widget... What i want do is binding the filtermenu to the choice of  an options( the name of a filterable grid field)of  a select posed outside of the grid.
Alexander Valchev
Telerik team
 answered on 07 Feb 2013
2 answers
145 views
One of my listviews uses a template to populate the content rows:

<
ul data-template="tmpl_jailcard_comments" data-bind="source:jcComments" data-role="listview"> </ul>

When the user displays the same screen for a second time (Click 'Back' and click 'View jail cards' again) changes in the data-model are not reflected. The template works with the original data that it was bound to and ignores any change to the data-model

The following jsfiddle illustrates this: 

http://jsfiddle.net/elgato/EhxUb/13/

Any ideas how to make the listview template reflect an updated data-model?


mg1970
Top achievements
Rank 1
 answered on 07 Feb 2013
6 answers
143 views
It seems that when there's only one XML element, the DropDownList fails to show it, and instead shows 'undefined' five times. Very odd. No errors in the console.

UPDATE: It seems each of the five "undefined" entries in the drop down correspond to the 5 xml elements nested within the doc. So its parsing the doc but failing to map to the schema. If I add the 2nd item (a duplicate), it loads them both fine.
Selvamani
Top achievements
Rank 1
 answered on 07 Feb 2013
1 answer
419 views
Is there a way to use an external kendo template when using the ASP.Net MVC grid helper?


Here's my template:
<script id="javascriptTemplate" type="text/x-kendo-template">
    var isToday = true;
 
    #if(isToday){#
        // show time only e.g. 1:04 PM
    #}else{#
        // show date and time e.g. 02/06/2013 1:04 PM
    #}#
</script>

And I want to use that template in my grid:
@(Html.Kendo().Grid<SiteItem>()
      .Name( "sitesgrid" )
      .Columns( columns =>
                    {
                        columns.Bound( s => s.LastReport ).ClientTemplate( "javascriptTemplate" );
                    }
      )
      .DataSource( ds => ds
                             .Ajax().Read( "SitesGrid", "Dashboard" )
                             .PageSize( 10 )
                             .Sort( sort => sort.Add( p => p.SiteName ) )
      )
      .Pageable( pager => pager
                              .Messages( messages => messages.Display( "{0} - {1} of {2} sites" ) )
      )
      .Filterable()
      .Sortable()
      .Selectable()
      .ColumnMenu()
      .Events( events => events.Change( "onSitesGridSelect" ) )
      .Events( events => events.DataBound( "onGridDatabound" ) )
      )

Is this possible? With the pasted code, it simply outputs the word "javascriptTemplate"


Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Feb 2013
5 answers
166 views
Hello everyone,

I am trying to create a grid with both incell editing and a popup edit window. My grid is in popup mode, and i added a listener on the tables td's to invoke the editCell method. When the grid is in inline mode (or in incell, ofcourse) it has the desired effect of making the cell editable. In popup mode however, nothing happens, field just gets selected and chrome doesnt throw a warning.

Does anyone have any idea how to fix this?

editable: {
    mode: 'popup',
}

$('#grid td').live('dblclick', function (e) {
    $("#grid").data("kendoGrid").editCell($(this));
});
Daniel
Telerik team
 answered on 07 Feb 2013
4 answers
162 views
I have an app that was compiled with PhoneGap for Android. It uses a scrollview to display up to 100 items that include both text and graphics. 

I wrote the code to use xhr to bring the "next" item (page x+1) when you are viewing page x - so performance is pretty good - it generally works well - but when using the app for a while - it sometimes gets "stuck" in the scollview - after displaying the first page of the new "query" result.

I switch content after a preview using the content method - with something like the following:

             $("#adBoard").data("kendoMobileScrollView").content(previewStr); 


             $('#adcounter').text('1');
             $('#totalads').text(cnt);
             $("#adBoard").data("kendoMobileScrollView").scrollTo(0);
              downloadFirst(currRequest, pDiv);

             // switch to the view of the results

I wonder if this is an issue of memory consumption that is not released - when using the content() method. Because - doing the same stuff in Chrome on my development machine - it never gets stuck - with the exact same queries.

The question is - is there possibly a memory issue with this method - and would it be better to dynamically create a new scrollview element and initialize it with the query results after every query?



Petyo
Telerik team
 answered on 07 Feb 2013
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
Dialog
Chat
DateRangePicker
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?