Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
214 views
On a page I have a tooltip manager and a radgrid.
In every grid row I add a tooltiptargetcontrol to an image.
Image.OnClick pops up the tooltip that loads a usercontrol with data specific to the grid row.

I would like the tooltip to reload the grid (using ajax) upon the OnClientHide event.

Is this possible?
Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 04 Jun 2008
3 answers
249 views

Hi everyone. I need a datepicker object where the user can only select a month and a year.

I thought about hiding the calendar inside the datepicker, leaving only the title with fast navigation buttons. So I setup the control as follows:

<tk:RadDatePicker ...> 
  <Calendar> 
    <CalendarTableStyle CssClass="cssDisplayNone" /> 
  </Calendar> 
</tk:RadDatePicker> 

Upon first rendering this works ok, but as soon as you click any of the navigation buttons, or select a month/year combination, the calendar is drawn again.

What I want is either a dateinput control that shows a month/year selection, or the title part of the calendar working as described above. A selection box like the quick popup when you click the titles would be fine too.

What is the best solution to fix/solve this?
Thanks in advance,
oVan

Konstantin Petkov
Telerik team
 answered on 04 Jun 2008
1 answer
153 views
hi,

In my application I was using Telerik.Web.UI.dll version 2007.3.1314.35. Noe i replaced this with your latest version 2008.1.415.35.  and i m getting error in Rad window. It means my rad window gets open but when i click on its Update or cancel Buttons inside it. It throws error :Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

 I am giving my code below:

<%

@ Page Language="C#" MasterPageFile="~/MasterPages/Dialog.Master" AutoEventWireup="true" CodeFile="DetractionStaging_PopUp.aspx.cs" Inherits="DetractionStaging_PopUp" Title="Untitled Page" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%

@ Register Assembly="RadTreeView.Net2" Namespace="Telerik.WebControls" TagPrefix="radT" %>

<%

@ Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="radC" %>

<%

@ Register Src="~/UserControls/WeightDistribution/WeightDistribution.ascx" TagName="WeightDistribution"

TagPrefix="uc1" %>

<

asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript">

function

handleNodeClick(node)

{

//if this is a parent node, expand it and select the first child

if (node.Parent == null && node.Nodes.length > 0)

{

node.Expand();

node.TreeView.UnSelectAllNodes();

node.Nodes[0].Select();

return false;

}

// Unlock any locked sliders

SliderArrays[0][idxSliderLocked] =

false;

SliderArrays[1][idxSliderLocked] =

false;

SliderArrays[2][idxSliderLocked] =

false;

SliderArrays[3][idxSliderLocked] =

false;

// Make sliders visible

SliderArrays[0][idxSliderDisplay] =

true;

SliderArrays[1][idxSliderDisplay] =

true;

SliderArrays[2][idxSliderDisplay] =

true;

SliderArrays[3][idxSliderDisplay] =

true;

// Redraw the sliders to reflect the new default values

SliderArrays[0][idxSliderDisplayWeight] = node.Attributes[

"DefaultTech"];

SliderArrays[1][idxSliderDisplayWeight] = node.Attributes[

"DefaultEquip"];

SliderArrays[2][idxSliderDisplayWeight] = node.Attributes[

"DefaultPatient"];

SliderArrays[3][idxSliderDisplayWeight] = node.Attributes[

"DefaultProcess"];

SliderDrawTable();

// Change the default DV

var combo = <%= RecursiveFindControl("cboSeverity").ClientID %>;

var item = combo.FindItemByValue(node.Attributes["DefaultDV"]);

if (item != null) item.Select();

// Change the tooltip text

<%= RecursiveFindControl(

"lnkTip").ClientID %>.title = node.Attributes["ChangeTip"];   /// I am getting error here.

return true;

}

</script>

<script type="text/javascript">

function GetRadWindow()

{

var oWindow = null;

if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)

return oWindow;

}

function CloseAndSend(status)

{

GetRadWindow().CallBack(status);

}

