Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
403 views
Hi

I am using Telerik version 2012.3.1308.40

I'm trying to get the full height/width scenario working with splitter controls, and have followed some of the other posts on here and thought I had it working, until I clicked a button and did a postback.

Attached as 5 screen shots which I will reference through this scenario and also the demo html will be shown here.

To start with here is my stylesheet.css I am using to get the desired look and feel for the master page and therefore web site.

*
{
    margin: 0;
    padding: 0;
}
 
html, body, form
{
    height: 100%;
    overflow: hidden;
}
 
.wrapper
{
    min-height: 100%;
    height: 100%;
    margin: 0 auto -59px; /* The bottom margin is the negative value of the footer's height */   
    position: relative;
}
 
.header
{
    height: 87px;
    background-color: Gray;
}
 
.menustretch
{
    height: 26px;
    background-color: Black;
}
 
.toolbar
{
    height: 68px;   
}
 
.content
{
    height: 100%;
}
 
.push
{
    height: 59px; /* .push must be the same height as .footer */
}
 
.footer
{
    height: 59px; /* .push must be the same height as .footer */
    background-color: Gray;
}


The master page is listed below:  This is made up of div's and then using a RadSplitter to hold the contentplaceholder.

<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Site.master.vb" Inherits="Telerik_RadSplitter_Demo.Site" %>
 
<%@ 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">
 
<head runat="server">
    <title></title>
    <link href="../BaseLayout.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="wrapper">
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
 
            <div class="header">
            </div>
 
            <div class="menustretch">
            </div>
 
            <div class="toolbar">
                <telerik:RadToolBar ID="rtbMainToolbar" runat="server" Width="100%">
                    <Items>
                        <telerik:RadToolBarButton Text="New" ToolTip="Add new selection" ImagePosition="AboveText" ImageUrl="~/i/Enabled/document_add.png"></telerik:RadToolBarButton>
                        <telerik:RadToolBarButton Text="Open" ToolTip="Open existing selection" ImagePosition="AboveText" ImageUrl="~/i/Enabled/document_out.png"></telerik:RadToolBarButton>
                        <telerik:RadToolBarButton Text="Edit" ToolTip="Modify selection" ImagePosition="AboveText" ImageUrl="~/i/Enabled/document_edit.png"></telerik:RadToolBarButton>
                    </Items>
                </telerik:RadToolBar>
            </div>
 
            <div class="content">
                <telerik:RadSplitter ID="rsMainContent" runat="server" Width="100%" Height="100%" HeightOffset="240" ResizeWithBrowserWindow="true" ResizeWithParentPane="true">
                    <telerik:RadPane ID="rpMainContent" runat="server" Width="100%" Height="100%">
                        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
         
                        </asp:ContentPlaceHolder>
                    </telerik:RadPane>
                </telerik:RadSplitter>               
            </div>
             
            <div class="push"></div>
        </form>
    </div>
 
    <div class="footer"></div>
</body>
</html>

I've attached the 3 images used in the master page for the radtoolbar.

