Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
234 views
Hi , I need a help with exporting to excel / pdf.
I dont know why I cant enter event handler of OnGridExporting event. I have enabled built in command for exporting and added an appropriate event in grid mark up definition.the problem that onCommand event handler is intercepting OnGridExporting event.
please see attached markup file and try to help me . I am using telerik 2009 Q3 version . 

Thanks ! 
<body class="BODY"
    <form runat="server" id="mainForm" method="get"
    <telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" /> 
    <!-- content start --> 
    <asp:CheckBox ID="CheckBox1" Text="Allow multi column sorting" Checked="true" runat="server" 
        onclick="toggleAllowMultiColumnSorting(this, event);" /> 
    <telerik:RadDockLayout runat="server" ID="RadDockLayout1"
        <table width="100%" border="0"
            <tr> 
                <td align="center" rowspan="1" valign="middle" colspan="2"
                    <telerik:RadDockZone ID="RadDockZoneTop" runat="server" Orientation="Vertical"
                        <telerik:RadDock ID="RadDockSearch" runat="server" Title="חיפוש" EnableAnimation="true" 
                            EnableRoundedCorners="true" Resizable="false" DefaultCommands="ExpandCollapse" 
                             > 
                            <ContentTemplate> 
                                <table width="100%"
                                    <tr align="center" valign="middle"
                                        <td> 
                                            <asp:Panel ID="searchPanel" runat="server"
                                                <!-- Search controls Start --> 
                                                <br /> 
                                                <input id="txtSearch" size="40" /> 
                                                <input id="btnSearch" type="button" onclick="SearchCommand(document.getElementById('txtSearch').value);" 
                                                    value="Search" /> 
                                                <br /> 
                                                <br /> 
                                                <!-- Search controls End --> 
                                            </asp:Panel> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </ContentTemplate> 
                        </telerik:RadDock> 
                    </telerik:RadDockZone> 
                </td> 
                <td align="center" valign="middle"
                </td> 
            </tr> 
            <tr>  
                <td> 
                    <telerik:RadDockZone ID="RadDockZoneMiddleLeft" runat="server" Orientation="Vertical"
                        <telerik:RadDock ID="RadDockGrid" runat="server" Title="תוצאות חיפוש" EnableAnimation="true" 
                            EnableRoundedCorners="true" Resizable="false" DefaultCommands="ExpandCollapse"
                            <ContentTemplate> 
                           
                                
                                <telerik:RadGrid ID="RadGrid1" Visible="true" EnableViewState="false" runat="server" 
                                    OnInit="RadGrid1_Init" AllowPaging="true" AllowSorting="True" GridLines="None" 
                                    ShowGroupPanel="true" ShowFooter="true" ShowStatusBar="true" ShowHeader="true" 
                                    AutoGenerateColumns="false" AllowFilteringByColumn="true" OnColumnCreating="RadGrid1_ColumnCreating" 
                                    OnGridExporting="RadGrid1_GridExporting"
                                    <ItemStyle Wrap="false" /> 
                                    <MasterTableView Width="100%" AllowMultiColumnSorting="true" TableLayout="Fixed" 
                                        GroupLoadMode="Server" GroupsDefaultExpanded="true" AllowFilteringByColumn="true" 
                                        CommandItemDisplay="Top"
                                        <Columns> 
                                            <telerik:GridBoundColumn Visible="false" DataField="Id" HeaderText="מזהה ייחודי" 
                                                DataType="System.String" HeaderStyle-Width="80px" FilterControlWidth="40px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="Title" HeaderText="כותרת" DataType="System.String" 
                                                HeaderStyle-Width="400px" FilterControlWidth="370px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="Agency" HeaderText="סוכנות" DataType="System.String" 
                                                HeaderStyle-Width="100px" FilterControlWidth="60px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="EmployeeId" HeaderText="מזהה עובד" DataType="System.Int32" 
                                                HeaderStyle-Width="80px" FilterControlWidth="40px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="ClearanceLevel" HeaderText="רמת אישור" DataType="System.String" 
                                                HeaderStyle-Width="80px" FilterControlWidth="40px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="SiteId" HeaderText="אתר" DataType="System.String" 
                                                HeaderStyle-Width="80px" FilterControlWidth="40px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn Visible="false" DataField="InternalURI" HeaderText="קישור" 
                                                DataType="System.String" HeaderStyle-Width="80px" FilterControlWidth="40px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridTemplateColumn Visible="false" DataField="InternalURI" HeaderText="קישור" 
                                                UniqueName="InternalURITemplate" Aggregate="Count" GroupByExpression="InternalURI Group By InternalURI" 
                                                DataType="System.String"
                                                <ItemTemplate> 
                                                    <asp:Label ID="lblInternalURI" runat="server" Text='<%#Eval("InternalURI") %>'
                                                    </asp:Label> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridDateTimeColumn DataField="CreationDate" HeaderText="תאריך יצירה" DataType="System.DateTime " 
                                                HeaderStyle-Width="80px" FilterControlWidth="40px" DataFormatString="{0:dd/MM/yyyy}"
                                            </telerik:GridDateTimeColumn> 
                                            <telerik:GridBoundColumn DataField="Receptiondate" HeaderText="תאריך קבלה" DataType="System.DateTime" 
                                                HeaderStyle-Width="80px" FilterControlWidth="40px" DataFormatString="{0:dd/MM/yyyy}"
                                            </telerik:GridBoundColumn> 
                                        </Columns> 
                                        <CommandItemSettings ShowExportToExcelButton="true" ShowExportToPdfButton="true" /> 
                                        <PagerStyle AlwaysVisible="true" Position="TopAndBottom" Mode="NextPrevAndNumeric" /> 
                                    </MasterTableView> 
                                    <ClientSettings AllowGroupExpandCollapse="true" AllowDragToGroup="true" > 
                                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" /> 
                                        <Resizing AllowRowResize="false" AllowColumnResize="false" EnableRealTimeResize="True" 
                                            ResizeGridOnColumnResize="True" /> 
                                        <ClientEvents OnCommand="RadGrid1_Command" OnRowDataBound="RadGrid1_RowDataBound" 
                                            OnRowDblClick="RowDblClick" OnRowSelected="RowSelected" OnKeyPress="KeyPress" /> 
                                    </ClientSettings> 
                                    <GroupingSettings ShowUnGroupButton="true" /> 
                                    <FilterMenu EnableTheming="True"
                                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                    </FilterMenu> 
                                </telerik:RadGrid> 
                            </ContentTemplate> 
                        </telerik:RadDock> 
                    </telerik:RadDockZone> 
                </td> 
            </tr> 
            <tr> 
                <td align="center" valign="top"
                    <telerik:RadDockZone ID="RadDockZoneBottom" runat="server" Orientation="Vertical" 
                        Width="100%" Height="100%"
                        <telerik:RadDock ID="RadDockPreviewBottom" runat="server" Title="צפייה מקדימה" EnableAnimation="true" 
                            EnableRoundedCorners="true" Resizable="false" DefaultCommands="ExpandCollapse"
                            <ContentTemplate> 
                                <div id="PreviewDiv" dir="ltr" title="צפייה מקדימה"
                                </div> 
                            </ContentTemplate> 
                        </telerik:RadDock> 
                    </telerik:RadDockZone> 
                </td> 
            </tr> 
        </table> 
    </telerik:RadDockLayout> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
    <br /> 
    <asp:Button ID="clrFilters" runat="server" Text="Clear filters" OnClick="clrFilters_Click"
    </asp:Button> 
    <br /> 
    Events: 
    <asp:Panel ID="Panel1" Style="height: 200px; overflow: auto; padding: 15px;" CssClass="module" 
        runat="server"
    </asp:Panel> 
    <!-- content end --> 
    </form> 
