Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hi

I need to make grid pager look like as show on http://knox.netliance.net/Pump/IndexUI.aspx
but not able to make it like that.

Can you please help me for css?

Regards
Atul Kumar Srivastav
Princy
Top achievements
Rank 2
 answered on 07 Feb 2013
7 answers
278 views
Hi, I have a RadGrid defined below. When I click the built-in "Export to PDF" button I get the error listed below:

<telerik:RadGrid ID="RadGrid4" runat="server" Width="99.7%" PageSize="20" AllowPaging="false"
                            AllowSorting="True" AllowFilteringByColumn="false" AllowMultiRowSelection="True"
                            ShowGroupPanel="false" GridLines="None" ShowFooter="false" ShowHeader="true" GroupingEnabled="false"
                            Skin="WebBlue" EnableHeaderContextAggregatesMenu="false" EnableHeaderContextMenu ="false"
                            AutoGenerateColumns="false" EnableViewState="True"
                            OnItemCommand="RadGrid4_OnItemCommand" OnDetailTableDataBind="RadGrid4_DetailTableDataBind" OnItemDataBound="RadGrid4_OnItemDataBound" OnNeedDataSource="RadGrid4_NeedDataSource"
                            OnGroupsChanging="RadGrid4_OnGroupsChanging" OnColumnsReorder="RadGrid4_OnColumnsReorder">
                             
                            <MasterTableView HierarchyLoadMode="ServerBind"
                             CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false"
                             CommandItemSettings-ShowExportToExcelButton="true" CommandItemSettings-ShowExportToWordButton="true"
                             CommandItemSettings-ShowExportToPdfButton="true" CommandItemSettings-ShowExportToCsvButton="true" AllowMultiColumnSorting="true"
                             Caption="">
 
                                 <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Name" meta:resourcekey="labName" UniqueName="strEnterpriseSiteContactNameValue" HeaderStyle-Width="50%" Resizable="true" Reorderable="true" SortExpression="strEnterpriseSiteContactNameValue">
                                            <ItemTemplate>
                                              <%# Eval("strEnterpriseSiteContactNameValue")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
 
                                        <telerik:GridTemplateColumn HeaderText="Title" meta:resourcekey="labTitle" UniqueName="strEnterpriseSiteContactTitleValue" HeaderStyle-Width="50%" Resizable="true" Reorderable="true" SortExpression="strEnterpriseSiteContactTitleValue">
                                            <ItemTemplate>
                                              <%# Eval("strEnterpriseSiteContactTitleValue")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
 
                                        <telerik:GridTemplateColumn HeaderText="Company" meta:resourcekey="labCompany" UniqueName="strEnterpriseSiteContactCompanyValue" HeaderStyle-Width="50%" Resizable="true" Reorderable="true" SortExpression="strEnterpriseSiteContactCompanyValue">
                                            <ItemTemplate>
                                              <%# Eval("strEnterpriseSiteContactCompanyValue")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        
                                  </Columns
 
                                        <DetailTables>
                                            <telerik:GridTableView ShowHeader="false" Name="Detail">
                                                <Columns>
                                                    <telerik:GridTemplateColumn HeaderText="" UniqueName="strEnterpriseSiteContactField" HeaderStyle-Width="25%" ItemStyle-CssClass="GridFieldColumn" Resizable="true" Reorderable="true">
                                                        <ItemTemplate>
                                                          <%# Eval("strEnterpriseSiteContactField")%>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="" UniqueName="strEnterpriseSiteContactFieldValue" HeaderStyle-Width="75%" Resizable="true" Reorderable="true">
                                                        <ItemTemplate>
                                                          <%# Eval("strEnterpriseSiteContactFieldValue")%>
                                                          <asp:HyperLink ID="hlEnterpriseSiteContact" Target="_blank" runat="server" Text='<%# Eval("strEnterpriseSiteContactLinkResource")%>' NavigateUrl='<%# Eval("strEnterpriseSiteContactLinkValue")%>'></asp:HyperLink>
                                                          <asp:Image runat="server" ID="imageProfile" ImageUrl='<%# "ImageHandler.ashx?FileLocation=" + DataBinder.Eval(Container.DataItem, "strEnterpriseSiteContactProfileImageDirectoryPath") + "&FileName=" + DataBinder.Eval(Container.DataItem, "strEnterpriseSiteContactProfileImageFilePath") %>' AlternateText="" Height="80px" Width="65px" BorderWidth="0"></asp:Image>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>  
                                            </telerik:GridTableView>
                                        </DetailTables>
 
                            </MasterTableView>
 
                            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
 
                                    <ClientSettings AllowRowsDragDrop="false" AllowDragToGroup="false" AllowColumnsReorder="false" ReorderColumnsOnClient="false" ColumnsReorderMethod="Reorder">
                                        <Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="false" AllowColumnResize="true" AllowResizeToFit="true"/>
                                        <Animation AllowColumnReorderAnimation="false" AllowColumnRevertAnimation="true" />
                                        <Selecting AllowRowSelect="false"  />
                                    </ClientSettings>
 
                                    <SortingSettings SortedBackColor="Azure" EnableSkinSortStyles="false" />
 
                           <GroupingSettings ShowUnGroupButton="true" />
 
                        </telerik:RadGrid>

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.SystemException: System.ArgumentException: Illegal characters in path.
  at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
  at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
  at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
  at System.Web.InternalSecurityPermissions.PathDiscovery(String path)
  at System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping)
  at System.Web.HttpRequest.MapPath(VirtualPath virtualPath)
  at System.Web.HttpServerUtility.MapPath(String path)
  at Telerik.Web.Apoc.Image.ApocImageFactory.TryMapPath(String path, String& physPath)
  at Telerik.Web.Apoc.Image.ApocImageFactory.Make(String href)
  at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

