Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
135 views
Hi All,

How to attach report extracted from the grid as attachment in an email without saving the exported report as a file in server or at client End.
Currently I can export the grid data into a file at server and attaching it to the email.
I does not want to save the report in server or at clientlocation.
I just want to attach the exported report as attachment in email and send to client.

Thanks in advance
-Anto
Daniel
Telerik team
 answered on 09 Feb 2010
1 answer
95 views
I have a Tabstrip with 2 tabs.

In each tab I have 10 radtextbox (multiline, with message for empty message). The first tab doesnt have any problems for moving among the textboxes, but when I select the second tab, I experiment a 2-3 seconds for moving among the textboxes.

Any suggestion?
Schlurk
Top achievements
Rank 2
 answered on 09 Feb 2010
3 answers
129 views
I am trying to do something similiar to your demo for an advanced editor.

http://demos.telerik.com/aspnet-ajax/editor/examples/editorinradwindow/defaultcs.aspx

Where mine differs is that my editor is already contained in a RadWindow.  It functions, but the problem is that the advanced editor window needs to be larger than the window it was called from.  I followed another thread/demo I found that shows how to call a window using the parent window and the window opens up, but now the content does not get passed back and forth because the client events no longer fire. I have attached my client side code for your review.

Main Editor:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MessageManagement.aspx.vb" Inherits="MessageManagement" %> 
<%@ 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 runat="server">  
    <title>Message Management</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="rsmMessageManagement" runat="server">  
        </telerik:RadScriptManager>    
        <script type="text/javascript">  
            //<![CDATA[
            var editorContent = null;
            Telerik.Web.UI.Editor.CommandList["RichEditor"] = function(commandName, editor, args) {
                editorContent = editor.get_html(true); //get RadEditor content
                openRadWindow("DialogWindow", "MessageEditorAdvanced.aspx");
            };
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow;
                else if (window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow;
                return oWindow;
            }
            function openRadWindow(windowName, url) {
                var parentWindow = GetRadWindow().get_windowManager();
                var oWindow = parentWindow.open(url, windowName);
                oWindow.setSize(700, 550);
                oWindow.center();
                oWindow.show();
            }
            function SetEditorContent(content) {
                //set content to RadEditor on the mane page from RadWindow
                $find("<%= reMessage.ClientID %>").set_html(content);
            }
            function SetDialogContent(oWnd) {
                var contentWindow = oWnd.get_contentFrame().contentWindow;
                if (contentWindow && contentWindow.setContent) {
                    window.setTimeout(function() {
                        //pass and set the content from the mane page to RadEditor in RadWindow
                        contentWindow.setContent(editorContent);
                    }, 500);
                }
            }
            //]]> 
        </script> 
 
        <telerik:RadEditor ID="reMessage" runat="server" 
            EnableResize="false" 
            Width="100%" 
            Height="200px">  
            <Tools> 
                <telerik:EditorToolGroup> 
                    <telerik:EditorTool Name="RichEditor" Text="Open Advanced Editor" /> 
                    <telerik:EditorTool Name="Bold" /> 
                    <telerik:EditorTool Name="Italic" /> 
                    <telerik:EditorTool Name="Underline" /> 
                    <telerik:EditorTool Name="Cut" /> 
                    <telerik:EditorTool Name="Copy" /> 
                    <telerik:EditorTool Name="Paste" /> 
                    <telerik:EditorTool Name="FontName" /> 
                    <telerik:EditorTool Name="RealFontSize" /> 
                </telerik:EditorToolGroup> 
            </Tools> 
            <Content> 
            </Content> 
        </telerik:RadEditor> 
 
        <telerik:RadWindow OnClientShow="SetDialogContent" OnClientPageLoad="SetDialogContent" 
            NavigateUrl="MessageEditorAdvanced.aspx" runat="server" Behaviors="Maximize,Close,Move" 
            ID="DialogWindow" VisibleStatusbar="false" Width="800px" Modal="true" Height="700px" /> 
    </div> 
    </form> 
</body> 
</html> 
 

Advanced Editor:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MessageEditorAdvanced.aspx.vb" Inherits="MessageEditorAdvanced" %> 
<%@ 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 runat="server">  
    <title>Advanced Message Editor</title> 
        <style type="text/css">  
        html, form, body  
        {  
            height: 100%;  
            margin: 0px;  
        }  
 
        #editor1Bottom UL  
        {  
            float:right !important;  
        }  
        </style> 
