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

I have 2 questions about Excel export.

1. I try to export info to Excel from a RadGrid with a MasterTable and  (1)DetailTable in ML format and exported all info but I can not exclude not items selected. 

2. I prefer change the Format ML to Biff but detailTable's info not export . 

Please, I  need help

aspx
<ExportSettings FileName="documentos_Recoger" HideStructureColumns="true" ExportOnlyData="true"<br>                                    IgnorePaging="true" OpenInNewWindow="true"><br>                                    <br>                                </ExportSettings>


C#
protected void ExcelButton_Click(Object sender, System.EventArgs e)
    {
foreach (GridDataItem item in RadGrid1.Items)
{
if (item.Selected == false)
{
item.Visible =
false;
}
}
RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
RadGrid1.MasterTableView.DetailTables[0].HierarchyDefaultExpanded = true;
RadGrid1.ExportSettings.ExportOnlyData = true;
RadGrid1.ExportSettings.OpenInNewWindow = true;
RadGrid1.MasterTableView.ExportToExcel();
}

Kostadin
Telerik team
 answered on 07 Oct 2013
1 answer
1.3K+ views
Hi. I upload a word a documentç I made some process on it. I alos have a "Download" button on same page. How can I download file using telerik? Can anyone give me an idea? Thanks in advanced.
Vessy
Telerik team
 answered on 07 Oct 2013
1 answer
106 views
Something we've noticed about the PivotGrid is that it treats different capitalization as different values in the result set. For example, if I have values of;

Bun Maker
Bun maker
bun maker
BUN MAKER
BuN mAkEr

...these will each be treated as different/unique values. Is there a way to ignore capitalization and treat all similarly-spelled entries as the same? We thought about applying standard spelling at source, but making everything upper or lower case doesn't look right.
Angel Petrov
Telerik team
 answered on 07 Oct 2013
1 answer
179 views
hello, 

I'm using radmenu.

Occasionally, on hovering over a menu item, after the menu has been loaded, the menu expands and collapses immediately.
After several trials, the menu returns to it's normal behaviour( Note that, the wrong behaviour returns after some time).

Please help... 

Iliya 



Shinu
Top achievements
Rank 2
 answered on 07 Oct 2013
1 answer
192 views
Hi There

I have a problem with GridBoundColumn ItemStyle as it does not behave like GridBoundColumn HeaderStyle. I have made this simple class to provide my own inherited version og GridBoundColumn:

using System.Web.UI.WebControls;
using Telerik.Web.UI;

using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace LWTelerikGrid.Extenders.ColumnExtenders
{
    public class LWBooleanBoundColumn : GridBoundColumn
    {       
        public override TableItemStyle HeaderStyle
        {
            get
            {
                TableItemStyle tableitemstyle = base.HeaderStyle;
                tableitemstyle.HorizontalAlign = HorizontalAlign.Center;
                return tableitemstyle;
            }
        }
 
        public override TableItemStyle ItemStyle
        {
            get
            {
                TableItemStyle tableitemstyle = base.ItemStyle;
                tableitemstyle.HorizontalAlign = HorizontalAlign.Center;
                return tableitemstyle;
            }
        }
 
 
        public override bool AutoPostBackOnFilter
        {
            get
            {
                return true;
            }
        }
    }
}

I use the LWBooleanColumn like this:

<LWColumnExtenders:LWBooleanBoundColumn DataField="LicenseRequired" DataType="System.Boolean"
                                FilterControlAltText="Filter LicenseRequired column" HeaderText="LicenseRequired"
                                SortExpression="LicenseRequired" UniqueName="LicenseRequired">
</LWColumnExtenders:LWBooleanBoundColumn>

When I use the VS 210 debugger, I can see that the HeaderStyle property is activated, but the ItemStyle property is left untouched.

Why is that ?

Thanks in advance for any tips...

Thomas, Copenhagen.
Venelin
Telerik team
 answered on 07 Oct 2013
5 answers
180 views
Hi, all!
I have an RagGrid. To this grid, I use AllowFilteringByColumn = true and GroupByExpression to some columns. But, I need this RadGrid result, expand after a filter, without grouping.

