Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
419 views
Hi there,

I am using telerik. In which i have facilitate with virtual loading. I am facing problem when i use to provide scroll for the grid. When the grid having less number of data, the grid height is getting reduce, but the same time when i use to scroll down vertical scroll bar,i am seeing some extra space is there. For example, in my grid i am having 22 data over there, and the page size is 20. Then in first page its coming in actual size and in the second page, the grid height is getting reduce according to data height but with some white space. I am using one javascript coding for this: i.e.
<script type="text/javascript">
  function GridCreated()   
  {              
     var grid = document.getElementById('<%=rgCustomer.ClientID %>');                 
     var scrollArea = document.getElementById("ctl00_DataNowContantHolder_rgCustomer_GridData");
     var dataHeight =  document.getElementById("ctl00_DataNowContantHolder_rgCustomer_ctl00");    
     var GridArea = document.getElementById("ctl00_DataNowContantHolder_rgCustomer")
     if(dataHeight.clientHeight < 350)
     {        
         scrollArea.style.height = dataHeight.clientHeight + "px"; 
         scrollArea.style.overflow = "auto";    
     }        
  }
  </script>
But in the same time if i will Change (scrollArea.style.overflow = "hidden"; ) then the grid don't have extra space and also the scroll bar will not be there. But i want the grid should have scroll bar without extra space.
Can anybody help me to come out of this problem?

Vimal Kumar Srivastava
Madhepura(Bihar)
Email Id: vimaltech04@gmail.com

Vimal Kumar
Top achievements
Rank 1
 answered on 07 Sep 2009
1 answer
113 views
I have the images path of my RadEditor set to a folder with about 100 subfolders.  Each of those subfolders has dozens of images in it.  On the production server, it takes almost 3 minutes just for the Image Manager dialog to open and show the 100 sub folders.  Is this normal behavior?  What can I do to speed this up?

Thanks,
Matt
Lini
Telerik team
 answered on 07 Sep 2009
1 answer
239 views
Hi,

How can I make the time column from 1 - 24 hours instead of the US time format which uses the two times 12 format?

HH:mm on the EditFormTimeFormat property has been set.
Helge
Top achievements
Rank 1
 answered on 07 Sep 2009
2 answers
188 views

Hi,

how it is possible to Highlight the current day in the RadScheduler - Control?

I want to highlight the current day like outlook do it. (see attached screenshot)


CSS
<style type="text/css">     
            
div.RadScheduler_Office2007 .rsMonthView .rsTodayCell      
        {      
            background-color: red;      
            color: #fff;      
        }      
    
</style>  
ASCX
<telerik:RadScheduler ID="RadScheduler" runat="server"  Width="100%"   
 
    OnTimeSlotCreated="RadScheduler_TimeSlotCreated" /> 
 
</telerik:RadScheduler> 
CS
        protected void RadScheduler_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)  
        {  
            if (DateTime.Compare(e.TimeSlot.Start.Date, DateTime.Now.Date) == 0)  
            {  
                e.TimeSlot.CssClass = "RadScheduler_Office2007. rsMonthView. rsTodayCell";  
            }  
        }     
 

Laz
Top achievements
Rank 1
 answered on 07 Sep 2009