</body> 


code behind : 

   protected void RadGrid1_GridExporting(object source, GridExportingArgs e) 
        { 
          
unable to get here ! ! !     
 
        } 

Daniel
Telerik team
 answered on 28 Jan 2010
1 answer
67 views
Hi All,
I have developed a webpart in which i have used RadToolTip. I set alt attribute in image tag, When i run in MOSS 2007 (IE8), it runs  very well, but don't show tooltip in SharePoint 2010 RC (IE8). Then i set title attribute in image tag, it only show tooltip of image tag, don't show tooltip of RadTooltip control.
Any solution ?
Thanks all help.
Regards,
Tuan
Svetlina Anati
Telerik team
 answered on 28 Jan 2010
1 answer
98 views
Hi All,
  I want to show my own form when doubleclicking on a time slot from the scheduler. I also use resource grouping. Can I do this?
Shinu
Top achievements
Rank 2
 answered on 28 Jan 2010
1 answer
148 views
Hi,

I checked on the Telerik Online Demos - Keyboard support never seems to be working:
Listbox -> Functionality -> Keyboard Support, 
http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/keyboardsupport/defaultcs.aspx
and, Listbox -> Functionality -> Transfer
http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/transfer/defaultcs.aspx

On pressing Tab Key / Shift-Tab, neither the LIstboxes nor the ListBox Transfer buttons seem to be ever reached by the Keyboard.
This is very high priority for my customers since they purchased Telerik to provide Universal Accessibility Compliance and we're stuck with this issue now.
Any helpl would be greatly appreciated.

