Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
161 views
Have been searching for a while.  Not sure if is possible.  I know how to access radasyncupload in edittemplate, but what about in itemtemplate? 

Is it possible to

 

<telerik:GridTemplateColumn DataField="xx" HeaderText="xx" UniqueName="xx">

    <ItemTemplate>

        <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MaxFileInputsCount="1" />

    </ItemTemplate>

 

</telerik:GridTemplateColumn>

So that when the grid displays 10 rows, it will have 10 asyncupload control on the screen.  Then the user can select 10 different files into the 10 asyncupload control.  And with a button press (outside of the grid) which will cause post back.  And then I would like to somehow have access to the "fileuploaded" event fires and then able to use the .saveas method to save all 10 file (with manipulated filename) to a folder. 

I tried to to add onclientFileUploaded="FileUploaded"  and then in the code behind

Protected sub FileUploaded(blah)

But when ran, it said it FileUploaded function not exist.  I assume that is because the control is in itemtemplate, therefore it can not access it.

Any idea?  Or is this not possible?

Thx!

Frank
Top achievements
Rank 1
 answered on 04 Apr 2013
6 answers
134 views
I have a grid and when I try to export the data to Excel, CSV or Word it wants to open the entire html page.  This happens only when I choose the "Open" option - it works fine if I click "Save" or "Save as".  It also works fine with Firefox if I "Open" the spreadsheet. 

In IE9 when I click on any of the buttons and select "Open" I get the message: "RadGrid.xls can't be downloaded".  If I click on "Retry" and there isa temporary message saying "running security scan".  Then it opens Excel and a dialog box comes up with this message:

The file you are trying to open, 'RadGridExport.xls', is in a different format than specified by the file extension.  Verify that the file is not corrupted and is from a trusted source before opening the file.  Do you want to open the file now.

I take the option and say 'Yes' and it basically loads the entire aspx page into Excel.

The site is not SSL.  (Some comments in the forum had solutions for when the site was SSL). 

