check radgrid row visibility at client

11 posts, 0 answers
  1. Gilberto
    Gilberto avatar
    65 posts
    Member since:
    Sep 2006

    Posted 04 May 2009 Link to this post

    I'd like to check the row visibility of a radgrid's row at client.

    I always get false in display variable in code below, even using masterTableView.get_dataItems()[i].style.display, then i get always none

    obs: any rows could be hidden at client side.

    var radGrid = $find('<%= RadGridFuncionalidades.ClientID %>'); 
                    if (radGrid != null) { 
                        var masterTableView = radGrid.get_masterTableView(); 
                        for (var i = 0; i < masterTableView.get_dataItems().length; i++) { 
                            // debugger 
                            var gridItemElement = masterTableView.get_dataItems()[i].get_element(); 
                            var display = masterTableView.get_dataItems()[i].get_display(); 

    Any suggestions?
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 07 May 2009 Link to this post

    Hi Gilberto,

    Could you please elaborate a bit more on the details. What is the way you hide the rows.
    In order to progress in the resolution of this matter It will be best if you send us the problematic page, so we can replicate the issue.

    Looking forward for your reply.

    Sincerely yours,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gilberto
    Gilberto avatar
    65 posts
    Member since:
    Sep 2006

    Posted 08 May 2009 Link to this post

    Well i am hiding some rows at client, using method below, and when i check the row visibility i always get false/none as mentioned.

     var radGrid = $find('<%= RadGridFuncionalidades.ClientID %>');
                    if (radGrid != null) {
                        var masterTableView = radGrid.get_masterTableView();
                        for (var i = 0; i < masterTableView.get_dataItems().length; i++) {
                            var gridItemElement = masterTableView.get_dataItems()[i].get_element();
                            var grid_id_modulo = gridItemElement.cells[1].innerText;
                            if (grid_id_modulo == id_modulo) {
                                masterTableView.showItem(i);
                            } else {
                                masterTableView.hideItem(i);

    Thanks in advance
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 12 May 2009 Link to this post

    Hi Gilberto,

    I am sending you a small runnable application which handles the desired functionality. Give it a try and let me know if you have other questions or problems.

    Best wishes,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Gilberto
    Gilberto avatar
    65 posts
    Member since:
    Sep 2006

    Posted 14 May 2009 Link to this post

    Thank you very much Pavlina.

    Your answer was exactly what i was looking for.

    My mistake was to use :

    var display = masterTableView.get_dataItems()[i].get_display(); 

    instead of:

    var display = masterTableView.get_dataItems()[i].get_visible(); 

    Thanks again

    Gilberto
  7. Mike McGovern
    Mike McGovern avatar
    14 posts
    Member since:
    Feb 2004

    Posted 05 Jun 2009 Link to this post

    i was using build version 2008.2.1001.20 and then upgraded to build version 2008.3.1125.20. both build versions give me this result:

    if i use the get_display() property, it always returns false.
    if i use the get_visible() property, it always returns true.

    i am using a simple example very near the one provided above. i am also showing and hiding rows using the method showItem(index) or hideItem(index).

    all of this is within a user control and the javascript is wrapped in a RadScriptBlock. (I could not use a RadCodeBlock because when the OnGridCreated client event fired, it did not find the javascript function in the user control. The RadScriptBlock did). 

    any hints?
  8. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 08 Jun 2009 Link to this post

    Hi Johnathan,

    Unfortunately the provided information is not enough to determine the exact source of the issue you are facing. At this point I will ask you to open a formal support ticket and send us a simple runnable application with reproduced this erroneous behavior. Thus I could do all my best to find a quick resolution of this problem.

    Greetings,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Mike McGovern
    Mike McGovern avatar
    14 posts
    Member since:
    Feb 2004

    Posted 15 Jun 2009 Link to this post

    it turns out that if i call "set_visible()" passing true/false as an argument to the method before calling "showItem()" or "hideItem()", the functionality works as expected when later verifying the row property "get_visible()".
  10. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 16 Jun 2009 Link to this post

    Hello Johnathan,

    What exactly do you mean by the functionality works as expected when later verifying the row property "get_visible()".
    Could you please elaborate a bit more in the details.

    Sincerely yours,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. Sabro
    Sabro avatar
    4 posts
    Member since:
    Jul 2009

    Posted 12 Jul 2009 Link to this post

    Hi.....

               I have small problem i have used Rad Grid for bank accounts there are 100 records , fields in grid are showing bank account numbers and bank Bank, so when i double click any record so the edit page is opened i the id is available in database so on edit page the account number textbox will be disable,
    thnx
    plz need urgent response
    Arif Cdigital
  12. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 15 Jul 2009 Link to this post

    Hi Arif,

    In order to achieve the desired functionality I suggest that you handles on ItemDataBound event and get the needed textbox. After that check if the id is available and if so set the textbox as read only.
    For more information about how to access the textbox, please refer to the following article:
    Accessing cells and rows

    Sincerely yours,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017