</script>

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<asp:FormView ID="fvDetraction" runat="server" DefaultMode="Insert" DataSourceID="dsDetraction"

OnItemCommand="fvDetraction_ItemCommand" OnDataBound="fvDetraction_DataBound">

<EditItemTemplate>

<h1>

Edit Detraction

</h1>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"

HorizontalAlign="Center" Width="75px">

<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

style="border: 0px;" />

</telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" DefaultLoadingPanelID="RadAjaxLoadingPanel1"

EnablePageHeadUpdate="true" runat="server" EnableHistory="True">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="tvDetractionTypes">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="pnlFaults" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<table cellpadding="3" style="width: 450px;">

<tr>

<td>

<asp:Label ID="Label9" runat="server" CssClass="labelStyle" Text="Severity"></asp:Label>

</td>

<td>

<radC:RadComboBox ID="cboSeverity" runat="server" Skin="Office2007" DataTextField="Title"

DataValueField="ID" SkinsPath="~/RadControls/ComboBox/Skins" Width="150px" DataSourceID="dsDValues"

SelectedValue='<%# Bind("DissatisfactionValueID") %>'>

</radC:RadComboBox>

</td>

<td>

<asp:Label ID="Label7" runat="server" CssClass="labelStyle" Text="Source of Feeback"></asp:Label>

</td>

<td>

<radC:RadComboBox ID="cboDetractionSource" runat="server" Skin="Office2007">

</radC:RadComboBox>

</td>

</tr>

<tr>

<td colspan="2" valign="top">

<asp:Label ID="Label3" runat="server" CssClass="labelStyle" Text="Detraction Type"></asp:Label>

<asp:Panel ID="pnlDetractions" Width="250px" runat="server" Style="border: #adc3de solid;

border-width: 1px;">

<radT:RadTreeView ID="tvDetractionTypes" OnNodeBound="tvDetractionTypes_NodeBound" runat="server" BeforeClientClick="handleNodeClick" DataFieldParentID="ParentDetractionTypeID"

Skin="Office2007" DataSourceID="dsDetractionTypes" Height="150px" Width="250px"

DataTextField="Title" DataFieldID="ID"

DataValueField="ID">

</radT:RadTreeView>

</asp:Panel>

</td>

<td colspan="2" valign="top">

<asp:Panel ID="pnlFaults" runat="server">

<asp:Label ID="Label10" runat="server" CssClass="labelStyle" Text="Fault Distribution"></asp:Label>

<uc1:WeightDistribution ID="wdFaults" runat="server" />

<asp:HyperLink ID="lnkTip" ToolTip="Testing..." runat="server" Style="float: right;

margin-top: -10px;"

CssClass="labelStyle">

<asp:Image ID="Image1" runat="server" ImageAlign="Middle" ImageUrl="~/Images/icons/16/help.png" />&nbsp;<asp:Label

ID="imgTip" runat="server" CssClass="labelStyle" Style="font-size: smaller;"

Text="When should I change this?"></asp:Label></asp:HyperLink>

</asp:Panel>

</td>

</tr>

<tr>

<td colspan="4">

<asp:Label ID="Label11" runat="server" CssClass="labelStyle" Text="Remarks"></asp:Label><br />

<telerik:RadEditor ID="edtRemarks" runat="server" EditModes="Design" Skin="Telerik"

Width="620" Height="150" ToolsFile="~/App_Data/BasicToolbar.xml">

<Content></Content>

<SpellCheckSettings SpellCheckProvider="PhoneticProvider" WordIgnoreOptions="None" />

</telerik:RadEditor>

</td>

</tr>

<tr>

<td colspan="4">

<div style="text-align: right; margin-top: 5px;">

<asp:Button ID="cmdUpdate" runat="server" Text="Update" CommandName="Update" />

<asp:Button ID="cmdCancel" runat="server" Text="Cancel" CausesValidation="False"

CommandName="Cancel" />

</div>

</td>

</tr>

</table>

<asp:SqlDataSource ID="dsDValues" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString%>"