The grid is hierarchical with grouping.  But it still does not work when I remove the grouping and I collapse all the nested data.  In the code I have removed the NeedDataSource as they work fine to generate the table and I doubt they are the issue (if I'm wrong, I can post this too.)  I also removed a tabstrip and some additional controls that allow me to filter the data source.  (Again I will post if needed.)

Any help is appreciated.

Here is the code:

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
 
If Not IsPostBack Then
 
    RadAjaxManager.GetCurrent(Me.Page).ClientEvents.OnRequestStart = "onRequestStart"
 
End if
End Sub


 

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 
 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"  >
        <AjaxSettings>
 
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
    </telerik:RadAjaxManagerProxy>
 
  
 <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" AutoGenerateColumns="false" Width="1000"
         GridLines="Both" Skin="Sunset"  ShowGroupPanel="true"
        AllowFilteringByColumn="False" AllowPaging="True" AllowSorting="True"
        OnDetailTableDataBind="RadGrid1_DetailTableDataBind" Height="500px"
         OnNeedDataSource="RadGrid1_NeedDataSource">
        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" HideStructureColumns="true">
 
        </ExportSettings>
 
     <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"
>
         <Scrolling AllowScroll="True" UseStaticHeaders="True" />
         <Resizing AllowColumnResize="true" AllowRowResize="true" />       
     </ClientSettings>
    <MasterTableView  DataKeyNames="ClientAlertID" CommandItemDisplay="Top">
        <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowAddNewRecordButton=false />
 
        <DetailTables>
            <telerik:GridTableView Name="Events" Width="100%" AutoGenerateColumns="false" AllowPaging="true"
                AllowSorting="true"  HierarchyDefaultExpanded="true"   >
                <HeaderStyle CssClass="InnerHeaderStyle" />
                <ItemStyle CssClass="InnerItemStyle" />
                <AlternatingItemStyle CssClass="InnerAlernatingItemStyle" />
                <FilterItemStyle CssClass="InnerHeaderStyle" />
                <PagerStyle CssClass="InnerHeaderStyle" />
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="OpenDate" ItemStyle-Width=135 HeaderStyle-Width="135"  FilterControlWidth="100"
                        FilterControlAltText="Filter OpenDate column" HeaderText="Open Date" ReadOnly="True"
                        SortExpression="OpenDate" UniqueName="OpenDate"  />
                    <telerik:GridBoundColumn DataField="device_vendor" ItemStyle-Width=75  HeaderStyle-Width="75" FilterControlWidth="45"
                        FilterControlAltText="Filter device_vendor column" HeaderText="Device Vendor" ReadOnly="True"
                        SortExpression="device_vendor" UniqueName="device_vendor" />
                    <telerik:GridBoundColumn DataField="device_type"  ItemStyle-Width="75" HeaderStyle-Width="75" FilterControlWidth="45"
                        FilterControlAltText="Filter device_type column" HeaderText="Device Type" ReadOnly="True"
                        SortExpression="device_type" UniqueName="device_type" />
                    <telerik:GridBoundColumn DataField="Description"
                        FilterControlAltText="Filter Description column" HeaderText="Description" ReadOnly="True"
                        SortExpression="Description" UniqueName="Description" />
                    <telerik:GridBoundColumn DataField="event_name" ItemStyle-Width="75" HeaderStyle-Width="75" FilterControlWidth="45"
                        FilterControlAltText="Filter event_name column" HeaderText="Correlation Rule" ReadOnly="True"
                        SortExpression="event_name" UniqueName="event_name" />
                </Columns>
 
                <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                </EditFormSettings>
 
                <HeaderStyle BackColor="Brown"></HeaderStyle>
            </telerik:GridTableView>
        </DetailTables>
 
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
 
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="AlertType" FieldName="AlertType"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="AlertType"></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
 
        <Columns>
            <telerik:GridBoundColumn DataField="ClientAlertID"   ItemStyle-Width=50  HeaderStyle-Width="50"
                FilterControlAltText="Filter ClientAlertID column" HeaderText="Alert ID" ReadOnly="True" AllowFiltering="false"
                SortExpression="ClientAlertID" UniqueName="ClientAlertID" />
            <telerik:GridBoundColumn DataField="AlertType"  ItemStyle-Width=150 FilterControlWidth="120" HeaderStyle-Width="150"
                FilterControlAltText="Filter AlertType column" HeaderText="Alert Type" ReadOnly="True"  AllowFiltering="false"
                SortExpression="AlertType" UniqueName="AlertType" />
            <telerik:GridBoundColumn DataField="Priority"  ItemStyle-Width=75 FilterControlWidth="45" HeaderStyle-Width="75"
                FilterControlAltText="Filter Priority column" HeaderText="Priority" ReadOnly="True"  AllowFiltering="false"
                SortExpression="Priority" UniqueName="Priority" />
            <telerik:GridBoundColumn DataField="CreationTime"  ItemStyle-Width=135 FilterControlWidth="100" HeaderStyle-Width="135"
                FilterControlAltText="Filter CreationTime column" HeaderText="Creation Time" ReadOnly="True"  AllowFiltering="false"
                SortExpression="CreationTime" UniqueName="CreationTime" />
            <telerik:GridBoundColumn DataField="Dest"
                FilterControlAltText="Filter Dest column" HeaderText="Dest IP" ReadOnly="True"  AllowFiltering="false"
                SortExpression="Dest" UniqueName="Dest" />
            <telerik:GridBoundColumn DataField="Source"
                FilterControlAltText="Filter Source column" HeaderText="Source IP" ReadOnly="True"  AllowFiltering="false"
                SortExpression="Source" UniqueName="Source" />
            <telerik:GridBoundColumn DataField="EventName"
                FilterControlAltText="Filter EventName column" HeaderText="Event Name" ReadOnly="True"  AllowFiltering="false"
                SortExpression="EventName" UniqueName="EventName" />
        </Columns>
 
        <EditFormSettings>
        <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <GroupingSettings ShowUnGroupButton="true" />
 
    <FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
    InitialDelayTime="500" >
    </telerik:RadAjaxLoadingPanel>
 
 
    <script type="text/javascript">
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
                args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
                args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) {
                args.set_enableAjax(false);
            }
        }
</script>
 
</asp:Content>


Michael O'Flaherty
Top achievements
Rank 2
 answered on 04 Apr 2013
1 answer
139 views
Hi,

I am using RadWindow above that i am having menu. when window is in InitialBehaviors="Maximize" then menu item is going
inside the RadWindow. how to make menu item above when window is in InitialBehaviors="Maximize" mode.

Here below is my code:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                <Windows>
                    <telerik:RadWindow runat="server" InitialBehaviors="Maximize" RestrictionZoneID="div1"
                        VisibleStatusbar="false" KeepInScreenBounds="true">
                        <ContentTemplate>
                            Content Will go herer
                        </ContentTemplate>
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>

Thanks & Regards
Anuj
Marin Bratanov
Telerik team
 answered on 04 Apr 2013
