This is a migrated thread and some comments may be shown as answers.

giving dynamic style to raddockzone

3 Answers 56 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Priya
Top achievements
Rank 1
Priya asked on 30 Oct 2008, 11:40 AM
Sir
hw to set dockzone.style dynamically.
I need dockzones float=left
Thanks...

3 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 30 Oct 2008, 03:13 PM
Try this:
$find('RadDockZone1').get_element().style.float = "left";

Keep in mind that $find('RadDockZone_ClientID') returns the dockZone client-side object


Hope this helps!

0
Priya
Top achievements
Rank 1
answered on 31 Oct 2008, 06:55 AM
But I the dockzone is created dynamically and i m getg the error
'null' is null or not an object

Dim

zone As New RadDockZone()

 

updatepanel2 =

New UpdatePanel()

 

updatepanel2.ID =

"UpdatePanelDoc" + cnt.ToString()

 

zone.ID =

"zone" + cnt.ToString()

 

zone.Orientation = Orientation.Horizontal

zone.FitDocks =

False

 

Dim strScript1 As String

 

 

strScript1 = "<script language=javascript>"

 

strScript1 +=

"$find('zone').get_element().style.float = left;"

 

strScript1 +=

"<"

 

strScript1 +=

"/script>"

 

Page.RegisterStartupScript(

"MSGE", strScript1)

i also tried with
 strScript1 += "$find('zone.ClientID').get_element().style.float = left;"
But its also not workg n gav me d same error

Thanks

 

0
Priya
Top achievements
Rank 1
answered on 31 Oct 2008, 07:28 AM
sir,
I got the solution.
I simply gave

zone.Style(

"float") = "left"

without any javascript and is working fine

ie,

 

Dim

zone As New RadDockZone()

 

updatepanel2 =

New UpdatePanel()

 

updatepanel2.ID =

"UpdatePanelDoc" + cnt.ToString()

 

zone.ID =

"zone" + cnt.ToString()

 

zone.Orientation = Orientation.Vertical

zone.BorderWidth = 2

zone.FitDocks =

False

 

 

 

zone.Style(

"float") = "left"

 

 

Thanks....

Tags
Dock
Asked by
Priya
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Priya
Top achievements
Rank 1
Share this question
or