Telerik Forums
Kendo UI for jQuery Forum
0 answers
352 views
Migrating from Telerik to Kendo Grid, Now Im having a problem auto-opening the detail template for the selected row within a grid...

See the following...

    <script type="text/javascript">
        function products_onRowSelect(e) {
                collapseAll(e);
                var grid = $("#Products").data("kendoGrid"),
                row = grid.tbody.find(">tr.k-master-row  k-state-selected");
                if (row.has(".k-collapse").length) {
                    grid.collapseRow(row);
                } else {
                    grid.expandRow(row);
                }
        }
        function collapseAll(e) {
            var grid = $("#Products").data("kendoGrid");
            var allMasterRows = grid.tbody.find('>tr.k-master-row');
            //Loop through each row, if a row has a detail row following it then collapse that master row
            for (var i = 0; i < allMasterRows.length; i++)
            {
                if (allMasterRows.eq(i).next('tr.k-detail-row').length > 0)
                {
                    grid.collapseRow(allMasterRows.eq(i));
                }
            }
        }
    </script>

Runs without error, collapse all works fine, but the expand never happens... Breakpoint hits just fine, but the row doesnt expand through code, it does however if I click the expand icon within the grid, just the jScript function doesnt do it.. Any ideas?

im
Top achievements
Rank 2
 asked on 26 Jul 2012
1 answer
582 views
When hovering over a date in the kendo calendar, a tooltip appears showing the full date.  The calendar generates the following HTML:

<td><a class="k-link" href="#" data-value="2012/7/14" title="Tuesday, August 14, 2012">14</a></td>

If I use a template, it gets inserted inside the anchor link which is still subject to the tooltip/title.  Here's the code generated using a template:

<td class=""><a class="k-link" href="#" data-value="2012/6/10" title="Tuesday, July 10, 2012">
    <div title="" class="selectedDate">10</div>
</a></td>

I've tried to override the title by setting it to "" in my template but the browser just uses the outer title instead.

How can I disable the tooltip?
Iliana Dyankova
Telerik team
 answered on 26 Jul 2012
2 answers
136 views
Is there a way in Kendo to define an empty data template?
Vitantonio
Top achievements
Rank 1
 answered on 26 Jul 2012
4 answers
419 views
  I appreciate any help.. I am trying to use ClientTemplate.

   @Html.Raw(Html.ActionLink("Select", "SelectIt", new { SelectedQueueLevel = "#= QueueLevel #" }, new { @class = "btn" }).ToHtmlString()).ToHtmlString();

as a result I have:
<a class="btn" href="/Core/CollectorQueue/SelectIt?SelectedQueueLevel=%23%3D%20QueueLevel%20%23">Select</a>;

  What I am doing wrong? 
     
Here is the whole thing for grid below:    
 
            @(Html.Kendo().Grid(Model.CollectorQueueGrid)
           .Name("CollectorQueueGrid")
           .Columns(columns =>
                        {
                            columns.Template(item => Html.ActionLink("Select", "SelectIt", new { SelectedQueueLevel = item.QueueLevel }, new { @class = "btn" }))
                                .ClientTemplate(Html.ActionLink("Select", "SelectIt", new { SelectedQueueLevel = "#=QueueLevel#" }, new { @class = "btn" }).ToHtmlString());
                            columns.Bound(item => item.QueueDate).Width(30).Format("{0:MM/dd/yyyy}");
                            columns.Bound(item => item.QueueLevel).Width(150);
                            columns.Bound(item => item.ScheduledTime).Width(20);
                        })
           .DataSource(dataSource => dataSource.Ajax().ServerOperation(false))
            .Sortable()
            .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
           .Groupable()
                  )

Thank you.
Jelena
Top achievements
Rank 1
 answered on 26 Jul 2012
0 answers
109 views
Hi..
I'm trying to open a window (with content from another php page ) from a grid .. the window opens, but only once ... when I try to open again does not work ... this is the code I'm using:

....line of grid calling a custom command....
{command: { text: "Dados de Registro", click: ShowPop}, title: " ", },

