Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
148 views
I used in RadGrid:

<

 

Scrolling AllowScroll="True" FrozenColumnsCount="3" UseStaticHeaders="true" SaveScrollPosition="true"/>

 

 

<Resizing AllowColumnResize ="false" EnableRealTimeResize ="true" ClipCellContentOnResize ="true" ResizeGridOnColumnResize="true" />
in IE8 and Firefox, but I have white space below header.
Please suggest the solution.

Regards,
Isabel

 

Pavlina
Telerik team
 answered on 18 Aug 2010
4 answers
180 views
Hi,

I have two radcombo boxes with radtreeviews inside them. These controls are placed inside a RadAjaxPanel. But when i do a selection change in the treeview, the entire page posts back instead of performing ajax request. I have a couple of buttons placed with in this ajaxpanel and all of them raises an ajax request instead of a complete postback.Even an asp.net dropdownlist placed just above the radcombobox raises an ajax request instead of posting back the entire page.
The problem is there only with the radcomboboxes with radtreeviews. Below is a rough layout of the control hierarchy on my page.

<RadAjaxLoadingPanel>
<RadAjaxPanel>
              <ASP:Repeater>
                           <Button1>(Raises ajax request)
                            <Button2>(Raises ajax request)
              </ASP:Repeater>
              <RadDockLayout>
                                  <RadDockZone>
                                              <RadDock>
                                                   <ASP:DropDownList OnSelectedIndexChanged="EventHanler">
                                                    (Raises ajax request on SelectionIndexChanged)
                                                       <RadComboBox>
                                                              <ItemTemplate>
                                                                 <RadTreeView id="Tree1" OnNodeClick="On_NodeClick1">
                                                                   </RadTreeView>
                                                                    (Posts back the page on OnNodeClick)
                                                             </ItemTemplate>
                                                      </RadComboBox>
                                              </RadDock>
                                  </RadDockZone>
                                  <RadDockZone>
                                              <RadDock>
                                                       <RadComboBox>
                                                            <ItemTemplate>
                                                                <RadTreeView id="Tree2" OnNodeClick="On_NodeClick2">
                                                                 </RadTreeView>
                                                                  (Posts back the page)
                                                           </ItemTemplate>
                                                      </RadComboBox>
                                              </RadDock>
                                              </RadDock>
                                  </RadDockZone>
              </RadDockLayout>
</RadAjaxPanel>


Please let me know why this is happening and what i need to do to avoid a postback.

Thank You,
Nanda
Pavlina
Telerik team
 answered on 18 Aug 2010
1 answer
260 views

When using FileExplorer control, I would like to force a download of any files double clicked on, regardless of the type.  I believe the following code (which I took from the sample code) should do the trick:

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

//<![CDATA[

 

 

 

 

 

 

 

function OnClientFileOpen(oExplorer, args) {

 

 

 

var item = args.get_item();

 

args.set_cancel(

 

true);

 

 

 

 

 

 

 

var requestImage = "Handler.ashx?path=" + item.get_url();

 

document.location = requestImage;

}

 

 

//]]>

 

 

 

 

</script>

 

 

 

 

 

 

 

 

<telerik:RadFileExplorer ID="fileExplorer" runat="server" Width="700px" OnClientFileOpen="OnClientFileOpen" EnableOpenFile="true" TreePaneWidth="250px">

 

 

 

<Configuration SearchPatterns="*.*" MaxUploadFileSize="20480000"></Configuration>

 

 

 

</telerik:RadFileExplorer>.

 

However, I get the error message that Handler.ashx doesn't exists.

Fiko
Telerik team
 answered on 18 Aug 2010
1 answer
74 views
Hi all,

I want to change the charts range when a user clicks so they can view the years before and after, to do this I think I will have to change the axis ranges by adding or subtracting 366 to them, is there any way I can achieve this I am not sure how to go about it.

regards,

Ash 
Ves
Telerik team
 answered on 18 Aug 2010
1 answer
246 views
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If (Not IsPostBack) Then
    End If
End Sub
Private Sub LoadEPTexts(ByVal sChapters As String, ByVal sStandards As String, ByVal sEPs As String)
    Try
        Me.rgEPText.DataSource = ListEPTextByChapterAndStandard(sChapters, sStandards, sEPs, 2)
        Me.rgEPText.DataBind()
    Catch ex As Exception
        Throw ex
    End Try