Then my page is based on the master page and the code is:

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Pages/Site.Master" CodeBehind="TestPage.aspx.vb" Inherits="Telerik_RadSplitter_Demo.TestPage" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="upTest" runat="server">
        <ContentTemplate>
            <telerik:RadSplitter ID="rsSelections" runat="server" Width="100%" Height="100%" VisibleDuringInit="false" Orientation="Horizontal" Visible="true" ResizeWithBrowserWindow="true" ResizeWithParentPane="true">
                <telerik:RadPane ID="rpSelectionsHeader" runat="server" Height="31px">
                    <asp:Label ID="lblSelectionsHeader" runat="server" Text="Selections" BackColor="#541954" ForeColor="White" Height="25px"
                                                style="display: block; padding-left: 10px; padding-top: 6px;"></asp:Label>
                </telerik:RadPane>
 
                <telerik:RadPane ID="rpSelectionsBody" runat="server">
                    <telerik:RadTreeView ID="RadTreeView1" runat="server">
                        <Nodes>
                            <telerik:RadTreeNode Text="First Node" runat="server">
                                <Nodes>
                                    <telerik:RadTreeNode Text="Node 1" runat="server"></telerik:RadTreeNode>
                                    <telerik:RadTreeNode Text="Node 2" runat="server"></telerik:RadTreeNode>
                                    <telerik:RadTreeNode Text="Node 3" runat="server"></telerik:RadTreeNode>
                                    <telerik:RadTreeNode Text="Node 3" runat="server"></telerik:RadTreeNode>
                                </Nodes>
                            </telerik:RadTreeNode>
                            <telerik:RadTreeNode Text="Second Node" runat="server">
                                <Nodes>
                                    <telerik:RadTreeNode Text="Node 1" runat="server"></telerik:RadTreeNode>
                                    <telerik:RadTreeNode Text="Node 2" runat="server"></telerik:RadTreeNode>
                                    <telerik:RadTreeNode Text="Node 3" runat="server"></telerik:RadTreeNode>
                                    <telerik:RadTreeNode Text="Node 3" runat="server"></telerik:RadTreeNode>
                                </Nodes>
                            </telerik:RadTreeNode>
                        </Nodes>
                    </telerik:RadTreeView>                           
                </telerik:RadPane>
 
                <telerik:RadPane ID="rpSelectionsFooter" runat="server">
                    <telerik:RadButton ID="btnSelect" runat="server" Text="Select">
                    </telerik:RadButton>
                </telerik:RadPane>
            </telerik:RadSplitter>
 
            
            <telerik:RadSplitter ID="rsResults" runat="server" Width="100%" Height="100%" VisibleDuringInit="false" Orientation="Horizontal" Visible="false" ResizeWithBrowserWindow="true" ResizeWithParentPane="true">
                <telerik:RadPane ID="rpResultsHeader" runat="server" Height="31px">
                    <asp:Label ID="lblResultsHeader" runat="server" Text="Results" BackColor="#541954" ForeColor="White" Height="25px"
                                                style="display: block; padding-left: 10px; padding-top: 6px;"></asp:Label>
                </telerik:RadPane>
 
                <telerik:RadPane ID="rpResultsBody" runat="server">
                </telerik:RadPane>
 
                <telerik:RadPane ID="rpResultsFooter" runat="server">
                    <telerik:RadButton ID="btnResultsBack" runat="server" Text="Back">
                    </telerik:RadButton>
                </telerik:RadPane>
            </telerik:RadSplitter> 
        </ContentTemplate>
    </asp:UpdatePanel>         
</asp:Content>


When I run the web app and have the screen maximized I get the desired results (Screen 1.png).  If I minimize the screen and re-size it again the splitter is working as I would hope.  The screen re-sizes as in (Screen 2.png).

When I press the Select button the RadSplitter is hidden and another one is shown, to show the results.  This again is re-sized as I would expect. (Screen 3.png)

The problem now comes with the results showing grab the bottom right corner of the minimized screen and drag you can see the main splitter on the mater page re-sizes but the splitter in the update panel doesn't (Screen 4.png).

I have tried this without the update panel and it works better but of course you get the flash of the screen on postback.  Also it doesn't work totally correct as the first splitter retains it's layout until the screen is moved.  So if you re-size the screen to make it smaller, press the Select button, then make the screen smaller still, and press the back button, you get scroll bars as the first splitter hasn't re-sized. (Screen 5.png)

Any ideas or help much appreciated.

Thanks

Dale
Steve
Top achievements
Rank 1
 answered on 01 Jul 2013
10 answers
416 views
get_text:function(){if(this.get_simpleRendering()){return this._text;
}else{return this.get_inputDomElement().value;
}}
Javascript Call stack:
_onChangeHelper()
  get_text()

Way to simulate:
I had bind the postback function on Enter key (onkeypress), the error will occurred when I type few characters and press Enter key immediately.

This is sample markup I using:
<telerik:RadComboBox ID="cboSearchBox" runat="server" Height="88px" EnableLoadOnDemand="true"
                    MarkFirstMatch="false" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
                    AllowCustomText="true"  ShowDropDownOnTextboxClick="false"
                    OnItemsRequested="cboSearchText_ItemsRequested" ShowToggleImage="false" ItemsPerRequest="6"
                    MinFilterLength="3" 
                    OnClientItemsRequesting="SearchController.HandleSendRequest" CloseDropDownOnBlur="true"
                    Width="450px" AutoPostBack="false" OnClientSelectedIndexChanged="SearchController.HandleSelectedIndexChanged"
                    DropDownWidth="450px" HighlightTemplatedItems="true" Filter="None">
 <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" OnClick="btnSearch_Click" />
