Sign In  Sign Up Live-Chat

Hiding portions of grid

Last post 07-30-2008, 3:50 PM by May01. 3 replies.
Sort Posts: Previous Next
  •  07-25-2008, 5:53 PM 137004

    Hiding portions of grid

    Is there any ways we can hide a portion of a grid? I tried the following options:

    1. I set the rowheight and columnwidth to 0pt. This results in a dark chaos because of all the data in those columns.

    2. So I merged those rows and columns. Now it's hidden.

    3. But if I retrieve a value from a hidden cell, obviously it returns null, as it is merged now

    Is there any ways I can hide them, still able to retrieve the values? May be setting the bgcolor and forecolor of the cells to white may help. But I don't think there are methods available for that. It would be great if you guys can give me solution like GridWeb1.Cells[""].visible = false or atleast GridWeb1.Cells[""].bgcolor = "white".

    Thanks.
     
  •  07-26-2008, 1:03 AM 137022 in reply to 137004

    Re: Hiding portions of grid

    Hi,

    Kindly use Cell.Style.BackColor and Cell.Style.ForeColor properties for your need.

    E.g..,

       WebWorksheets sheets = GridWeb1.WebWorksheets;
       WebWorksheet sheet = sheets["Sheet1"];
       WebCells cells = sheet.Cells;
       cells["A1"].PutValue("a");
       cells["B4"].PutValue("b");
       cells["C5"].PutValue("c");
       cells["D6"].PutValue("d");
       cells["E7"].PutValue("e");

       cells["B4"].Style.BackColor = Color.Transparent;
       cells["B4"].Style.ForeColor = Color.White;  

     

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
  •  07-27-2008, 8:07 PM 137087 in reply to 137022

    Re: Hiding portions of grid

    I'll try it out. Thank you.
     
  •  07-30-2008, 3:50 PM 137608 in reply to 137087

    Re: Hiding portions of grid

    Thank you very much. Problem solved :-)

     
View as RSS news feed in XML