End Sub
Private Sub rgEPText_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgEPText.ItemDataBound
    If (e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = GridItemType.AlternatingItem) Then
        Dim item As GridDataItem = CType(e.Item, GridDataItem)
        If (CInt(item("ReleaseId").Text) <> 2) Then
            item("StatusIndicator").Text = String.Empty
        End If
    End If
End Sub
Protected Function FormatText(ByVal s As String) As String
    Try
        If (s.Length > 210) Then
            Return s.Substring(0, 209) & "..."
        Else
            Return s
        End If
    Catch ex As Exception
        Throw ex
    End Try
End Function
Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
    Me.LoadEPTexts("<Chapters> <Chapter id='54'/> </Chapters>", "", "")
End Sub

 

 

<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
  
        function GridCreated(sender, args) {
            var scrollArea = sender.GridDataDiv;
            var dataHeight = sender.get_masterTableView().get_element().clientHeight;
            if (dataHeight < 350) {
                scrollArea.style.height = dataHeight + 17 + "px";
            }
        }
    </script>
</telerik:RadCodeBlock
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSubmit">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgEPText" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>         
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>    
  
   
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="WebBlue">
    </telerik:RadSkinManager>
    <div>
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
<telerik:RadGrid ID="rgEPText" runat="server" AllowSorting="False" AllowFilteringByColumn="false" AllowPaging="False" AutoGenerateColumns="false" 
    AlternatingItemStyle-HorizontalAlign="Center" AlternatingItemStyle-VerticalAlign="Top" ItemStyle-VerticalAlign="Top" 
    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowMultiRowSelection="false">
        <HeaderStyle Font-Names="Arial" />
        <ItemStyle Font-Names="Arial" />
        <AlternatingItemStyle Font-Names="Arial" />
        <MasterTableView DataKeyNames="EPTextId,StdReleaseId">
            <Columns>
                <telerik:GridBoundColumn DataField="StandardId" Visible="false" UniqueName="StandardId" />
                <telerik:GridBoundColumn DataField="EPTextId" Visible="false" UniqueName="EPTextId" />
                <telerik:GridBoundColumn DataField="StdReleaseId" Visible="false" UniqueName="ReleaseId" />
                <telerik:GridBoundColumn DataField="StandardCycleId" Visible="false" UniqueName="StandardCycleId" />
                <telerik:GridBoundColumn HeaderText="Release" DataField="ReleaseDate" HeaderTooltip="Release Date: Shows the most recent modified date of the EP text" DataFormatString="{0:d}" UniqueName="ReleaseDate" HeaderStyle-Width="50px" ItemStyle-Width="50px" />
                <telerik:GridBoundColumn HeaderText="Status" DataField="StatusIndicator" 
                        HeaderTooltip="Status Indicator: Shows the status (D:Closed, N:New, M:Modified) of the EP text" 
                        UniqueName="StatusIndicator"
                        HeaderStyle-Width="40px" ItemStyle-Width="40px" />
                <telerik:GridBoundColumn DataField="ProgramId" Visible="false" UniqueName="ProgramId" />
                <telerik:GridBoundColumn DataField="ChapterId" Visible="false" UniqueName="ChapterId" />
                <telerik:GridBoundColumn HeaderText="Prg" DataField="ProgramCode" HeaderTooltip="Program: Shows the program the EP text belongs to" UniqueName="Program"  HeaderStyle-Width="30px" ItemStyle-Width="30px"/>
                <telerik:GridBoundColumn HeaderText="Standard"  DataField="StandardLabel" HeaderTooltip="Standard Label: Shows the standard label" UniqueName="StandardLabel" HeaderStyle-Width="85px" ItemStyle-Width="85px" />
                <telerik:GridBoundColumn HeaderText="EP"  DataField="EPLabel" HeaderTooltip="EP: Shows the label for the EP Text" UniqueName="EPLabel" HeaderStyle-Width="20px" ItemStyle-Width="20px" />
                <telerik:GridBoundColumn DataField="ProjectId" Visible="false" UniqueName="ProjectId" />
                <telerik:GridTemplateColumn HeaderText="Element of Performance Text" AllowFiltering="false" HeaderTooltip="Element of Performance Text: Shows the EP text" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:Label ID="lblText" runat="server" Text='<%# FormatText(DataBinder.Eval(Container.DataItem, "EPText")) %>' ></asp:Label>
                        <telerik:RadBinaryImage ID="imgEP" runat="server" ImageUrl="~/Images/c.gif" ToolTip="Indicates that the COP-EP relation exists" Visible='<%# DataBinder.Eval(Container.DataItem, "copfl") %>' />
                        <telerik:RadBinaryImage ID="imgHT" runat="server" ImageUrl="~/Images/h.gif" ToolTip="Indicates that the history tracking exists" Visible='<%# DataBinder.Eval(Container.DataItem, "htfl") %>' />
                        <telerik:RadBinaryImage ID="imgAddendum" runat="server" ImageUrl="~/Images/a.gif" ToolTip="Indicates that the addendum exists" Visible='<%# DataBinder.Eval(Container.DataItem, "adnfl") %>' />
                    </ItemTemplate>                                    
                </telerik:GridTemplateColumn>                    
            </Columns>
            <NoRecordsTemplate>
                <div style="padding:5px;height:50px;text-align:center;vertical-align:middle;">
                    Please select valid EP's !!!
                </div>
            </NoRecordsTemplate>                    
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="True"></Selecting>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
    </telerik:RadGrid>    
    </div>
    </form>