1 answer
109 views
My Grid and Panel are placed on the right pane of a splitter. The combi of those two forces the right panel to have an inner scrollbar. Can someone have a look? Here is the code...

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="BIS ID Content Runner for the Web " %> 
<%@ 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 id="Head1" runat="server">  
      
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
            <style type="text/css">  
                html, body, form    
                    {    
                    margin:0px;    
                    padding:0px;    
                    height:100%;    
                    background-image: url(Skins/Default/Common/Default_Top.jpg);  
                    background-repeat: repeat-x;  
                    }  
            </style> 
              
        <link rel="stylesheet" type="text/css" href="/css/bis.css">  
          
    <script type="text/javascript">  
        var ArchiveShowing = ("<%= myCR.ArchiveShowing %>" == "True");  
        var OriginalShowing = ("<%= myCR.OriginalShowing %>" == "True");  
    </script> 
    <script type="text/javascript">  
        function ShowProfileForm() {  
            window.radopen("/Forms/Profile.aspx", "winProfile");  
            return false;  
        }  
    </script>    
    <script type="text/javascript">  
        function ShowInsertForm(id) {  
            window.radopen("/Forms/EditRecord.aspx", "insertForm");  
            return false;  
        }  
    </script>    
    <script type="text/javascript">  
        function ShowEditForm(id) {  
            window.radopen("/Forms/EditRecord.aspx?ID=" + id, "editForm");  
            return false;  
        }  
    </script>    
    <script type="text/javascript">  
        function ShowHelpForm() {  
            window.radopen("Forms/Help.aspx", "winHelp");  
            return false;  
        }  
    </script>    
    <script type="text/javascript">  
 
        function ShowAboutForm() {  
            window.radopen("Forms/About.aspx", "winAbout");  
            return false;  
        }  
    </script>    
    <script type="text/javascript">  
      
        function RefreshGrid() {  
            var masterTable = $find("<%= grMain.ClientID %>").get_masterTableView();  
            masterTable.rebind();  
            }   
    </script>    
    <script type="text/javascript">  
 
        function RowSelected(sender, args) {  
                var toolBar = $find("<%=tbMain.ClientID %>");  
                var grid = $find("grMain");  
                var MasterTable = grid.get_masterTableView();  
                var SelectedRows = MasterTable.get_selectedItems();  
                if (SelectedRows.length > 1) toolBar.findItemByValue("tbWijzig").disable();  
                if (SelectedRows.length < 1) toolBar.findItemByValue("tbWijzig").disable();  
                if (SelectedRows.length == 1) toolBar.findItemByValue("tbWijzig").enable();  
                toolBar.findItemByValue("tbVerwijder").enable();  
                if (SelectedRows.length < 1) toolBar.findItemByValue("tbVerwijder").disable()  
 
                if (ArchiveShowing) {  
 
                    toolBar.findItemByValue("tbNaarArch").disable();  
                    if (SelectedRows.length > 0)  
                        toolBar.findItemByValue("tbNaarOrg").enable();  
                    if (SelectedRows.length < 1)  
                        toolBar.findItemByValue("tbNaarOrg").disable();  
                          
                }  
 
                if (OriginalShowing) {  
 
                    toolBar.findItemByValue("tbNaarOrg").disable();  
                    if (SelectedRows.length > 0)  
                        toolBar.findItemByValue("tbNaarArch").enable();  
                    if (SelectedRows.length < 1)  
                        toolBar.findItemByValue("tbNaarArch").disable();  
                          
                }  
            }           
              
    </script> 
        </telerik:RadCodeBlock>          
      
    </head> 
      
    <body class="BODY">  
        <form id="FormMain" method="post" runat="server">  
        <telerik:RadScriptManager  
            ID="ScriptManager" 
            runat="server"   
            EnableTheming="True">  
        </telerik:RadScriptManager> 
          
        <telerik:RadAjaxManager  
            ID="amMain" 
            runat="server" onajaxrequest="amMain_AjaxRequest">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="amMain">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
                        <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
                        <telerik:AjaxUpdatedControl ControlID="grMain" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="tbMain">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
                        <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
                        <telerik:AjaxUpdatedControl ControlID="grMain" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                  
                <%-- <telerik:AjaxSetting AjaxControlID="LeftPane">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="LeftPane"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> --%> 
                <telerik:AjaxSetting AjaxControlID="grMain">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
                        <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
                        <telerik:AjaxUpdatedControl ControlID="grMain" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
          
            <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"></telerik:RadStyleSheetManager> 
                   
                    <asp:SqlDataSource  
                        ID="dsPanelbar" 
                        runat="server"   
                        ConnectionString="<%$ ConnectionStrings:ContentRunner %>"   
                        SelectCommand="SELECT * FROM [q_navbarweb]"   
            onselecting="dsPanelbar_Selecting">  
                    </asp:SqlDataSource> 
              
                    <asp:SqlDataSource  
                        ID="dsGrid" 
                        runat="server"   
                        ConnectionString="<%$ ConnectionStrings:ContentRunner %>"   
                        oninit="dsGrid_Init"   
                        SelectCommand="SELECT * FROM [t_bezoekers]">  
                    </asp:SqlDataSource> 
                              
                <div width="100%"  border="0px" class=workplace>  
                    <telerik:RadToolBar  
                        ID="tbMain" 
                        style="clear:both" 
                        Runat="server" 
                        Width="100%" 
                        BorderStyle="None" 
                        BorderWidth="0px"   
                        onbuttonclick="tbMain_ButtonClick"   
                        Font-Bold="True"   
                        Font-Names="Trebuchet MS" Font-Size="12pt">  
                        <CollapseAnimation  
                            Type="OutQuint" 
                            Duration="200">  
                        </CollapseAnimation> 
                        <Items> 
                            <telerik:RadToolBarButton runat="server" value="tbProfiel"          Text="Hallo, Gebruiker"    CommandName="cmdProfiel"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Text="sep1"                IsSeparator="True"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbNieuw"            Text="Nieuw"               CommandName="cmdNieuw"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbWijzig"           Text="Wijzig"              CommandName="cmdWijzig"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbVerwijder"        Text="Verwijder"           CommandName="cmdVerwijder"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Text="sep2"                IsSeparator="True"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbNaarOrg"          Text="Naar Origineel"      CommandName="cmdNaarOrg"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbNaarArch"         Text="Naar Archief"        CommandName="cmdNaarArch"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" IsSeparator="True"         Text="sep3"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbShowOrg"          Text="Toon Orginelen"      CommandName="cmdToonOrg"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbShowArch"         Text="Toon Archief"        CommandName="cmdToonArch"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Text="sep4"                IsSeparator="True"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbLogUit"           Text="Log uit"             CommandName="cmdLogUit"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbHelp"             Text="Help"                CommandName="cmdHelp"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" value="tbAbout"            Text="About"               CommandName="cmdAbout"></telerik:RadToolBarButton> 
                        </Items> 
                    </telerik:RadToolBar><div style="clear:both"><!-- --></div>  
                    </div> 
                <div class=workplace>  
                <telerik:radsplitter  
                    id="splMain" 
                    runat="server" 
                    height="100%" 
                    width="100%"   
                    Skin="Office2007" 
                    style="clear:both" 
                    HeightOffset="30">  
                    <telerik:radpane  
                        id="LeftPane" 
                        runat="server" 
                        width="212"><telerik:RadPanelBar  
                            ID="pbMain" 
                            Runat="server" 
                            DataFieldID="ID"   
                            DataFieldParentID="ParentID" 
                            DataSourceID="dsPanelbar" 
                            DataTextField="Text"   
                            onitemdatabound="pbMain_ItemDataBound"   
                            width="100%" 
                            Skin="Outlook"   
                            CookieName="ContentRunnerPanelBar"   
                            ExpandMode="FullExpandedItem"   
                            PersistStateInCookie="True"   
                            CollapseDelay="200" ExpandDelay="200" onitemclick="pbMain_ItemClick"   
                            Height="100%"><CollapseAnimation   
                                Duration="220"   
                                Type="InOutElastic" /><ExpandAnimation   
                                Duration="220"   
                                Type="InOutElastic" /></telerik:RadPanelBar><div style="clear:both"><!-- --></div></telerik:radpane> 
                    <telerik:radsplitbar id="RadSplitBar1" runat="server" style="clear:both"></telerik:radsplitbar> 
                    <telerik:radpane id="MainPane" runat="server" style="clear:both"><telerik:RadAjaxPanel  
                        BackImageUrl="~/Common/Images/AppMain/AppMainToolbarBackGround.jpg"   
                        style="clear:both" 
                        ID="apMain" 
                        runat="server" 
                        height="32px" 
                        width="100%"><asp:Panel   
                                ID="Panel3"   
                                runat="server"   
                                Height="33px"   
                                Width="100%"   
                                BackImageUrl="~/Common/Images/AppMain/AppMainToolbarBackGround3.jpg" CssClass="GridAltRow_Outlook"><asp:Panel   
                                    ID="Panel1"   
                                    runat="server"   
                                    Height="4px"   
                                    Width="100%"></asp:Panel><asp:Label  
                                    ID="lblKop" 
                                    runat="server" 
                                    BorderStyle="None"   
                                    BorderWidth="6px" 
                                    Font-Names="Trebuchet MS" 
                                    Font-Size="Medium"   
                                    Text="&amp;nbsp;&amp;nbsp;::BIS ID Content Runner"></asp:Label></asp:Panel></telerik:RadAjaxPanel> 
                        <telerik:RadGrid  
                    ID="grMain" 
                    runat="server" 
                    AllowFilteringByColumn="True"   
                    AllowPaging="True" 
                    AllowSorting="True"   
                    DataSourceID="dsGrid" 
                    GridLines="None"   
                    Height="100%" 
                    Skin="Outlook" 
                    Width="99%"   
                    onitemcommand="grMain_ItemCommand"   
                    onneeddatasource="grMain_NeedDataSource" 
                    oncolumncreated="grMain_ColumnCreated" 
                    AllowAutomaticDeletes="True" 
                    AllowAutomaticInserts="True" 
                    AllowAutomaticUpdates="True"   
                    AllowCustomPaging="True" 
                    onitemdatabound="grMain_ItemDataBound"   
                    onprerender="grMain_PreRender" 
                    ShowFooter="True" 
                    ShowStatusBar="True" PageSize="100" VirtualItemCount="10"   
                            AllowMultiRowSelection="True"   
                            onselectedindexchanged="grMain_SelectedIndexChanged"><PagerStyle AlwaysVisible="True" EnableSEOPaging="True" /><MasterTableView   
                    DataSourceID="dsGrid" 
                    allowcustomsorting="True" 
                                    datakeynames="ID"   
                                    CommandItemDisplay="Top"><RowIndicatorColumn Visible="False"><HeaderStyle Width="20px" /></RowIndicatorColumn><ExpandCollapseColumn Resizable="False" Visible="False"><HeaderStyle Width="20px" /></ExpandCollapseColumn><CommandItemTemplate><img src="Skins/Outlook/Grid/AddRecord.gif" /><a href="#" onclick="return ShowInsertForm();">Nieuw</a> <img src="Skins/Outlook/Grid/AddRecord.gif" /><a href="#" onclick="return RefreshGrid(1);">Ververs tabel</a></CommandItemTemplate><Columns><telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" /><telerik:GridButtonColumn  
                                            ButtonType="LinkButton" 
                                            CommandArgument="{0}"   
                                            CommandName="MyEdit" 
                                            HeaderText="" 
                                            Text="Wijzig" 
                                            UniqueName="colEdit"></telerik:GridButtonColumn><telerik:GridButtonColumn  
                                            ButtonType="LinkButton" 
                                            CommandArgument="{0}"   
                                            CommandName="MyDelete" 
                                            ConfirmText="Wilt u deze regel verwijderen?"   
                                            HeaderText="" 
                                            Text="Verwijder" 
                                            UniqueName="colDelete"></telerik:GridButtonColumn></Columns><EditFormSettings><PopUpSettings ScrollBars="None" /></EditFormSettings></MasterTableView><ClientSettings 
                                    allowkeyboardnavigation="True"><Selecting AllowRowSelect="True" /></ClientSettings><FilterMenu EnableTheming="True" Skin="Outlook"><CollapseAnimation Duration="200" Type="OutQuint" /></FilterMenu></telerik:RadGrid><br /></telerik:radpane> 
                </telerik:radsplitter> 
        <telerik:RadWindowManager   
            ID="wmMain"   
            runat="server"   
            Skin="Default"   
            Height="500px"   
            Left="50px"   
            oninit="wmMain_Init"   
            Top="50px"   
            Width="700px">  
            <Windows> 
                <telerik:RadWindow   
                    ID="winEdit"   
                    runat="server"   
                    Height="500px" 
                    Left="100px" 
                    NavigateUrl="Forms\EditRecord.aspx" 
                    style="display:none;" 
                    Top="100px" 
                    Width="700px" 
                    Modal="True"   
                    Behaviors="Close" BorderWidth="0px">  
                </telerik:RadWindow> 
                  
                <telerik:RadWindow   
                    ID="winProfile"   
                    runat="server"   
                    Left="100px"   
                    NavigateUrl="Forms\Profile.aspx"   
                    style="display:none;"   
                    Top="100px"   
                    width="400" 
                    height="256" 
                    Title="Profile"   
                    Behaviors="Move"   
                    Modal="True"   
                    VisibleStatusbar="False">  
                </telerik:RadWindow> 
                  
                <telerik:RadWindow   
                    ID="winHelp"   
                    runat="server"   
                    Left="100px"   
                    NavigateUrl="Forms\Help.aspx"   
                    style="display:none;"   
                    Top="100px"   
                    width="400" 
                    height="256" 
                    Title="help" 
                    Behaviors="Close" 
                    Modal="True"   
                    VisibleStatusbar="False" Behavior="Close">  
                </telerik:RadWindow> 
 
                <telerik:RadWindow   
                    ID="winAbout"   
                    runat="server"   
                    Left="100px"   
                    NavigateUrl="Forms/About.aspx"   
                    style="display:none;"   
                    Top="100px"   
                    width="400" 
                    height="256" 
                    Title="help" 
                    Behaviors="Close" 
                    Modal="True"   
                    VisibleStatusbar="False" Behavior="Close">  
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
    </form> 
