Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
181 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
88 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
161 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
306 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.1K+ 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
85 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
102 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
85 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
1 answer
132 views
Hi,

I got a hierachy nested grid with a parent row, which have two nested expaned rows. During testing, I loaded 50 records to be binded to the parent row. I see that it binded all 50 parent records first. Afterwards, it starts calling the selecting method to get each of the 50 child records to bind the nested row. I have a following code and checekd the ObjectDataSourceSelectingEventArgs parameter but could not find a record index field on which parent record it is seeking to retrieve the record for binding to the grid. I noticed that for the nested row or the inner record, it calls the selecting and then it call the GetData(string sortColumns, int startRecord, int maxRecords) method for each of the 50 parent record.

Also, how can I pass around in the markup page, the UID that is the primary - foreign table key as the datakeynames. When the child record is called on the selecting method, maybe I can get the datakeyname value to do the fetch.

 

 

protected void Response_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)

 

{

 

 

int test = 0;

 

}

Why am I asking this question> ? The grid is loading for the first time, I need to know which child record is being requested for binding under the parent row. When I get the index, I will do another fetch from the IQueryable object to return a list object.

Any help is appreciated...

Antonio Stoilkov
Telerik team
 answered on 06 Dec 2012
3 answers
174 views
Where have the skin demos gone?  Using your online Quick Start demos, I don't see any skins under Appearance any more and some don't even have the Appearance section.  I used this almost daily to help choose a skin.  Any idea when it'll be back or can I find this resource somewhere else?
Ivan Zhekov
Telerik team
 answered on 06 Dec 2012
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?