1 answer
120 views
Hello, I have a problem with some of the controls included in tootltip.
I na page that dynamically loads a usercontrol inside with radRotator in turn this rotator load another usercontrol into a du tootlip.
the usercontrol inside the tootlip has two radtextbox and add a rating ranging update a SQL table.
When I click the button, the value of rating is maintained correctly and what I wrote in the textbox is lost. This is because when I click on the button to update the first thing that happens is to reload the usercontrolo that loads the radRotator which in turn charging the usercontrol with the tootlip. but why keep the value of the Rating and not that of texbox?

Bye
Marin Bratanov
Telerik team
 answered on 04 Apr 2013
1 answer
88 views
Hello,

i have Radpanelbar with mutiple comboboxes(Combo1, Combo2, Combo3...) in each panel.....

I want to populate items in Combo2 based on Comb1 selection....

i want to do from code behind....

how to get SelectedIndexedChanged event of Combo1 or Click event of Combo2 from codebehind....

Here is my markup...

<telerik:RadPanelBar runat="server" ID="rpbReconciliationSummaryInquiry" Height="300"
            Font-Bold="True" Font-Size="Large" ExpandMode="SingleExpandedItem"  OnClientItemExpand="OnClientItemExpand"
              Width="300" >
            <Items>
                       
                <telerik:RadPanelItem Expanded="False" Text="Dept / Class / Vendor / Location"  Value="DCVLTop" Font-Bold="True"   ForeColor="White">
                    <Items>
                        <telerik:RadPanelItem Value="DCVL"   Text="">       
                           <ItemTemplate>     
                            <table>

                                     <tr>
                                            <td>
                                                <asp:Label ID="lblDept" runat="server" Text="Dept:" CssClass="label" />
                                            </td>
                                               <td>
                                                  <telerik:RadComboBox ID="cmbDeptDCVL" runat="server"     OnClientBlur="OnClientBlurHandler"
                                                                AllowCustomText="false" EnableLoadOnDemand="true" MarkFirstMatch="true" Width="100"
                                                                TabIndex="6"  DropDownWidth="350px" AutoPostBack="True" >
                                                                 <HeaderTemplate>
                                                            <table>
                                                                <tr>                                                                 
                                                                    <td width="80"> Dept </td>
                                                                    <td width="220">Description </td>
                                                                </tr>
                                                            </table>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <table>
                                                                <tr align="left">
                                                                  <td width="20">
                                                                        <asp:CheckBox runat="server" ID="chkSingleDeptDCVL"    Text=""  />
                                                                    </td>
                                                                    <td width="80" align="left"> <%#CType(Container.DataItem, PhysicalInventory.Models.ApplCompStructInfo).DeptId%> </td>
                                                                    <td width="220" align="left"> <%#CType(Container.DataItem, PhysicalInventory.Models.ApplCompStructInfo).DeptShortDesc%> </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                            <CollapseAnimation Duration="200" Type="OutQuint" />
                                        </telerik:RadComboBox>
                                    </td>
                                </tr>

                                   <tr>
                                    <td>
                                        <asp:Label ID="lblClass" runat="server" Text="Class:" CssClass="label" />
                                    </td>
                                       <td>
                                          <telerik:RadComboBox ID="cmbClassDCVL" runat="server" OnClientBlur="OnClientBlurHandler"
                                            AllowCustomText="false" EnableLoadOnDemand="true" MarkFirstMatch="true" Width="100"
                                            TabIndex="6"  DropDownWidth="350px">
                                                      <HeaderTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td width="80"> Class </td>
                                                                    <td width="250">Description </td>
                                                                </tr>
                                                            </table>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <table>
                                                                <tr align="left">
                                                                   <td width="20">
                                                                        <asp:CheckBox runat="server" ID="chkSingleClassDCVL"    Text=""    />
                                                                    </td>
                                                                    <td width="80" align="left"> <%#CType(Container.DataItem, PhysicalInventory.Models.ApplDptClsInfo).ClassId%> </td>
                                                                    <td width="250" align="left">  <%#CType(Container.DataItem, PhysicalInventory.Models.ApplDptClsInfo).ClassShortDesc%></td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                            <CollapseAnimation Duration="200" Type="OutQuint" />
                                        </telerik:RadComboBox>
                                    </td>
                                </tr>




Nencho
Telerik team
 answered on 04 Apr 2013
1 answer
54 views
Hello,

I have a problem when I define several RadSlidingZone in RadPane.
The client events are occured only for the last RadSlidingZone.

Where is the problem?

Regards,
Michaël
Dobromir
Telerik team
 answered on 04 Apr 2013
2 answers
149 views
Hi,

I tried to bind ImageUrl property with ObjectDataSource without success. I look all demo and exemple for this work and i can't find how to bind this property.

My treeView display the text and build good structure, mais i can't set ImageUrl from my object.