Thanks and Regards,
Veenu Munjal
Yana
Telerik team
 answered on 28 Jan 2010
3 answers
345 views
Hi,

I want to change the color to red when there is no records in grid to display with message " No records!" but could not able to find out the property to chnage the font color.
i used the

NoMasterRecordsText

 

="<span class=red>No records!</span>"

 

but it doesn't work still text shown in default color.

please Suggest.
bharat kumar
Top achievements
Rank 1
 answered on 28 Jan 2010
0 answers
80 views

Hello,
I am using RadCombobox and DatePicker in my project. I create the controls at runtime (code behined). Also i have downloaded the latest version of the rad:controls. When i run my project in FireFox everything goes fine, but in IE 8 the controls show a weired behavior. It seems that either skins dont apply or what so ever. i am sending the screen shots for how radcombobox and date picker appears. Also there is another issue when i uplaod my project on live, the rad combobox doesnot work properly, i.e, neither it postback nor allow me to make any selection of items (as i have use checkboxes with items). I am using the trial version.
Below is the code where i create both the controls.

For DatePicker

 

 

 

RadDatePicker rdDateTime = new RadDatePicker();

 

rdDateTime.ID =

 

"rdDateTime" ;

 

 

rdDateTime.EnableTyping =

false;

 

rdDateTime.Width = 150;

 

For Combobox:

 

 

 

RadComboBox ddlValue = new RadComboBox();

 

ddlValue.EnableEmbeddedBaseStylesheet =

 

true;

 

ddlValue.EnableEmbeddedSkins =

 

true;

 

ddlValue.Skin =

 

"Outlook";

 

 

 

ddlValue.Width = 150;

 

 

 

ddlValue.ID = "ddlValue" ;

ddlValue.ItemDataBound += new RadComboBoxItemEventHandler(ddlValue_ItemDataBound);

 

 

ddlValue.AutoPostBack = true;

 

ddlValue.SelectedIndexChanged +=

 

new RadComboBoxSelectedIndexChangedEventHandler(ddlValue_IndexChanged);

Now kindly plz tell me how could the look of controls be set.
Thanks in advance

 

 

 

 

Faheem Khan
Top achievements
Rank 1
 asked on 28 Jan 2010
2 answers
216 views
Hi,
I am using Rad Editor with deafult tool set,
when i paste contents like Text, Tables, Images from Ms Word file ,
1)The copied table in editor gets misaligned and not complete visible, i have tried with StripFormattingOnPaste="MSWordRemoveAll,Span,Css,Font" in source code ,it shows complete table but format gets changed like font color, border etc.
2)Also images are not get copied from the word document.

please have look on attached screenshot.
Thanks
Rahul Khinvasara
Top achievements
Rank 1
 answered on 28 Jan 2010
1 answer
127 views
Hi there,
This i smy first use of the Rad AJAX controls and I am a bit stuck.

