Javascript equivalent to C# code.

  1. #1

    Javascript equivalent to C# code.

    Hello,

    I have a GridPanel and I can set it's height in C# by using following code:

    gridPanel.Height = 200;
    Now I need a Javascript equivalent to this code, because the height of my grid will depend onsome values that I can get only on the client side of the application. In other words I need to set GridPanel height using values from javascript.

    Please provide me the code example which will select the grid and then change it's height exacaly like Height property does. I can use all server side values to build my script, because I'm preparing it in code behind so feel free to use every GridPanel members that are avaible and ready in OnLoad method.

    Thanks in advice for all answers.

    Regards
  2. #2
    Hi,

    gridPanel.setHeight(200);
  3. #3
    How can you tell that it will have the name gridPanel on client side? What if I put it into control and then will have many panels with the same name? Which property in c# code should I use to gets it's unique name?
  4. #4
    Hi,

    Controls uses ClientID as id on client side therefore read ClientID to determine client identificator

Similar Threads

  1. [CLOSED] Migrating to 2: Javascript code issues
    By PhilG in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: May 21, 2012, 11:01 AM
  2. Replies: 2
    Last Post: Apr 02, 2012, 8:03 PM
  3. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM
  4. Javascript to server side code
    By Birgit in forum 1.x Help
    Replies: 0
    Last Post: Sep 24, 2010, 7:56 AM
  5. [CLOSED] select a row in grid from javascript code
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 25, 2010, 5:34 AM

Posting Permissions