</head> 
<body style="margin:0px;" scroll="no">  
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="rsmMessageManagement" runat="server">  
        </telerik:RadScriptManager>    
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">  
        </telerik:RadStyleSheetManager> 
 
        <script type="text/javascript">  
            //<![CDATA[
            function GetRadWindow()
            {
                  var oWindow = null;
                  if (window.radWindow) oWindow = window.radWindow;
                  else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                  return oWindow;
            }
            function setContent(content) {
                var editor = $find("<%= reMessage.ClientID %>");
                if (editor) editor.set_html(content); //set content from the parent page to RadEditor in RadWindow
            }
            function OnClientLoad(editor)            
            {
                var editor = $find("<%= reMessage.ClientID %>");
                editor.fire("ToggleScreenMode"); //set RadEditor in Full Scree mode
            }
            function OnClientCommandExecuting(editor, args) {
                var commandName = args.get_commandName(); //returns the executed command
                if (commandName == "SaveAndClose") {
                    var radWindow = GetRadWindow();
                    radWindow.close();
                    args.set_cancel(true);
                }
            }
            //]]> 
        </script> 
 
        <telerik:RadEditor ID="reMessage" runat="server" 
            EnableResize="false" 
            OnClientLoad="OnClientLoad" 
            OnClientCommandExecuting="OnClientCommandExecuting" 
            ToolsFile="~/Shared/XmlLibraries/MessageEditorTools.xml">  
            <Content> 
            </Content> 
        </telerik:RadEditor> 
    </div> 
    <telerik:RadAjaxManager runat="server">  
    </telerik:RadAjaxManager> 
    </form> 
</body> 
</html> 
 


Seth
Fiko
Telerik team
 answered on 09 Feb 2010
7 answers
714 views
I'm using a RadComboBox with LoadOnDemand and an Item Template.  The Template has a table with a width of 600 and I have set the DropDownWidth to 400 due to space available for the dropdown.  However when the items load the dropdown hieght doesn't show the entire height of a templated item when the horizontal scrollbar is visible, also I am also using a header and footer template.  Is this a known problem that the dropdown height doesn't account for the scrollbar height?  And do you have a fix or a timeframe to expect this to be fixed?
Kalina
Telerik team
 answered on 09 Feb 2010
1 answer
132 views
Hi,
 I have a telerik hierachical grid as below and I wish to rows at the child level. However when I click add a new row only rows at the parent level are displayed. How do I go about adding child rows

regards