SelectCommand="SELECT [ID], [Title] FROM [DissatisfactionValue]">

</asp:SqlDataSource>

<asp:SqlDataSource ID="dsDetractionSources" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString%>"

SelectCommand="qmsLookupRadiologist" SelectCommandType="StoredProcedure">

<SelectParameters>

<asp:SessionParameter DefaultValue="3" Name="accountID" SessionField="AccountID"

Type="Int32" />

</SelectParameters>

</asp:SqlDataSource>

<asp:SqlDataSource ID="dsDetractionTypes" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString%>"

SelectCommand="SELECT ID, Title, ParentDetractionTypeID, Description, ChangeDescription, DefaultDissatisfactionValueID, DefaultTechnologistFault, DefaultPatientFault, DefaultEquipmentFault, DefaultProcessFault FROM DetractionType"

CacheDuration="6000" EnableCaching="False">

<SelectParameters>

</SelectParameters>

</asp:SqlDataSource>

</EditItemTemplate>

</asp:FormView>

<asp:SqlDataSource ID="dsDetraction" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString %>"

SelectCommand="proc_DetractionStaging_qmsSelectDetractionByID" SelectCommandType="StoredProcedure"

OnUpdating="dsDetraction_Updating" UpdateCommand="proc_DetractionStaging_qmsUpdateDetraction" UpdateCommandType="StoredProcedure" >

<SelectParameters>

<asp:QueryStringParameter Name="ID" QueryStringField="id" Type="Int32" />

</SelectParameters>

<UpdateParameters>

<asp:QueryStringParameter Name="AccessionCode" QueryStringField="AccessionCode" Type="Int32" />

<asp:Parameter Name="DetractionTypeID" Type="Int32" />

<asp:Parameter Name="DissatisfactionValueID" Type="Int32" />

<asp:Parameter Name="TechnologistFault" Type="Decimal" />

<asp:Parameter Name="EquipmentFault" Type="Decimal" />

<asp:Parameter Name="PatientFault" Type="Decimal" />

<asp:Parameter Name="ProcessFault" Type="Decimal" />

<asp:Parameter Name="JournalEntryText" Type="String" />

<asp:QueryStringParameter Name="ID" QueryStringField="id" Type="Int32" />

<asp:QueryStringParameter Name="StagedID" QueryStringField="id" Type="Int32" />

</UpdateParameters>

</asp:SqlDataSource>

</

asp:Content>

......................................aspx.cs................

using

System;

using

System.Collections;

using

System.Configuration;

using

System.Data;

using

System.Linq;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.HtmlControls;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Xml.Linq;

using

Telerik.Web.UI;

using

Telerik.WebControls;

using

QAISys.Filters;

public

partial class DetractionStaging_PopUp : QMSDialog