How make the RadGrid result expand after filter?

My code.

<script type="text/javascript">
        (function () {
            var demo = window.demo = {},
        autoCompleteBox,
        masterTableView;
 
            demo.GridCreated = function (sender, args) {
                masterTableView = sender.get_masterTableView();
            }
 
            demo.AutoCompleteLoaded = function (sender, args) {
                autoCompleteBox = sender;
            }
 
            demo.EntryAdded = function (sender, args) {
                filterGrid();
            }
 
            demo.EntryRemoved = function (sender, args) {
                filterGrid();
            }
 
            function filterGrid() {
                if (!masterTableView || !autoCompleteBox) return;
                var entries = autoCompleteBox.get_entries();
 
                if (entries.get_count() === 0) {
                    masterTableView.expandAllGroups();
                    return;
                }
 
                masterTableView.collapseAllGroups();
                $telerik.$(masterTableView.get_element()).find("td").filter(function () {
                    for (var i = 0; i < entries.get_count(); i++)
                        if ($(this).text().indexOf(entries.getEntry(i).get_text()) !== -1) return true;
 
                    return false;
                }).closest(".rgRow, .rgAltRow").each(function () {
                    masterTableView.expandGroup(this);
                });
            }
            window.pageLoad = function () {
                $(masterTableView.get_element())
            .find(".rgGroupHeader td")
            .not(".rgGroupCol")
            .css("cursor", "pointer")
            .click(function () {
                masterTableView.toggleGroup($(this).closest("tr")[0]);
            });
            }
        })();
    </script>


<Telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" AllowSorting="True"
            AllowPaging="False" AutoGenerateColumns="False" GridLines="None" AllowFilteringByColumn="true">
            <GroupingSettings CaseSensitive="false"></GroupingSettings>
            <MasterTableView Width="100%" GroupLoadMode="Client" TableLayout="Fixed" GroupsDefaultExpanded="false">
                <GroupByExpressions>
                    <Telerik:GridGroupByExpression>
                        <SelectFields>
                            <Telerik:GridGroupByField FieldAlias="REGION" FieldName="REGION" HeaderText="REGION">
                            </Telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <Telerik:GridGroupByField FieldName="REGION"></Telerik:GridGroupByField>
                        </GroupByFields>
                    </Telerik:GridGroupByExpression>
                    <Telerik:GridGroupByExpression>
                        <SelectFields>
                            <Telerik:GridGroupByField FieldAlias="LOCATIONNAME" FieldName="LOCATIONNAME" HeaderText="LOCATION NAME">
                            </Telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <Telerik:GridGroupByField FieldAlias="LOCATIONNAME" FieldName="LOCATIONNAME"></Telerik:GridGroupByField>
                        </GroupByFields>
                    </Telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <Telerik:GridBoundColumn DataField="LOCATIONNAME" FilterControlAltText="Filter LOCATIONNAME column"
                        UniqueName="LOCATIONNAME">
                        <ItemStyle HorizontalAlign="Left" />
                    </Telerik:GridBoundColumn>
                    <Telerik:GridHyperLinkColumn DataNavigateUrlFields="IDSERVER" DataNavigateUrlFormatString="PathFolders.aspx?idServer={0}"
                        DataTextField="SERVERNAME" FilterControlAltText="Filter SERVERNAME column" UniqueName="column">
                        <ItemStyle HorizontalAlign="Left" />
                    </Telerik:GridHyperLinkColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
                <ClientEvents OnGridCreated="demo.GridCreated" />
            </ClientSettings>
            <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
        </Telerik:RadGrid>

Kostadin
Telerik team
 answered on 07 Oct 2013