I found out that it has to do with the ImageURL of the <asp:Image> contained in of the child grid column. If I put a URL link (like "http://somedomain.com/someimage.jpg") it exports correctly.

Is there a way to workaround this or, worse case, handle the export event and remove the image from the export?

Thanks
Kostadin
Telerik team
 answered on 07 Feb 2013
1 answer
148 views
Hi,

I ajaxified a combobox which works fine, but I want it to be rendered inline:

ajaxManager.AjaxSettings.AddAjaxSetting(cb1, cb2, null, UpdatePanelRenderMode.Inline);

The control will be updated, but the generated panel won't be rendered as inline-block.
Using

AjaxSetting setting = new AjaxSetting(cb1.ID);
         setting.UpdatedControls.Add(new AjaxUpdatedControl(cb2.ID, null)
            {
               UpdatePanelRenderMode = UpdatePanelRenderMode.Inline
            });
         ajaxManager.AjaxSettings.Add(setting);
won't generate a panel at all and will throw an exception on postback because of the missing panel.

What else is necessary that the panel gets rendered as inline-block?
Maria Ilieva
Telerik team
 answered on 07 Feb 2013
1 answer
167 views
Hello,

  I use Telerik for ASP.Net Ajax controls version 2012.3.1308.40 (.Net 4.0) and I have a RadEditor in a web part for SharePoint 2013 that exposes the button Toggle Full Screen Mode. Once I click this button the toolbar are gone and all I see is the editor part of the control where I can edit, invoke the spell check functionality, etc, but not the tool bars. I built an ASP.Net app and everything works ok.
Also, the same version of the Telerik controls but for .Net 3.5 in SharePoint 2010 works ok.
IE 8, 9, 10 same bahavior.
Any idea?

Thanks,
Nic
Rumen
Telerik team
 answered on 07 Feb 2013
1 answer
73 views
Hi,

My scenario is , If user did not check atleast sinlge Item from the List box then i have to show an error message like please select Items/Items from the RadListBox. For this i went to Custom validator, and writen a Client side function . Actually this Validator function has to execute if user clicked on the button or while post back... but this Custom validator function is going to excute while user click on the Check box Item. Please provide ur advice to over come from this scenario. I am adding my code snipet.

If i check or uncheck the RadListbox item then this JavaScript function is excuting ...
Is_Event_selected(sender, args) {} .....

please provide ur Comments ASAP

<%

 

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>

<!

 

 

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></title>

 

<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />

 

<script type="text/javascript">

 

function Is_Event_selected(sender, args) {

 

debugger;

 

var lstbox = $find("lstEvents");

 

var chkedItems_Count = lstbox.get_checkedItems().length;

args.IsValid = chkedItems_Count > 0;

}

 

</script>

</

 

 

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" Name="Telerik.Web.UI.Common.Core.js" />

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />

 

<asp:ScriptReference Assembly="Telerik.Web.UI" 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">

 

</telerik:RadAjaxManager>

 

<div>

 

<asp:CustomValidator ID="CV_lstEvents" runat="server" ValidateEmptyText="true" ClientValidationFunction="Is_Event_selected"

 

ControlToValidate="lstEvents" ErrorMessage="please Select Items(s)" ValidationGroup="Event_Group_Validation">

 

</asp:CustomValidator>

 

