Client Side way to change WebGrid Width

1 reply. Last post: November 14, 2011 8:43 PM by Yudi
Tags :
  • (None)

Hi,

There is a function similar to  grid .SetHeight(int )  that can change grid Width on ClientSide?


Best regards,

Michal

Answers

Yudi Member

The width property is applied on the outer frame element of WebGrid. Please try to use following JavaScript code to change the grid’s width on client-side.

function button1_onclick() {
    var WebGrid1 = ISGetObject("WebGrid1");
    var WebGrid1_Frame = WebGrid1.GetFrameElement();
    var WebGrid1_OuterFrame = WebGrid1_Frame.parentNode;

    WebGrid1_OuterFrame.style.width = 300;

    return true;
}

Hope this helps.

All Replies

Yudi Member

The width property is applied on the outer frame element of WebGrid. Please try to use following JavaScript code to change the grid’s width on client-side.

function button1_onclick() {
    var WebGrid1 = ISGetObject("WebGrid1");
    var WebGrid1_Frame = WebGrid1.GetFrameElement();
    var WebGrid1_OuterFrame = WebGrid1_Frame.parentNode;

    WebGrid1_OuterFrame.style.width = 300;

    return true;
}

Hope this helps.

All times are GMT -5. The time now is 12:08 AM.
Previous Next