{

protected override void OnPreRender(EventArgs e)

{

base.OnPreRender(e);

if (fvDetraction.CurrentMode == FormViewMode.Edit)

{

}

RegisterTreeviewScrollStartup(RecursiveFindControl(

"tvDetractionTypes"));

}

protected override void OnLoad(EventArgs e)

{

if (!IsPostBack)

{

FormViewMode currentFVM = fvDetraction.DefaultMode;

if (string.IsNullOrEmpty(Request["id"]))

fvDetraction.ChangeMode(

FormViewMode.Insert);

else

fvDetraction.ChangeMode(

FormViewMode.Edit);

if (fvDetraction.CurrentMode != currentFVM) DataBind();

//{

// //Filters f = new Filters();

// //DataSet ds = new DataSet();

// //f.proc_DetractionStaging_qmsSelectDetractionByID(ref ds, 41);

// //fvDetraction.DataSource = ds;

// //fvDetraction.DataBind();

//}

((

UserControls_WeightDistribution)RecursiveFindControl("wdFaults")).ShowInitalValues = fvDetraction.CurrentMode == FormViewMode.Edit;

}

}

protected void tvDetractionTypes_NodeBound(object sender, Telerik.WebControls.RadTreeNodeEventArgs e)

{

e.NodeBound.Attributes.Add(

"ChangeTip", ((DataRowView)e.NodeBound.DataItem)["ChangeDescription"].ToString());

e.NodeBound.Attributes.Add(

"DefaultDV", ((DataRowView)e.NodeBound.DataItem)["DefaultDissatisfactionValueID"].ToString());

e.NodeBound.Attributes.Add(

"DefaultTech", ((DataRowView)e.NodeBound.DataItem)["DefaultTechnologistFault"].ToString());

e.NodeBound.Attributes.Add(

"DefaultEquip", ((DataRowView)e.NodeBound.DataItem)["DefaultEquipmentFault"].ToString());

e.NodeBound.Attributes.Add(

"DefaultProcess", ((DataRowView)e.NodeBound.DataItem)["DefaultProcessFault"].ToString());

e.NodeBound.Attributes.Add(

"DefaultPatient", ((DataRowView)e.NodeBound.DataItem)["DefaultPatientFault"].ToString());

}

protected void fvDetraction_ItemCommand(object sender, FormViewCommandEventArgs e)

{

if (e.CommandName == "Update")

{

string status = "true";

ScriptManager.RegisterStartupScript(this, GetType(), "script", "<script type='text/javascript' language='javascript'>CloseAndSend('true');</script>", false);

//ClientScript.RegisterStartupScript(this.GetType(), "script", "CloseAndbind('true');", true);

}

else if (e.CommandName == "Insert")

ClientScript.RegisterStartupScript(

this.GetType(), "scriptCloseAndRebind", "CloseAndRebind(true);", true);

else

ClientScript.RegisterStartupScript(

this.GetType(), "scriptCancelEdit", "CancelEdit();", true);

}

protected void dsDetraction_Inserting(object sender, SqlDataSourceCommandEventArgs e)

{

updateFieldValues(e);

}

protected void dsDetraction_Updating(object sender, SqlDataSourceCommandEventArgs e)

{

updateFieldValues(e);

}

private void updateFieldValues(SqlDataSourceCommandEventArgs e)

{

e.Command.Parameters[

"@JournalEntryText"].Value = ((Telerik.Web.UI.RadEditor)RecursiveFindControl("edtRemarks")).Content;

UserControls_WeightDistribution wdFaults = RecursiveFindControl("wdFaults") as UserControls_WeightDistribution;

e.Command.Parameters[

"@TechnologistFault"].Value = wdFaults.TechnologistFault;

e.Command.Parameters[

"@ProcessFault"].Value = wdFaults.ProcessFault;

e.Command.Parameters[

"@PatientFault"].Value = wdFaults.PatientFault;

e.Command.Parameters[

"@EquipmentFault"].Value = wdFaults.EquipmentFault;

//e.Command.Parameters["@CurrentUser"].Value = Membership.GetUser().UserName;

e.Command.Parameters[

"@DetractionTypeID"].Value = ((Telerik.WebControls.RadTreeView)RecursiveFindControl("tvDetractionTypes")).SelectedNode.Value;

}

protected void fvDetraction_DataBound(object sender, EventArgs e)

{

if (!IsPostBack && fvDetraction.CurrentMode == FormViewMode.Edit)

{

Telerik.WebControls.

RadTreeNode node = ((Telerik.WebControls.RadTreeView)RecursiveFindControl("tvDetractionTypes")).FindNodeByValue(((DataRowView)fvDetraction.DataItem)["ID"].ToString());

if (node != null)

{

node.Selected =

true;

node.ExpandParentNodes();

}

((Telerik.Web.UI.

RadEditor)RecursiveFindControl("edtRemarks")).Content = ((DataRowView)fvDetraction.DataItem)["Feedback"].ToString();

UserControls_WeightDistribution wdFaults = RecursiveFindControl("wdFaults") as UserControls_WeightDistribution;

wdFaults.EquipmentFault = ((

DataRowView)fvDetraction.DataItem)["EquipmentFault"] as decimal?;

wdFaults.ProcessFault = ((

DataRowView)fvDetraction.DataItem)["ProcessFault"] as decimal?;

wdFaults.PatientFault = ((

DataRowView)fvDetraction.DataItem)["PatientFault"] as decimal?;

wdFaults.TechnologistFault = ((

DataRowView)fvDetraction.DataItem)["TechnologistFault"] as decimal?;

}

}

}