<script type="text/javascript">
var postbackFunction = "<%= this.Page.ClientScript.GetPostBackEventReference(this.btnSearch, null) %>";
var SearchController = (function () {
TriggerSearch: function () {
            var cb = $find("<%=cboSearchBox.ClientID %>");
                eval(postbackFunction);
        }
} ());
function pageLoad() {
        $("#<%=cboSearchBox.ClientID %>_Input").keydown(function (event) {
            SearchController.SetSearchMessage('');
            if (event.which == 13) {
                SearchController.TriggerSearch();
            }
        });
</script>
This error won't appear if using older version.
Please kindly advise. Thanks :)
Hristo Valyavicharski
Telerik team
 answered on 01 Jul 2013
3 answers
249 views
HI,
is JAVA needed for rendering the Telerik controls on browser ?

Thanks,
Pankaj Kulkarni
Pankaj
Top achievements
Rank 1
 answered on 01 Jul 2013
1 answer
100 views
Hi,
I am having one problem.
There is a radgrid on my aspx page along with the other controls.
When I press enter key in any control like textbox, I get a message asking 'Do you want to delete the record?' which is confirm text of my radgrid delete column. Sometimes it shows me filter options of radgrid if allowFilteringByColumn is set to true.
I need some property like useSubmitBehaviour for radgrid.
Can you help me?
Princy
Top achievements
Rank 2
 answered on 01 Jul 2013
1 answer
83 views
Im trying to figure something out here with my RadGrid, but cant seem to find it. Basically, I need to have a rad grid, where when the pages loads, I go off to the DB to grab 3 things, with the 3rd object being what populates the grid. This object will be a generic DataSet, because the return fields will always be different, depending on some passed in fields.

So the way I have it now, is on the Page_Load, it goes off to the database to get what I need and then stores the 3rd object in a Session variable. Then when the gridView's NeedDataSource event fires, I grab the variable from the Session.Key and then set the datasource to this dataset.

When I click on edit, it fires up the NeedDataSource event again and grabs it from the Session.Key and sets the DataSource again. The fields are then displayed to me, I edit them and hit update, then it again fires the NeedDataSource, and sets the DataSource and my changes to the grid are gone (where and how are these changes saved and stored?). How can I set it so I save these changes to the grids datasource and eventually save/update them to that object I have in the Session, which I can then use a Save button to send it all to the DB and save it.

Basically here is what I want to do. Go to the database and grab my dynamic dataset. When it comes back, bind this to the datagrid and use one of my other objects from the original call to make some fields editable, maxfield length, min field length, numeric only etc. Then when they click update, I want it to update the grid, but not have to make a trip to the database to save it row by row. I want to be able to make a bunch of changes to the grid and then save them all to the database at once by clicking a button.

I have tried setting the EditMode to batch, but its not recognized so it doesnt work. The only options I get are EditForms, InPlace, Popup.

Any help of any kind is appreciated. Examples would be best, but again anything is helpful.
Andrey
Telerik team
 answered on 01 Jul 2013
1 answer
86 views
I am trying to add radchart of stacked type to aspx page. The chart is bound with following data in code behind file as follows.

   ChartSeries cSeries = new ChartSeries();
            ChartSeries cSeries2 = new ChartSeries();
            cSeries.Type = ChartSeriesType.StackedBar;
            cSeries2.Type = ChartSeriesType.StackedBar;
            cSeries.Name = "Blocks Covered";
            cSeries2.Name = "Blocks not covered";

            Dictionary<string, int> dict = new Dictionary<string, int>();
            dict.Add("Common", 20);
            dict.Add("A1", 30);
            dict.Add("A2", 40);
            dict.Add("A3", 50);
            dict.Add("A4", 60);
            int j = 0;
            foreach (string key in dict.Keys)
            {
                j++;

                cSeries.AddItem(dict[key], dict[key].ToString());
                cSeries2.AddItem(dict[key], j.ToString());
                chtCodeCoverage.PlotArea.XAxis.Items.Add(new ChartAxisItem(key, Color.Black));
            }
            chtCodeCoverage.Series.Add(cSeries);
            chtCodeCoverage.Series.Add(cSeries2);