</body> 
</html> 





Dimo
Telerik team
 answered on 07 Sep 2009
1 answer
205 views
Hi,

Can any one please let me know whether we can use the telerik style sheet Manager control to manage the Different style sheets of the web site.

i.e i am having a portal with different modules ,each module having a different theme.
Can we use the style sheet manager in this case
Atanas Korchev
Telerik team
 answered on 07 Sep 2009
1 answer
86 views
Hi

When dragging a Grid row I would like to change the visual of the dragged item either to an icon or to exclude some rows from the visual (I'm dragging a very long row and it extends outside the window). Is this possible, and how?

/Keivan
Dimo
Telerik team
 answered on 07 Sep 2009
1 answer
127 views
I am struggling with enabling/disabling filtering on the client side.  I have a grid that I would like to toggle showing/hiding the filter row on the client side.  However, what I noticed was that the client side functions don't work unless the initial grid has the AllowFilteringByColumn property is set to true.   I see a bunch of threads on this subject but nothing seems like an exact match. 

Also as someone mentioned in one of the other threads,  the basic Filtering demo here has the same problem.  Rework the demo to have the filter initially not shown and you will see the problem I am having.  It works correctly as long as the initial display is ON.  I plan on having this be a user setting that I store off to a cookie or session variable.  

Randy
Princy
Top achievements
Rank 2
 answered on 07 Sep 2009
1 answer
99 views
I have a Hierarchical grid that is updated through radajax.  The problem is
when I rebind my grid due to a change in the datasource or when I expand
the detailtable.  The problem I am having is my grid headers and group
headers are overlapping the vertical scrollbar for the grid and looks
very unprofessional.  Additionally, a horizontal scrollbar is being added
that shouldn't be there since the grid is only 99% wide.  The child table
is also shifting its placement by about 5-10 pxs to the left and adding
scrollbars to itself.

These problems do not exist on startup on the webpage.  Only after a
postback where I rebind the grid.

For these reasons I am trying to shift to an updatepanel, however, that
is proving to be a task in itself.

Any ideas?

Joshua
Pavlina
Telerik team
 answered on 07 Sep 2009
1 answer
168 views
Hello sir

 I hv one radwindow when it minmize it will on screen ... i dont watn like this , i want when i click minmize the radwindow, it will minimize in docking zone .............when i click on dock it will maximize ....... Is this possible to hold the RAdwindow inside Dock.

The Radwindow contains the one aspx page
 <telerik:RadWindow ID="RadWndCart" runat="server" Modal="false" VisibleStatusbar="False"
                                                                                        Behavior="Move,Minimize" Skin="Black" Title="Cart" Top="150px" Left="250px" Width="700px"
                                                                                        NavigateUrl="CreateProject3.aspx" Height="480px">


Urgent reply

Thanks

Rahul
Top achievements
Rank 1
 answered on 07 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?