<telerik:RadListBox ID="lstEvents" runat="server" Width="100%" MaxHeight="225px"

 

CheckBoxes="true" AutoPostBack="false" EmptyMessage="Select Event" CausesValidation="false" >

 

<Items>

 

<telerik:RadListBoxItem Text="Ajax Controls" Value="0" />

 

<telerik:RadListBoxItem Text="BI Controls" Value="1" />

 

<telerik:RadListBoxItem Text="SilverLight" Value="2" />

 

<telerik:RadListBoxItem Text="KenDo UI" Value="3" />

 

</Items>

 

</telerik:RadListBox>

 

<asp:Button ID="btn" runat="server" ValidationGroup="Event_Group_Validation" />

 

</div>

 

</form>

</

 

 

body>

</

 

 

html>

Nencho
Telerik team
 answered on 07 Feb 2013
3 answers
128 views
I've encountered an issue in trying to find a way to set the default time on a raddatetimepicker control. I found a solution posted in 2009 here (http://www.telerik.com/community/forums/aspnet-ajax/input/set-default-time-on-datetimepicker.aspx), however have discovered that the solution provided used a version of the controls from 2009. Using any of the more recent versions of the controls, including the most recent release, causes a stack overflow error.

This is a huge problem for the app I'm developing and need a way to fix it promptly. Ideally, Telerik would just put in a default time property for the designer like there should have been in the first place. Any help from you folks or Telerik personnel would be most appreciative. 

Here is the markup. You can replicate the issue with a basic .aspx file and changing the reference between older 2009 controls and a current build.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<%@ 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>
 
    <script type="text/javascript">
        var isTimeSelected = false;
 
        function DateSelected(sender, args) {
 
            if (!isTimeSelected)
 
                sender.get_timeView().setTime(null, 23, 59, 0);
 
            isTimeSelected = false;
        }
        function ClientTimeSelected(sender, args) {
            isTimeSelected = true;
        
    </script>
 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server">
            <ClientEvents OnDateSelected="DateSelected" />
            <TimeView ID="TimeView1" runat="server" OnClientTimeSelected="ClientTimeSelected">
            </TimeView>
        </telerik:RadDateTimePicker>
    </div>
    </form>
</body>
</html>

Maria Ilieva
Telerik team
 answered on 07 Feb 2013
15 answers
582 views
When attempting to validate input in a RadComboBox you should be able to display the EmpyText property without setting AllowCustomText to true. 

  1. The control should allow the placing of "Select a Following..." in the EmptyMessage
  2. The AutoCustomText should be able to be set to False
  3. The MarkFirstMatch should be able to be set to True.
  4. A standard .NET validator should be able to validate that nothing is selected (the EmpyMessage is being displayed). 

 

A sample of what ideal code would look like would look something like this:

                Dim drp As New Telerik.Web.UI.RadComboBox  
                drp.ID = input_name  
                drp.Skin = "Vista" 
                drp.Width = Unit.Percentage(75)  
                drp.AllowCustomText = False 
                drp.MarkFirstMatch = True 
                drp.EmptyMessage = "Select State" 
                Dim li As New Telerik.Web.UI.RadComboBoxItem  
                li.ForeColor = Color.DarkGray  
                li.Font.Italic = True 
                li.Text = "Texas" 
                li.Value = "TX" 
                drp.Items.Add(li) 

(the code below worked great, BTW)

Thanks, Laird Rixford
Insurance Website Builder

Cat Cheshire
Top achievements
Rank 1
 answered on 07 Feb 2013
5 answers
343 views
Hi,

I have a RadCombobox which displays a status:
  • New
  • Selected
  • Not selected
  • Mandatory
  • Rejected

I want the backgroundcolor of the combobox to be dependent of the selected value (e.g. New -> blue, Selected -> green etc.).
Preferably I want to solve this with different styles from a stylesheet.

is this possible and how do I do this?

Paul
Kate
Telerik team
 answered on 07 Feb 2013
1 answer
147 views
Hi
     Can anyone help me give header to the expand/collapse column in my radgrid. Thanks for your help

Regards
RT
Shinu
Top achievements
Rank 2
 answered on 07 Feb 2013
2 answers
101 views

Dear,
please i would like to ask one question about RadOrgChart xml

        which is what is the node name of the image

        what i mean i need to add node image to this node   <Node> 
             

        <Node> 

            <Fields>

                <Field Text="Boss" />

            </Fields>

            <Items>

                <Item Text="Boss name" />

            </Items>

         what is the this node name ?

best regards
Plamen
Telerik team
 answered on 07 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?