Required out: x-axis should have key values in dictionary.  Y axis values will be values in dictionary and loop counter values.

But x-axis lables are not displayed. please help me. Refer screen shot for more details.

Thanks,
Srikar.

Rosko
Telerik team
 answered on 01 Jul 2013
1 answer
66 views
I am building a hierarchy grid... with Some internal Data structure... having multiple data key fields...
the hierachy works perfectly .. but  a place holder for each data key are created.. and  if they are not added to the column then,
the class.tostring() is called and displayed...

How do make sure the properties/datakeys doesnt get displayed...

The attached PNG will show what i am talking about...

here are the aspx file and cs file needed to understand what i am saying...

DataAccess.cs file..
https://docs.google.com/file/d/0B8irPIpOgH_mNEZjcmhIQkNPQk0/edit?usp=sharing

TestGrid_new.aspx.cs file (this dynamically adds the datasource to the grid... this creates the hierarchy dynamically)
https://docs.google.com/file/d/0B8irPIpOgH_maVQ4T1hvNXU5UE0/edit?usp=sharing

TestGrid_New.aspx (all this has the definition of the Radgrid)
https://docs.google.com/file/d/0B8irPIpOgH_meV9Mc3lyUEprdXc/edit?usp=sharing


Andrey
Telerik team
 answered on 01 Jul 2013
3 answers
118 views
We need to customize these elements to the new theme created using Telerik Visual Style Builder which is not listed in the current list of Controls...

  1. Fieldset
  2. H1 H2 H3 and H4
  3. Window Title Bar Image etc.
(This is already in the VS Builder but cant change its skin according to the theme we designed)
Please help its very urgent .
Bozhidar
Telerik team
 answered on 01 Jul 2013
8 answers
338 views
Good morning, I have a problem with a multiple file upload. 1. Is it true that with multiple file selection there is no way to limit a user to say 10 files. 2. Which event should fire when a file is over the MaxFileSize. 3. Is there a way to limit an overall upload size? Ie can you set a max of 2Mbs so a user can only upload 4 x 500Kb files? Thanks in advance, Kevin
Shinu
Top achievements
Rank 2
 answered on 01 Jul 2013
1 answer
644 views

i insert a item to the radcombobox by code behind.

<telerik:RadComboBox runat="server" ID="RadComboBox_Project" EnableOverlay="true"
                      DataTextField="DisplayName"  DataValueField="ProjectID" Skin="Sunset"
                              EnableLoadOnDemand="True" DataSourceID="ObjectDataSource2"
                      OnSelectedIndexChanged="RadComboBox_Project_SelectedIndexChanged" AutoPostBack="True"
                              HighlightTemplatedItems="true" Label="" Width="100%" NoWrap="True">
                              <HeaderTemplate>
                                   <ul>
                                        <li class="col1">Project Number | Project Name</li>
                                        <%--<li class="col2"></li>--%>
                                   </ul>
                              </HeaderTemplate>
                              <ItemTemplate>
                                   <ul>
                                        <li class="col1"><%# Eval("ProjectNumber") + " | " + Eval("ProjectName")%></li>
                                        <%--<li class="col2"><%# Eval("ProjectName") %></li>--%>
                                   </ul>
                              </ItemTemplate>
<%--                              <Items>
                                            <telerik:RadComboBoxItem Text="Select a Project" Value="0" />
                                </Items>--%>
                         </telerik:RadComboBox>

Code Behind:

Protected Sub RadComboBox_Project_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadComboBox_Project.DataBound
    Dim combo As RadComboBox = DirectCast(sender, RadComboBox)
    If combo.Items.Count > 1 Then
        combo.Items.Insert(0, New RadComboBoxItem("Select a Project", String.Empty))
    End If
End Sub

but it display a empty row in the combobox, how to remove it ? thanks



Nencho
Telerik team
 answered on 01 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?