Please help..

Svetlina Anati
Telerik team
 answered on 04 Jun 2008
1 answer
116 views
Hi Telerik Team,

Is it possible to hide the Table Design tab in the Table Wizard?

Thanks,
Claudz
George
Telerik team
 answered on 04 Jun 2008
8 answers
261 views
Hi, All:

What is the default font-name of RadMenu?

Inside my RadMenu, I put:

<rad:RadMenuItem runat="server" Text="All Jobs">
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Geneva; font-size:8pt">
<tr>
<td width="110px">
<asp:Label ID="lblQSearchBkln" runat="server" Text="All Jobs, Search: " Font-Names="Geneva" Font-Size="8pt" Width="110px"></asp:Label>


I can change my Label's font.  But I can not change font else where in my RadMenu.

So, what is the default font-name in RadMenu?  so that I can change my
label's font.

thanks so much.

Stanley Huang
Esperanza Ramos
Top achievements
Rank 1
 answered on 04 Jun 2008
1 answer
167 views
Could someone explain a method of making the Menu show path, no matter how deep the user goes. I have seen the way Telerik suggests, but I can not get it to work. Quite annoying:)

Here's code: just a simple menu with child items:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body>

<form id="form1" runat="server">

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

</telerik:RadScriptManager>

<div>

<telerik:RadMenu ID="RadMenu1" runat="server" Style="z-index: 21; left: 100px; position: absolute; top: 200px">

<Items>

<telerik:RadMenuItem runat="server" Text="Ferrari" NavigateUrl="ferrari.aspx">

<Items>

<telerik:RadMenuItem runat="server" Text="430" NavigateUrl="430.aspx">

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="599" NavigateUrl="599.aspx">

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="612 " NavigateUrl="612.aspx">

</telerik:RadMenuItem>

</Items>

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="Lamborghini" NavigateUrl="lamborghini.aspx">

<Items>

<telerik:RadMenuItem runat="server" Text="Gallardo" NavigateUrl="gallardo.aspx">

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="Murcielago" NavigateUrl="murcielago.aspx">

</telerik:RadMenuItem>

</Items>

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="Porsche" NavigateUrl="porsche.aspx">

<Items>

<telerik:RadMenuItem runat="server" Text="Boxster" NavigateUrl="boxster.aspx">

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="Cayman" NavigateUrl="cayman.aspx">

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="911" NavigateUrl="911.aspx">

</telerik:RadMenuItem>

<telerik:RadMenuItem runat="server" Text="Cayenne" NavigateUrl="cayenne.aspx">

</telerik:RadMenuItem>

</Items>

</telerik:RadMenuItem>

</Items>

<CollapseAnimation Duration="200" Type="OutQuint" />

</telerik:RadMenu>

</div>

</form>

</

body>

</

html>

And the VB

Partial

Class Default2

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim item As String = Server.UrlDecode(Request("Item"))

If Not String.IsNullOrEmpty(item) Then

Dim currentItem As Telerik.Web.UI.RadMenuItem = RadMenu1.FindItemByText(item)

If (Not (currentItem) Is Nothing) Then

currentItem.HighlightPath()

End If

End If

End Sub

End

Class

Atanas Korchev
Telerik team
 answered on 04 Jun 2008
3 answers
112 views
Is there a way to set the default button for the page to be the insert button when focus is in the insert panel so that when enter/return is selected the postback on the insert button occurs automatically?  Like the DefaultButton property for an asp panel control

Thanks
Princy
Top achievements
Rank 2
 answered on 04 Jun 2008