Robert Smith

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"  AllowMultiRowEdit="true" AllowPaging="True" AllowAutomaticUpdates="True"
    AllowSorting="True" GridLines="None" DataSourceID="sds_requests_by_status" AutoGenerateColumns="False"  AllowAutomaticInserts="true"
        AutoGenerateHierarchy="True"  OnNeedDataSource="RadGrid1_NeedDataSource" Skin="WebBlue" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCommand="RadGrid1_ItemCommand">
    <MasterTableView DataKeyNames="id"  DataSourceID="sds_requests_by_status" CommandItemDisplay="top"   EditMode="InPlace">
        <DetailTables >
                    <telerik:GridTableView DataKeyNames="id" DataSourceID="sds_products_by_request" Width="100%" runat="server">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="id" MasterKeyField="id" />
                        </ParentTableRelation>
                        <Columns>
                             <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="editcolumn">
                              <ItemStyle CssClass="MyImageButton" /> </telerik:GridEditCommandColumn>
                                  <telerik:GridBoundColumn SortExpression="id" HeaderText="id"  AllowFiltering="false" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="id" UniqueName="id" >
                            </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn  AllowFiltering="false" SortExpression="session_id" HeaderText="session_id"  ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="session_id" UniqueName="session_id" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn  AllowFiltering="false" SortExpression="product_code" HeaderText="product code" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="product_code" UniqueName="product_code">
                            </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn allowfiltering="false" SortExpression="description" HeaderText="description" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="description" UniqueName="description">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn AllowFiltering="false" SortExpression="supplier_code" HeaderText="Supplier code" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="supplier_code" UniqueName="supplier_code">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn AllowFiltering="false" SortExpression="price" HeaderText="Price" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="price" UniqueName="price">
                            </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn allowfiltering="false" SortExpression="currency_code" HeaderText="Currency code" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="currency_code" UniqueName="currency_code">
                            </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn allowfiltering="false"  SortExpression="quantity" HeaderText="Unit quantity" ColumnEditorID="edit_quantity"  HeaderButtonType="TextButton"
                                DataField="quantity" UniqueName="quantity">
                            </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn allowfiltering="false"  ReadOnly="true" Visible="false" SortExpression="" HeaderText="Product_price_id" ColumnEditorID="edit_product_price_id"  HeaderButtonType="TextButton"
                                DataField="Product_Price_Id" UniqueName="Product_Price_Id">
                            </telerik:GridBoundColumn>
                            
                        </Columns>
                    </telerik:GridTableView>
          </DetailTables>            
        <Columns>
              <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="editcolumn">
                    <ItemStyle CssClass="MyImageButton" />
                </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="Request No." ReadOnly="True"
                SortExpression="id" UniqueName="id"  >
            </telerik:GridBoundColumn>
            
            <telerik:GridDropDownColumn FilterControlWidth="160px"   DataField="request_status" DataSourceID="sds_request_status"
            HeaderText="Request Status" ListTextField="Request_status" ListValueField="request_status"  Display="false"
            UniqueName="request_status" ColumnEditorID="GridDropDownColumnEditor1">
                        <FilterTemplate>
                            <telerik:RadComboBox ID="RadCbo_Request_status" DataSourceID="sds_request_status" DataTextField="request_status"
                                DataValueField="request_status" Height="200px" AppendDataBoundItems="true"
                                SelectedValue='<%#((GridItem)Container).OwnerTableView.GetColumn("request_status").CurrentFilterValue %>'

                                runat="server" OnClientSelectedIndexChanged="RequestStatusChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                                
                            </telerik:RadComboBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                <script type="text/javascript">
                                    function RequestStatusChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("request_status", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
                            </telerik:RadScriptBlock>
                        
</FilterTemplate>
             <HeaderStyle Width="160px" />
        </telerik:GridDropDownColumn>
           

Princy
Top achievements
Rank 2
 answered on 09 Feb 2010
1 answer
218 views
Hi,
I am creating a grid at runtime (code behind) which could be either in view or edit mode depending on a user selection.
I have two ways to display the grid in view or edit mode.

For view mode:
Using the GridBoundColumn like below
                'if the field is always in view mode, no editing of data  
                column = New GridBoundColumn()  
                column.DataField = controlID 'eg "COL1"  
                column.UniqueName = controlID  
                grid.MasterTableView.Columns.Add(column)  
 

Or use GridTemplateColumn like below with ViewTemplate implementing ITemplate.
                    column = New GridTemplateColumn()  
                    column.ItemTemplate = New ViewTemplate(controlID)  
 


For edit mode:
Use GridTemplateColumn, set the columns in edit mode (true/false) using the PreRender event. ItemTemplate and EditItemTemplate would be used depending view/edit.

Or use only GridTemplateColumn with ItemTemplate with textbox controls for edit. And use GridBoundColumn for view mode. This way I don't need to loop through the columns in the prerender event to set the columns to edit mode. By using the GridTemplateColumn I would have the columns set to edit mode.

I am leaning towards the last option, I would like to know your opinion. Thanks!





Princy
Top achievements
Rank 2
 answered on 09 Feb 2010
4 answers
262 views
I'm having a variety of issues with exporting data from a radGrid to Excel:
I'm using the default excel export format.

1. The spreadsheet generated does not show any excel default gridlines (i.e. the ones you see when you create a new, blank spreadsheet. the light blue ones). is there a way to retain these?

2. I have a column in my Grid that shows Address information (string value) for display purposes to the web page screen, I put a <br /> in between the Address street line and the city, state line so that there's always a line break before it shows the city and state information. This html line break is causing excel to put the contents into a new cell, instead of keep the street address and city and state information in the same cell and just wrap it. How can I fix it? (Maybe i could intercept the contents/value of this column and replace the <br /> with a blank, if so, what code can I use to do such a thing?

3. I was also interested in checking out the Excel Format ExcelML, but when I turn it on, I get a blank spreadsheet. Where are there good, quality, demos on how to use the ExcelML option for formatting and exporting of Grid data?

my current export code:

 rgFailedRecords.ExportSettings.ExportOnlyData = True 
        rgFailedRecords.ExportSettings.IgnorePaging = True 
        rgFailedRecords.ExportSettings.OpenInNewWindow = True 
 
        rgFailedRecords.MasterTableView.ExportToExcel() 

I'm also setting some formatting stuff within rgFailedRecords_ExcelExportCellFormatting; just some cell style width's, style, etc.
Paul J
Top achievements
Rank 1
 answered on 09 Feb 2010
1 answer
164 views
I am demoing this product for possible purchase and for the life of me I cannot figure out how to get the resources to display on the Time Line view.  I am using VS2008 and SQLServer 2008 and Entity Data Model to bind data.  I have no problems inserting, updating or deleting data.  My resources would be a list of users from the database and they display fine when adding or inserting records but they do not display on any of the available scedule view.  This seems to be such a simple and trivial thing to do yet I cannot find any documentation or examples of how to do it.  Please see the attached screen shots for additional details.  Can someone please help me??
Peter
Telerik team
 answered on 09 Feb 2010
6 answers
225 views
Our database has large amount of data. So I want to filter the appointments based on the scheduler date. How can I pass the scheduler date to the select procedure so that only the relevant appointments are returned from the backend database?

I am sure many of you have faced similar situation. Any help is appreciated. Thanks.
Peter
Telerik team
 answered on 09 Feb 2010
1 answer
112 views
Hi,

I have a problem with the spin buttons for my RadNumericTextBox. They are displayed slightly on top of the right corner of the textbox so they are not outside of the box but not on the inside either and this looks really ugly. Can someone help me please?

<telerik:RadNumericTextBox ID="numericTextbox" runat="server" Width="200" AutoPostBack="true" ShowSpinButtons="true"  ButtonsPosition="Right" IncrementSettings-Step="1" MinValue="1" Value="1"></telerik:RadNumericTextBox></div

Kind Regards
Cecilia
Dimo
Telerik team
 answered on 09 Feb 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?