</body>
</html>

I have this radgrid on my page that takes a long time to load. when i debugged i found that, it retrieves the data(990 rows to be exact) from the database in about 4 seconds, but then when it hits the line where it binds the data to the grid it takes more than 20 seconds. On average for the grid to load the data it takes 35 seconds. Could you please help me as soon as possible? Our users are complaining and i am not able to comeup witha  solution on this one.

Thank you.
- Ajay

Pavlina
Telerik team
 answered on 18 Aug 2010
1 answer
88 views
Hi,

I have a telerik grid which has lengthy axis text labels. Due to its length, a part of the text is not shown as described in the attachment. The AutoLayout of Chart is set to false. I tried to fit it within the available space by using the below code but it had no effect.

chart.PlotArea.XAxis[count].TextBlock.Appearance.Position.AlignedPosition = AlignedPositions.Left;
chart.PlotArea.XAxis[count].TextBlock.Appearance.Dimensions.Margins.Left = new Unit(50);

Can anybody help me to display the complete axis text? This is a immediate requirement to be resolved for the client.

Thanks,
Krishna Samaga B.
Nikolay
Telerik team
 answered on 18 Aug 2010
1 answer
103 views
I need to apply some style settings to entire columns of data in a grouped grid. Since the group header is rendered as a single cell in a table, i.e., all the columns are merged into one with the group header text left aligned, I can't do this. Is there a way to make the group header render as un-merged cells? To be precise, I'm trying to attain a split grid. I need to have a single grid appear to be two grids side-by-side. The only way I can think of doing this is to override the styles on a dummy column to be blank, with left and right borders matching that of the grid. 

Thanks, Steve
Dimo
Telerik team
 answered on 18 Aug 2010
18 answers
217 views
Hi,

I have noticed that partial ajaxification does not work on Mono.
The entire page posts back.

I am currently using v2009.2.826.20 and the same thing happens. It works fine on IIS7 but not Mono.

Also, whenever I have a page linked to a master page, and that page contains a RadAjaxManager, that page is inaccesable and gives the following error: Operation is not valid due to the current state of the object
It does however work with RadAjaxPanel but I would like to use RadAjaxManager instead for performance.
The same error also occurs when enabling the compression module.

Thanks,
K

Daniel
Telerik team
 answered on 18 Aug 2010
3 answers
86 views
When the user clicks on a combobox that has already initialised with a value, usually the whole value highlights and when the user types it is overwritten.  This is the expected behaviour.

Sometimes, if the user starts typing quickly, the text they type is inserted into the existing text - it seems that they arre "too fast" for the highlighting to have taken effect.  Is there a way round this?

Thanks
John
Simon
Telerik team
 answered on 18 Aug 2010
5 answers
339 views
I would like certain areas of my html page in an editor to be editable and certain areas non-editable. I tried the following, but it doesn't work properly. It acts differently in different browsers.
IE:
The content is not editable if I click within the td, but if I click outside the td, I'm able to edit it.

Firefox:
I'm unable to edit both the editable and non-editable areas

Chrome:
I'm able to edit both editable and non-editable areas.
Am I missing something?

<telerik:RadEditor runat="server" ID="RadEditor1"  Height="400px">     
      <Content> 
         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
         <html xmlns="http://www.w3.org/1999/xhtml" > 
            <body> 
        <table>
<tr><td contenteditable="false" unselectable="on">Editable</td>
                       <td contentEditable="true" unselectable="off" >NonEditable</td>
                </tr>
        </table>
          </body> 
         </html> 
      </Content> 
</telerik:RadEditor> 
Rumen
Telerik team
 answered on 18 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?