1 answer
306 views
Hi to all,
I have a grid where I use GridClientDeleteColumn (or GridButtonColumn). I would like to use confirmation dialog with the parameters relating to the row data. ConfirmTextFields property works well with server bindings for me. Unfortunately, when binding the grid on the client side using WCF service, the required row data (Shortcut and Text in my example) are blank in the confirmation dialog. What should be done to show the fields of ConfirmTextFields property if I use the web service bindings?
<telerik:GridClientDeleteColumn Reorderable="false" ButtonType="ImageButton" CommandName="Delete"
    UniqueName="DeleteColumn" ConfirmDialogType="RadWindow"
    ConfirmTitle="Question" ConfirmTextFields="Shortcut,Text" ConfirmTextFormatString="Country {0} - {1} will be removed">
</telerik:GridClientDeleteColumn>

Thanks
-Marian
Angel Petrov
Telerik team
 answered on 07 Oct 2013
3 answers
168 views
hi,

the dropdown-div of RadDropDownTree is captured within an RadWindow.
Is there a way to show the dropdown window over the borders of a RadWindow? (ZIndex)

Thank you

Stefan
Kate
Telerik team
 answered on 07 Oct 2013
1 answer
567 views

Hi All,

I am using the RadAsyncUpload in my app. So what I need as follows whenever we select any attachment to upload how to add the duplicate file checking from the client side, and that to while picking the attachments itself.

 

Anybody knows how to do this?.

 

Thanks,

Shinu
Top achievements
Rank 2
 answered on 07 Oct 2013
4 answers
308 views
Hi,

I have an issue with the datakey that I'm trying to get from my code behind in the SelectedIndexChanged event (I want to update a panel above the Radgrid when a row is selected).

I saw in the documentation that you recommend to use the following in SelectedIndexChanged 

Dim MyId As Integer = (DirectCast(RadGrid1.SelectedItems(0), GridDataItem)).GetDataKeyValue("MessageId").ToString()


My probleme is that I get the following error:

System.ArgumentOutOfRangeException was unhandled by user code<br>  HResult=-2146233086<br>  Message=L'index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection.<br>Nom du paramètre : index<br>  ParamName=index<br>  Source=mscorlib<br>  StackTrace:<br>       Ã  System.Collections.ArrayList.get_Item(Int32 index)<br>       Ã  Telerik.Web.UI.GridItemCollection.get_Item(Int32 index)<br>       Ã  messages_messages.RadGrid1_SelectedIndexChanged(Object sender, EventArgs e) dans E:\Visual Studio 2012\WebSites\Hotlinexxx\messages\messages.aspx.vb:ligne 34<br>       Ã  System.EventHandler.Invoke(Object sender, EventArgs e)<br>       Ã  Telerik.Web.UI.GridBaseDataList.OnSelectedIndexChanged(EventArgs e)<br>       Ã  Telerik.Web.UI.RadGrid.RaisePostDataChangedEvent()<br>       Ã  Telerik.Web.UI.RadCompositeDataBoundControl.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()<br>       Ã  System.Web.UI.Page.RaiseChangedEvents()<br>       Ã  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)<br>  InnerException: 

My Ragrid is inpired from the Outlook grid:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmail/defaultvb.aspx

and in my opinion most important resizing in radsplitter:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultvb.aspx?product=grid
regarding to the ajax it contains.

Here is the ajax manager I use:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxSettingCreated="RadAjaxManager1_AjaxSettingCreated"<br>        OnAjaxRequest="RadAjaxManager1_AjaxRequest"><br>        <AjaxSettings><br>            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"><br>                <UpdatedControls><br>                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl><br>                </UpdatedControls><br>            </telerik:AjaxSetting><br>            <telerik:AjaxSetting AjaxControlID="RadGrid1"><br>                <UpdatedControls><br>                    <telerik:AjaxUpdatedControl ControlID="LitMessage"></telerik:AjaxUpdatedControl><br>                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"  LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>   <br>                </UpdatedControls><br>            </telerik:AjaxSetting><br>        </AjaxSettings><br>    </telerik:RadAjaxManager>

I have noticed that if I invert AjaxUpdatedControl ControlID="LitMessage" and ControlID="RadGrid1" the height of the grid is less of 100px height.

Also resizing in rad splitter seems to be a problem for groupong the colomns but this his another story.

I thank you in advance for you help.
Best regards


Princy
Top achievements
Rank 2
 answered on 07 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?