Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
125 views
Hi,

I am using RadEditor in our grid for each row and column but in edit mode (Multi Edit- where all RadEditors are in edit mode) I am having problem in getting the toolbar for all the RadEditors (when using ToolBarMode as ShowOnFocus and ToolBarProviderId same for all the RadEditor Controls for better Performance).

Note: Edit all the Rows and Columns at the same time causes this problem.

I am dynamically generating the RadEditors using the below code:

private DerivedRadEditor CreateRadEditor(bool isPreviewMode)
  
{
  
if (this.radMemo == null)
  
{
  
this.radMemo = new DerivedRadEditor();
  
//Translation 
  
this.radMemo.Language = Thread.CurrentThread.CurrentUICulture.Name;
  
this.radMemo.ID = this.ID + "rm";
  
this.radMemo.ToolbarMode = EditorToolbarMode.ShowOnFocus;
  
this.radMemo.OnClientCommandExecuting = "OnClientCommandExecuting";
  
this.radMemo.EnableViewState = false;
  
//this.radMemo.Skin = "WebBlue";
  
this.radMemo.StripFormattingOptions = EditorStripFormattingOptions.NoneSupressCleanMessage;
  
///Setting default style for RadEditor Content Area
  
  
radMemo.ContentAreaCssFile = "~/client/CSS/EditorContentAreaStyles.css";
  
  
if (Page.Items["FirstRadEditor"] == null)
  
{
  
Page.Items["FirstRadEditor"] = radMemo;
  
}
  
else
  
{
  
radMemo.ToolProviderID = ((DerivedRadEditor)Page.Items["FirstRadEditor"]).ID;
  
}
  
if (isPreviewMode)
  
{
  
this.radMemo.EditModes = EditModes.Preview;
  
radMemo.ToolsFile = "~/client/XML/RadEditorTools/MemoPreviewTools.xml";
  
}
  
else
  
{
  
this.radMemo.EditModes = EditModes.Design;
  
radMemo.ToolsFile = "~/client/XML/RadEditorTools/MemoDefaultTools.xml";
  
}
  
// Removed reuse the tools from another RadEditor code as it was not working with Floating mode
  
//Adding Paste as Cross reference HTML
  
//EditorTool pastCrossReference = new EditorTool("PasteCrossReference");
  
//this.radMemo.ContextMenus.FindByTagName("*").Tools.Add(pastCrossReference);
  
 
  
this.Controls.Add(radMemo);
  
HiddenField hdnRADEditorAvailable = (HiddenField)this.Page.FindControl("hdnIsRADEditorAvailable");
  
if (hdnRADEditorAvailable != null && hdnRADEditorAvailable.Value != "1")
  
{
  
hdnRADEditorAvailable.Value = "1";
  
}
  
}
  
return this.radMemo;
  
}

Please suggest some solution.

Thanks
Ankur
Rumen
Telerik team
 answered on 06 Dec 2012
1 answer
90 views
HI,
In the insertcommand, i have the following code:

GridEditableItem item = e.Item as GridEditableItem;
           Hashtable values = new Hashtable();
            item.ExtractValues(values);            
           Session["GridValues"] = values;
           RadGrid1.DataBind();


I am trying to do a soft save of the grid items. When the first row is added it is set in the session. when the 2nd row is added, only the 2nd row values are available in the session.

How to add items in session?

Thanks
Antonio Stoilkov
Telerik team
 answered on 06 Dec 2012
10 answers
155 views
Hi,

I want to export RAD Grid including some data with grid.I know how to expot RAD grid into exel.But i want to include some other data in excel.But this data is not included in Grid.Can you please assist me how to proceed this by modifying below code.

grdQwest.ExportSettings.OpenInNewWindow =

True

 

grdQwest.ExportSettings.IgnorePaging =

True

 

grdQwest.ExportSettings.ExportOnlyData =

True

 

grdQwest.ExportSettings.FileName =

"QWESTMetrics"

 

grdQwest.MasterTableView.ExportToExcel()

Daniel
Telerik team
 answered on 06 Dec 2012
2 answers
67 views
Hi,
How insert page header & Footer, Report Header and Footer and  Page setup in telerik grid exporting(as xml,doc,pdf etc). 


Thanks & Regards
Anzar.M
Daniel
Telerik team
 answered on 06 Dec 2012
3 answers
139 views
Hello,

I have RadProgressManager for uploading files. It works fine, but when I leave page it take a lot of time even if I do not upload any file before. When I use fire bug (console) it fire more than 10 events with this code:
var rawProgressData = {InProgress:false,ProgressCounters:false};


Code:

<rad:RadProgressManager ID="RadProgressManager1" Runat="server">
</rad:RadProgressManager>
<rad:RadUpload ID="fuDatoteke" Skin="Office2007" ControlObjectsVisibility="None" AllowedFileExtensions=".csv" MaxFileInputsCount="1" runat="server">
</rad:RadUpload>
<rad:RadProgressArea ID="RadProgressArea1" Skin="Office2007" CssClass="positionAbsolute" runat="server">
</rad:RadProgressArea>

Error.png

When I test it on server it fire 65 events?!!
Genady Sergeev
Telerik team
 answered on 06 Dec 2012
3 answers
254 views
In a regualr asp griwview the following scenerio with a hyperlink emial button works just fine and opens outlook to send an email to a person, but when I put this same functionality into a radgrid, it opens up outlook, but then also forwards the current page the radgrid is on to the email of the person and errors out the application. Id there a way to create this same functionality in a radgrid.  Right now where they need the clickable email functionality on a page I have to use griwviews and am using a combination of gridviews and radgrids in projects, i would rather use radgrids for increased fucntionality.  Please solve this issue.

 <asp:GridView ID="myGridView" runat="server" Font-Size="10" HeaderStyle-HorizontalAlign="Center" BorderWidth="1px" CellPadding="6" GridLines="Both" BorderColor="#404040"
                                    Font-Names="Veranda,arial,sans-serif" AutoGenerateColumns="false" CellSpacing="0" Width="100%" RowStyle-HorizontalAlign="left" DataKeyNames="intLocationId"><AlternatingRowStyle BackColor="#b0c4de" />
                                    <HeaderStyle Font-Bold="true" ForeColor="White" BackColor="SteelBlue" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="Contact">
                                                <ItemTemplate>
                                                    <asp:HyperLink NavigateUrl='<%# Bind("strFTEmail", "mailto:{0}") %>' Text='<%# Bind("strFullname") %>' runat="server" ID="hlEmail"></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="strPhone" HeaderText="Contact #" />
                                        </Columns>
                                    </asp:GridView>
Milena
Telerik team
 answered on 06 Dec 2012
11 answers
1.0K+ views
Hey folks, this is a unpaid endorsement of the "Control Panel" by Telerik.  I am a "ultimate" collection subscriber and have been historically displeased with the apparent need to uninstall / reinstall everything every quarter.

As you might have noticed the coding wonders here released a new quarters worth of updates.  This time (unless I failed to notice it before) they also released the "Control Panel".  I would recommend using it!  It installed and with a few clicks it realized what I had, what I did not not have and what I needed.  It clicked on which products I wished and let it do its magic.  It uninstalled and re-installed as required without human intervention.

Kudo's to whomever thought of this utility.  He/they deserve a pay raise.  This is the icing on your already sweet collection of "toys".
Teodor
Top achievements
Rank 1
 answered on 06 Dec 2012
2 answers
74 views
Hi,

We want to implement custom filter "Contains" for template column (numeric). If we apply a filter on this column it is working fine. If we apply any other filter followed by custom filter then the previous filter is not getting cleared. Filter expressions are keep on appending for the same column.

Eg. Say we have column C1 which is template column and contains numeric data. We want to implement "contains" filter option on this column as custom filter.
If we apply "EqulaTo" filter first on this column C1, it works. Now if we apply "Contains" filter (custom) on this column C1, it should reset the previous filter and should apply new filter i.e. "Contains". But filter expressions keep on appending for this column and thus we don't get any result set. Following is the sample code snippet for the same implementation. We have included this in grid_ItemCommand event.

Please guide us ASAP.
Pair filterPair = (Pair)e.CommandArgument;
                if (filterPair.First.ToString() == "Custom")
                {
                    string colName = filterPair.Second.ToString();
                    TextBox tbPattern = (e.Item as GridFilteringItem)[colName].Controls[0] as TextBox;
 
                    grid1.MasterTableView.GetColumn(colName).CurrentFilterFunction = GridKnownFunction.NoFilter;
 
                    e.Canceled = true;
                                        string newFilter = @"it[" + colName + "].ToString().Contains(" + tbPattern.Text + ")";
                    
 
                    if (grid1.MasterTableView.FilterExpression == "")
                    {
                        grid1.MasterTableView.FilterExpression = newFilter;
                    }
                    else
                    {
                       grid1.MasterTableView.FilterExpression = "((" + grid1.MasterTableView.FilterExpression + ") AND (" + newFilter + "))";
                    }
                    grid1.Rebind();
 
                }
Maria Ilieva
Telerik team
 answered on 06 Dec 2012
1 answer
87 views
Hi,
I am using the "RadControls for ASP.NET AJAX Q3 2012" in Sharepoint 2010.
I have added the Rad Grid and also added the ajax. However, when i click "add new item" or edit items in the grid, the grid is doing a postback. I have added the below code:

<div>       
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
  
    <telerik:RadGrid ID="RadGrid1" runat="server" 
        ShowFooter="True" onitemcommand="RadGrid1_ItemCommand" 
        ondeletecommand="RadGrid1_DeleteCommand" 
        oninsertcommand="RadGrid1_InsertCommand" 
        onupdatecommand="RadGrid1_UpdateCommand" >
    <MasterTableView DataKeyNames="Title" AutoGenerateColumns="false" EditMode="InPlace" CommandItemDisplay="TopAndBottom" CommandItemSettings-AddNewRecordText="Add New Item" >
                    <Columns>
                     <telerik:GridEditCommandColumn ButtonType="ImageButton">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                            ConfirmDialogWidth="220px">
                        </telerik:GridButtonColumn>
  
                     <telerik:GridTemplateColumn DataField="Title" HeaderText="Product Number" UniqueName="ProductNumber"
                            Visible="true">
                            <InsertItemTemplate>
                                <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Bind("Title") %>' >
                                </telerik:RadTextBox>
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Eval("Title") %>' >
                                </telerik:RadTextBox>
                            </EditItemTemplate>    
                            <ItemTemplate>
                            <telerik:RadTextBox ID="RadtxtPrdNumber" ReadOnly="true" runat="server" Text='<%# Eval("Title") %>' />
                            </ItemTemplate>                       
                        </telerik:GridTemplateColumn>                     
                          
    </Columns>
    </MasterTableView>
     <ClientSettings EnableRowHoverStyle="true">
        </ClientSettings>
  
    </telerik:RadGrid>
</div>


How to fix this?
Thanks
Marin
Telerik team
 answered on 06 Dec 2012
1 answer
72 views
Hi,

I've used a part of the code from the RSSFeed Live demo in my own web user control.
When the RSS source isn't available the RSS reader fails.

How can I handle errors in loading the RSS feed so it won't make the application crash, and also, how can I set the text for the prev and next buttons from code behind?

Thanks.

/Thomas

<telerik:RadListView ID="RadListView1" runat="server" OnNeedDataSource="RadListView1_NeedDataSource"
    AllowPaging="true" ItemPlaceholderID="Panel1" PageSize="3">
    <LayoutTemplate>
        <div class="layoutWrapper">
            <div class="rssHeaderWrapper" title="Copyright, 2011 Honda Motor Co., Ltd. and its subsidiaries and affiliates. All Rights Reserved.">
                <div class="rssSubHeader">
                    honda world news
                </div>
                <div class="rssHeader">
                    rss <span class="rssHeadingDate">
                        <%# DateTime.Now.ToLongDateString().ToLower() %></span>
                </div>
            </div>
            <br />
            <asp:Panel ID="Panel1" runat="server">
            </asp:Panel>
            <div style="width: 100%; text-align: center;">
                <asp:ImageButton ID="PrevBtn" runat="server" CommandName="Page" CommandArgument="Prev"
                    AlternateText="<" CssClass="rssButtons" ImageUrl="images/iconPrev.png" />
                <asp:ImageButton ID="RefreshBtn" runat="server" CommandName="Rebind" AlternateText="Refresh"
                    CssClass="rssButtons" ImageUrl="images/iconRefresh.png" />
                <asp:ImageButton ID="NextBtn" runat="server" CommandName="Page" CommandArgument="Next"
                    AlternateText=">" CssClass="rssButtons" ImageUrl="images/iconNext.png" />
            </div>
        </div>
    </LayoutTemplate>
    <ItemTemplate>
        <table class="rssTable" title='Item <%# (Container as RadListViewDataItem).DataItemIndex %>, Page <%# RadListView1.CurrentPageIndex + 1 %>'
            style="vertical-align: top;">
            <tr>
                <td>
                      
                </td>
                <td colspan="2">
                    <div class="rssTitle">
                        <img src="images/iconRSS.png" alt="rss" />
                        <a href='<%# (Container.DataItem as XmlNode)["link"].InnerText %>' class="qsfSubtitle">
                            <%# (Container.DataItem as XmlNode)["title"].InnerText %>
                        </a>
                    </div>
                    <div class="rssDate">
                        <%# (Container.DataItem as XmlNode)["pubDate"].InnerText %>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                      
                </td>
                <td>
                    <img style="border: solid 1px #999" src='<%# (Container.DataItem as XmlNode)["hww:photo"].InnerText %>'
                        alt='<%# (Container.DataItem as XmlNode)["title"].InnerText %>' />
                </td>
                <td>
                    <img src='<%# (Container.DataItem as XmlNode)["hww:flag"].InnerText %>' alt='<%# (Container.DataItem as XmlNode)["hww:flag"].InnerText %>' />
                    <span class="rssDescription">
                        <%# (Container.DataItem as XmlNode)["description"].InnerText %></span>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadListView>
Vasil
Telerik team
 answered on 06 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?