...the function to open the window...
function ShowPop()

{var myWin = $("#window");
     if (!myWin.data("kendoWindow")) {
            // window not yet initialized
            myWin.kendoWindow({
                content: 'elt.php',
                title: "elt",
                iframe: true,
                width: "800px",
                height: "400px",
                scrollable: false,
                visible: false
             }).data("kendoWindow").center().open();
     }
   
}

i don't know what to do...

tks
Carlos
Top achievements
Rank 1
 asked on 26 Jul 2012
0 answers
81 views
Hi,

Can I display some grey text within the date picker that disappears on entering the field? Basically, I would like to display the date format. e.g DD/MM/YYYY or MM-DD-YYYY, etc.

Many thanks in advance.
Paul
Top achievements
Rank 1
 asked on 26 Jul 2012
1 answer
477 views
I have a kendo dropdown list that is hidden on form load using jquery .hide(). On the setting of other form elements I need to show the dropdownlist. If I use the jquery .show() it will show the kendo dropdownlist and the original dropdownlist. Is this a bug or is there a particular way this must be done.

Thanks

Andras
Top achievements
Rank 1
 answered on 26 Jul 2012
1 answer
148 views
If I add a filter to the datasource of a listview, the listview.Add() method edits the first list item.  I have copied the listview editing sample and added a filter to demonstrate the problem.

http://jsfiddle.net/ChrisFoster/dND4h/1/
Chris Foster
Top achievements
Rank 1
 answered on 26 Jul 2012
0 answers
420 views
Hi,

I am accessing an OData service to bind a hierarchical data source to a treeview.  Its a homogenous source - i.e service returns same type each time - type being a "Product" object. Basically its a treeview of products - one product being the parent of many others and so on.

The trouble is that when the tree view renders, its showing me the correct number of items in the tree - say, for example, if there are 2 products , it shows 2 nodes correctly but the name is shown as "undefined".

This is despite specifying the correct field name in the "dataTextField" for this object while creating the treeview.

I examined my datasource in chrome debugger and saw that it returns two objects as below 

{b.extends.f, b.extends.f} 

^^ these are the two records (2 products) from my OData service call.
within each object i.e within each of this {b.extends f} , I have a "Product" object and I want to bind the "Name" property of this Product object to the TreeView Nodes. Accordingly, I have mentioned the "dataTextField" as "Name" but I am unable to see this displayed correctly in the treeview. 

What I have observed is that , I am unable to bind any property of the "Product" object in my datasource. But I can bind any other property which is one level above, or NOT within Product node level- 

ex : if the B.extends F contains -

--Product
--uid:'12121212'
-XXX
--stc:'4543543'

etc

I can bind anything inside XXX (say XXX.Name) or Product . But I can mention "dataTextField: 'uid'  " and it will bind 12121212 correctly in tree view.

So looks like I am unable to navigate one level deeper and bind the product name.

I have already tried "children.Name", "Product.Name" etc in the dataTextField property to no avail.  I have attached some screenshots. Please help.

Please help.







Sandeep
Top achievements
Rank 1
 asked on 26 Jul 2012
0 answers
124 views
Hello.

I have such rowTemplate for output my data into the grid:
<script id="row_template" type="text/x-kendo-tmpl">
<tr>
        <td>
            #= UserName #
        </td>
        <td>
            #= FirstName #
        </td>
        <td>
            #= LastName #
        </td>
</tr>
</script>

And I prepared another template if records is not found:
<script id="empty_row" type="text/x-kendo-tmpl">
    <tr>
        <td colspan="7">No records found</td>
    </tr>
</script>

And I need to do some changes between this templates. I mean assign this "empty_row" to the grid when "no records found":
$("table.kendo_grid").kendoGrid({
dataSource: {
  transport: {
  ...
  },
  schema: {
  ...
  },
  change: function (data) {
    if (data.sender.total() == 0) {
       // What I need to write here?
    }
  },
...

Need help.
Thanks.
Pavlik
Top achievements
Rank 1
 asked on 26 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?