Telerik Forums
Kendo UI for jQuery Forum
5 answers
683 views
I have finally tracked down a bug in  Grid.hideColumn() that has been troubling me for months.

if you call hideColumn() when you grid is not visible because the grid elements is 0 width or height, or otherwise not visible, the column will not be hidden, and the grid will be in an inconsistant state, with columns assuming other columns widths and other weird behavior.

This occurs for me when including a Grid in a Tab that has a fade in animation. If you programatically hide columns in the Grid on document load while the tab is still fading in, the grid will not be visible and hideColumn will fail.

This is caused by the use of the :visible custom jquery selector in the selector to find the grid column header or footer cell. 

from the JQuery documentation.

"Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero."

Even though the JQuery documentation states

"During animations that hide an element, the element is considered to be visible until the end of the animation. During animations to show an element, the element is considered to be visible at the start at the animation."

This does not appear to be the case, at least for a kendoui tab strip builder with ".Animation(a => a.Open(o => o.Fade(FadeDirection.In).Duration(200)));" set as the animation. I assume the above quote does not apply to elements that are hidden because of parent elements animations.

The fix for the issue is to avoid the :visible selector in the Grid.hideColumn() method and use a filter instead.

Change:

hideColumn: function(column) {
.
.
.
that.thead.find(">tr>th:not(.k-hierarchy-cell,.k-group-cell):visible").eq(columnIndex).hide();
            if (footer) {
                that._appendCols(footer.find("table:first"));
                footer.find(".k-footer-template>td:not(.k-hierarchy-cell,.k-group-cell):visible").eq(columnIndex).hide();
            }
.
.
.
to

that.thead.find(">tr>th:not(.k-hierarchy-cell,.k-group-cell)").filter(function () { return $(this).css("display") != "none"; })
                .eq(columnIndex).hide();
            if (footer) {
                that._appendCols(footer.find("table:first"));
                footer.find(".k-footer-template>td:not(.k-hierarchy-cell,.k-group-cell)").filter(function () { return $(this).css("display") != "none"; })
                    .eq(columnIndex).hide();
            }






Nikolay Rusev
Telerik team
 answered on 23 Apr 2013
2 answers
65 views
I found a bug in the official demo for using a MultiSelect in a Grid.  I need help fixing it as I am doing the same thing for a production application.

Steps to reproduce:
1)  Edit a row with more than 1 territory
2)  Remove one or more territories
3)  Save/Update (values show up fine)
4)  Edit again, but don't change anything.
5)  Hit cancel... the old territory(s) that you previously removed shows up again.  Ack!

I haven't figured it out the cause yet.  Any help would be appreciated.  Thanks.
Vladimir Iliev
Telerik team
 answered on 23 Apr 2013
0 answers
29 views
Just wondering if there is any App Build by any Company at app store and we can use just to see how it looks like ?

and i mean Apps used Kendo UI
Aziz
Top achievements
Rank 1
 asked on 23 Apr 2013
3 answers
63 views
Whenever I have a partial postback and refresh the upload control, I get a drop area that gets nested inside the most nested drop area.  Each postback just nests it one more.  As far as I can tell, this has just been since Q1 2013.  It is causing the height of the control to increase with each postback and pushing content down.  I've noticed this with IE 10, Chrome 28, and Firefox 20.  I saw the notice about 1.9.1, and I still get this issue with the internal build from yesterday (4/16). 
T. Tsonev
Telerik team
 answered on 23 Apr 2013
1 answer
79 views
How to traversal all the cell in a grid? I want to get all the cell  and color them by the cell ,means I must  get the row's dateitem and the cell's  coloumn header?
Iliana Dyankova
Telerik team
 answered on 23 Apr 2013
1 answer
273 views
Please help me How Can i drag and drop Items ( multiple ) from one Treeview to another
Petur Subev
Telerik team
 answered on 23 Apr 2013
1 answer
62 views
Hi,

I have situation where I need to show multiple views at the same time in a pane. I have a split view with two panes, on the right pane I have to show multiple views (check screenshot).

Please tell me with an example how can I accommodate multiple views in a single pane ?

thanks Dave
Alexander Valchev
Telerik team
 answered on 23 Apr 2013
2 answers
337 views
I'm using the editor for a field that can be posted to the server.

                    @( Html.Kendo().EditorFor(model => model.TickerContent)
                           .Name("TickerContent")
                           .Encode(true)
                           .HtmlAttributes(new { style = "width:100%;height:440px" }))

On the same page as the form I have a list of items that I want to be able to edit, so I need to set the value of the editor. The demo code uses the following code to get and set the value of the editor:

<script>
    $(document).ready(function () {
        var editor = $("#Editor").data("kendoEditor");

        var setValue = function () {
            editor.value($("#value").val());
        };

        $("#get").click(function () {
            alert(editor.value());
        });

        $("#set").click(setValue);
    });
</script>

The value of variable editor is always undefined. My question is how can I get and set the editor value?

I tried var editor = $("#TickerContent").data("kendoEditor"); but the editor is still undefined.
Ryan
Top achievements
Rank 1
 answered on 23 Apr 2013
1 answer
52 views
Is there a way to get the New Kendo UI Menu to act like the following Telerik->Sitemap Control Sample
http://demos.telerik.com/aspnet-ajax/sitemap/examples/flow/defaultcs.aspx

I would like an Expaded Sitemap Menu Style to be placed on my website.

Much like the Telerik SiteMap -> Flow or SiteMap - Multiple Columns examples.

thanks

Larry
Alexander Valchev
Telerik team
 answered on 23 Apr 2013
1 answer
45 views

I want to achieve a result:    when i have many rows to show in the grid ,  if  the first colmun content of each row is the same  i want hide the content except the first coulmn 's 

 when  scrolling,  the first colmun content of the first  row  will  be fixed on it's previous positon  untill  another  column witch is unsame comes

just like the address book of iphone 

sorry  my  english is so poor .....  any suggestions?

Dimiter Madjarov
Telerik team
 answered on 23 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?