3 answers
169 views
I am Dynamically writing out the tabs and multipage Views.  I am adding a gridview to the pageview.  I can not see the rendered gridview on the screen, however if I view the source from the browser I am able to see that the gridview was writted to the browser.  How can I fix this so I will be able to view the gridView?

Thanks

Randy 
Paul
Telerik team
 answered on 04 Jun 2008
5 answers
526 views
How do I access the hidden field in my grid using JavaScript?  I need to loop thru my grid and check the values the hidden field in all rows when the user hits the submit button.  Values of the hidden field will be YES or NO.  Can someone show me the JavaScript function?
Thanks!
 
   <rad:RadGrid ID="StatesGrid" OnNeedDataSource="StatesGrid_NeedDataSource" AllowMultiRowSelection="true"
      ClientSettings-Scrolling-AllowScroll="true" Skin="Outlook2007" runat="server" AllowSorting="True"
      GridLines="None" AutoGenerateColumns="False" Height="250px" TabIndex="4">
      <MasterTableView>
        <RowIndicatorColumn Visible="False">
          <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="False" Resizable="False">
          <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
          <rad:GridClientSelectColumn UniqueName="GridClientSelectColumn" />
          <rad:GridTemplateColumn HeaderText="All States" UniqueName="TemplateColumnTotalAmount">
            <ItemTemplate>
              <asp:Label ID="Label1" Text='<%# DisplayStateNames(Container) %>' runat="server"></asp:Label>
              <asp:HiddenField ID="hdnIndicator" Value='<%# Eval("Ind_Active") %>' runat="server" />
            </ItemTemplate>
          </rad:GridTemplateColumn>
        </Columns>
      </MasterTableView>
      <ClientSettings ApplyStylesOnClient="True">
        <Selecting AllowRowSelect="True"></Selecting>
        <Scrolling AllowScroll="True"></Scrolling>
      </ClientSettings>
    </rad:RadGrid>
Yavor
Telerik team
 answered on 04 Jun 2008
1 answer
411 views
I have a Splitter & 2 Panes as illustrated in the code below.  The user control that contains a tab strip has content that could be of any height.  Each tab will have a different height.

What I don't want is to see a scroll bar for the pane when I change to longer tabs.  I want the pane to grow to accomodate its own content.

I used the example from another post here on the forum that used the OnClientLoaded of the splitter to use javascript to adjust the height (slightly modified since I don't want it to be smaller than 400 ever).

I should also mention that the content inside of these tabs could change since they could house controls that are able to add rows to themselves so the pane has to be able to grow accordingly.

Here is my code:

<script type="text/javascript">  
      
        function onClientLoaded(splitter, args)  
        {         
            var pane = splitter.getPaneById("<%= paneRight.ClientID %>");  
            var parentContent = pane.getContentElement();  
            var contentHeight = parentContent.scrollHeight;  
 
            if (contentHeight < 400)  
            {  
                contentHeight = 400;  
            }  
          
            // Vertical orientation                       
            splitter.set_height(contentHeight);              
            pane.set_height(contentHeight);   
        }  
      
    </script> 
      
    <Telerik:RadSplitter ID="radSplitter" runat="server" SkinID="Default" Width="100%" OnClientLoaded="onClientLoaded">  
        <Telerik:RadPane ID="paneLeft" runat="server" Width="22px">  
            <Telerik:RadSlidingZone ID="slidingZone" runat="server">  
                <Telerik:RadSlidingPane ID="paneCorporations" runat="server" title="Corporations" Width="250px" EnableDock="False">  
                    <UserControl:TreeView ID="treeView" runat="server" /> 
                </Telerik:RadSlidingPane> 
            </Telerik:RadSlidingZone> 
        </Telerik:RadPane> 
        <Telerik:RadPane ID="paneRight" runat="server" Scrolling="None">  
            <div class="innerContent">  
                <UserControl:TabStrip ID="tabStrip" runat="server" /> 
            </div> 
        </Telerik:RadPane> 
    </Telerik:RadSplitter> 
Svetlina Anati
Telerik team
 answered on 04 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?