I followed the Getting Started instructions at:
http://www.telerik.com/help/aspnet-ajax/radfileexplorer-getting-started.html

And when I run my app I can see the File Exporer with a file I put into the folder.
But all of the menu items other than Open are greyed out.
I can see Open and Copy in the right click menu but the rest are grey.

Selecting Open causes the following error:
#########################################################################################################

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /~/Files/dfbsfrbsfb.txt

#########################################################################################################

I can browse to this file using:  http://localhost:49573/Files/dfbsfrbsfb.txt
I have given the ASP.NET Machine Account Modify/Read/Write?List access to this folder.

What am I doing wrong?

Thanks for any help
Richard

Visual Studio 2008
.NET 3.5
XP Sp3
IE 7 and Firefox 3.5.7



P.S. The Onliner help for File Explorer (using the arrow at the top of the component )is a broken link.

Fiko
Telerik team
 answered on 28 Jan 2010
2 answers
460 views
Hi

I have had trouble on an older site with cross-site scripting attacks and I want to be extra sure that I have the proper level of validation in place for upgrading the site.

My question is:

If I have a RadGrid with template columns and the editForm in window mode, and use the standard asp.net validators,
with - regular expression validation for best security -  what happens if the attacker has javascript turned off (the usual case)?

IE does the server side equivalent validation take place anyway, and prevent the postback?

And if not, how do I add the server side validation? ie get access to the edit or insert data before it is irrevocably
saved to the database.

Additionally I would want to check for the insertion of words like script, select, insert, update, delete, files with .js extension etc.

Thanks!

Clive
Tsvetoslav
Telerik team
 answered on 28 Jan 2010
1 answer
310 views

When applying round to top corners on a Bar chart doesn't give the results I was looking for for negative values.
On the bars presenting negative values the actual top corners are rounded not the corners that are furtherst away from the axis.

This markup for a chart displays this:

<telerik:RadChart ID="RadChart1" runat="server" > 
   <Series> 
      <telerik:ChartSeries Name="Series 1">  
         <Appearance Corners="Round, Round, Rectangle, Rectangle, 3">  
         </Appearance> 
         <Items> 
            <telerik:ChartSeriesItem Name="Item 1" YValue="10">  
            </telerik:ChartSeriesItem> 
            <telerik:ChartSeriesItem Name="Item 2" YValue="30">  
            </telerik:ChartSeriesItem> 
            <telerik:ChartSeriesItem Name="Item 3" YValue="-10">  
            </telerik:ChartSeriesItem> 
            <telerik:ChartSeriesItem Name="Item 4" YValue="10">  
            </telerik:ChartSeriesItem> 
         </Items> 
      </telerik:ChartSeries> 
   </Series> 
   <ChartTitle> 
      <TextBlock Text="Rounded Negative Corner">  
         <Appearance TextProperties-Color="Black" TextProperties-Font="Arial, 18pt">  
         </Appearance> 
      </TextBlock> 
   </ChartTitle> 
</telerik:RadChart> 

A workaround for this is simple for static chart (like the one above) all that is needed is to apply <Appearance Corners="Rectangle, Rectangle, Round, Round, 3" /> to the items with negative values.
The following code (C#) does this on itemDataBound for charts that are databound.
        protected void RadChart1_ItemDataBound(object sender, Telerik.Charting.ChartItemDataBoundEventArgs e)  
        {  
                if (e.SeriesItem.YValue < 0)  
                {  
                    e.SeriesItem.Appearance.Corners.BottomLeft = Telerik.Charting.Styles.CornerType.Round;  
                    e.SeriesItem.Appearance.Corners.BottomRight = Telerik.Charting.Styles.CornerType.Round;  
                    e.SeriesItem.Appearance.Corners.TopLeft = Telerik.Charting.Styles.CornerType.Rectangle;  
                    e.SeriesItem.Appearance.Corners.TopRight = Telerik.Charting.Styles.CornerType.Rectangle;  
                }  
        } 

Hope this can be of help to someone.
Ves
Telerik team
 answered on 28 Jan 2010
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?