I tried this in the markup 
ImageUrl="Image"
<telerik:RadTreeView ID="rtvNavigation" runat="server"
    MultipleSelect="false"
    Font-Size="9pt"
    Height="94%"
    Width="100%"
    DataSourceID="ObjectDataSource1"
    DataTextField="Description"
    DataFieldID="ID"
    DataFieldParentID="ParentID"
    AllowNodeEditing="false"         
    ImageUrl="Image"       
    OnNodeClick="rtvNavigation_NodeClick">
</telerik:RadTreeView>
and onNodeDataBound event, i can't set this imageURL because the ID is always empty.

Thank you for help!




Allin
Top achievements
Rank 1
 answered on 04 Apr 2013
3 answers
67 views
Hi guys,

I'm not sure if this has already been addressed or identified, but I'd like to point out an issue that I can reproduce on your demo page:

Reproduction steps:
1. Go to your demo page: http://demos.telerik.com/aspnet-ajax/scheduler/examples/overview/defaultcs.aspx
2. Click on an available time slot to create an appointment and click 'Options' to bring up the advanced form
3. Give the appointment an arbitrary subject, and check the 'recurrence' box
4. Select and insert '1000' into the 'end after ... occurrences' box
5. Click Save
6. Reopen the appointment ('edit entire series')

Expected results: The 'end after' box still has the value of 1000.
Actual results: The 'end after' box has the value of 1.

Comments:
It works as expected for values up to 999. It seems to run into a problem when the thousands separator comes into play (i.e. the text is formatted as "1,000" when 1000 is entered into the box. As such, I imagine it may have something to do with regional settings and the way numbers are parsed and formatted. At a lower level, it seems that calling:

$find("<recurrenceEditorId>").get_recurrenceRule().get_range().get_maxOccurrences()

returns the incorrect value. Sadly I don't have time to go deeper into the definition of this function, but I would appreciate it if you could kindly let me know:
* Is this indeed a bug?
* Is it a known bug?
* Are there any workarounds?
* Any estimate on when a fix may be released?

Thanks for your time.

Cheers,
Sam
Sam
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
134 views
Hi,

When I try to upload a file using FileExplorer, the update panel keeps showing long after the file upload.

In the Chrome console, this script error appears:

Uncaught TypeError: Cannot call method 'get_selectedItem' of null

Here's the declaration of the FileExplorer:

<telerik:RadFileExplorer ID="ExplorerExportTemplates" runat="server" Width="600px" Height="400px"
                                                            Skin="Metro" Configuration-AllowFileExtensionRename="False" Configuration-AllowMultipleSelection="False"
                                                            AllowPaging="true" EnableOpenFile="true" EnableAsyncUpload="True">
                                                            </telerik:RadFileExplorer>

Here's the code-behind:

string[] paths = new string[] { Page.ResolveUrl(fullPath) };
                ExplorerExportTemplates.Configuration.ViewPaths = paths;
                ExplorerExportTemplates.Configuration.UploadPaths = paths;
                ExplorerExportTemplates.Configuration.DeletePaths = paths;
                ExplorerExportTemplates.Configuration.EnableAsyncUpload = true;
                ExplorerExportTemplates.Configuration.MaxUploadFileSize = 104857600;
                ExplorerExportTemplates.Configuration.AllowFileExtensionRename = false;
                ExplorerExportTemplates.Configuration.AllowMultipleSelection = false;
                ExplorerExportTemplates.EnableCreateNewFolder = true;
                ExplorerExportTemplates.EnableCopy = false;
                ExplorerExportTemplates.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.FileTree;
                ExplorerExportTemplates.Configuration.SearchPatterns = new string[] { "*.xls", "*.xlsx" };
                ExplorerExportTemplates.Configuration.ContentProviderTypeName = typeof(Telerik.Web.UI.Widgets.FileSystemContentProvider).AssemblyQualifiedName;


Any ideas?

Thanks,

Ajit
Dobromir
Telerik team
 answered on 04 Apr 2013
1 answer
79 views
Hello!

I build my grid on Runtime

protected void Page_Init(object sender, System.EventArgs e)
        {
 
RadGrid RadGrid1 = new RadGrid();
            RadGrid1.ID = "grid";
             RadGrid1.ClientSettings.Scrolling.ScrollHeight = 500;
            RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
            RadGrid1.AllowAutomaticInserts = false;
            RadGrid1.AllowAutomaticUpdates = false;
...
...
...
           PlaceHolder1.Controls.Add(RadGrid1);
}

Now, i want show a LoadingPanel for every action in the Grud (load new Data, Insert, Update...)

How can i do this ?

Thank You!
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Apr 2013
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?