Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
512 views

I put an Ajax panel on my page but now downloads do not work, I know is cause of the response.write stream.  I s there a way to get around this in the code behind of the itemCommand.  The downloads are in a sub grid of my main grid so I cannot take it out of the ajax panel.

 

<DetailTables>
                               <telerik:GridTableView DataKeyNames="intUploadId" Name="SubGrid" Width="50%" TableLayout="Fixed" Font-Size="10" AutoGenerateColumns="False" SkinID="Web20">
                                       <ParentTableRelation>
                                           <telerik:GridRelationFields DetailKeyField="intWarrantyNumId" MasterKeyField="intWarrantyNumId" />
                                       </ParentTableRelation>
                                       <HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
                                       <ItemStyle HorizontalAlign="Center"  />
                                       <AlternatingItemStyle HorizontalAlign="Center" />
                                       <Columns>
                                            <telerik:GridTemplateColumn HeaderText="File">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkDelete" runat="server" CommandArgument='<%# Bind("intUploadId")%>' CommandName="DeleteDoc" OnClientClick="return confirm('Are you sure you want to delete this attachment');">
                                                        <asp:Image ID="imgDelete" runat="server" ImageUrl="~/Images/Delete Circle Small.png" BorderStyle="None" />
                                                    </asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>  
                                            <telerik:GridTemplateColumn HeaderText="File">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkFile" runat="server" Text='<%# Bind("strLocation")%>' CommandArgument='<%# Bind("strLocation")%>' CommandName="Download"></asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>  
                                       </Columns>
                               </telerik:GridTableView>
                           </DetailTables>
 
 If (e.CommandName = "Download") Then
           Dim filename As String = e.CommandArgument.ToString
           'Dim path As String = Server.MapPath("~/RMAUploads/" & filename)
           Dim targetfolder As String = "\\" & ServerName & "\iPBR\Warranty\" & filename
           Response.AddHeader("Content-disposition", "attachment; filename=" & filename)
           Response.ContentType = "application/octet-stream"
           Response.WriteFile(targetfolder)
           Response.End()
       End If

jajanes
Top achievements
Rank 1
 answered on 29 Jan 2019
1 answer
116 views

Hello,

I have found a weird problem with detail tables.  After assigning the correct datakeys to the tables I found that one of my detail tables was not working even though there was nothing wrong with the query nor the detail table structure.

After a bunch of trial and error I found that unless the datakey names are the same in the Master and Detail grids, detail grids will not query any data.

In my mind this is a bug as we can assign whatever datakey names we want in the DataKeys attribute.  The grid should not be enforcing a foreign key naming constraint, while a lot of the time these will be the same some times they will not and in those cases the master/detail relationship within the RadGrid breaks and does not work properly.

Full disclosure, our Telerik version is so old no one knows what version it is and we don't have access to the source files anymore to find out.  It is a good bet it is pre-2013.

Attila Antal
Telerik team
 answered on 29 Jan 2019
1 answer
139 views

Hi,

Dont you feel load on demand feature should also be there ? If it is already there I have not found any mention of it any where. Can I get some clue on it ?

 

Thanks

 

Milind Shevade

Peter Milchev
Telerik team
 answered on 29 Jan 2019
3 answers
255 views

Can a radiobuttonlist trigger a call to ItemCommand inside a RadGrid.  Below, the button works, but the radiobuttonlist does not hit the event in code behind.

<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Approvals" UniqueName="Approvals">
    ItemStyle HorizontalAlign="Left" Width="140" />
    <HeaderStyle HorizontalAlign="Left" Width="140" />
    <HeaderTemplate>
    </HeaderTemplate>
    <ItemTemplate>
        <asp:RadioButtonList ID="rdoApprovals" runat="server" RepeatDirection="Horizontal"
                    CommandName="ApproveDeny">
                    <asp:ListItem Value="1">Approve</asp:ListItem>
                    <asp:ListItem Value="2">Deny</asp:ListItem>
            </asp:RadioButtonList>
        <asp:Button ID="btnTest" runat="server" Text="test" CommandName="test" />
    </ItemTemplate>
</telerik:GridTemplateColumn>
Eyup
Telerik team
 answered on 29 Jan 2019
6 answers
237 views
A root node is interpreted by RadTreeView as any node with a DataFieldParentID of null or empty default value.

I have a hierarchy which is cut from a larger hierarchy and as a result, the Parent value (a Guid in this case) of the nodes I want to root are set to specific values.  As I am binding to an ObjectDataSource I simply overwrite the Parent Guid for the root nodes in my BL with Guid.Empty.

However it would be nice if there were some way to specify the root value to hook on to so this fudge would not be necessary.

One alternative I tried was to create a static node with a value of the specific root Guid I want to hook on to.  However I found that even with AppendDataBoundItems enabled the bound data does not hook on to the single, static, root node.

Has anyone else shared my experience?

Thanks
Neal
Top achievements
Rank 1
 answered on 29 Jan 2019
1 answer
194 views

I was looking at the demos and playing around with the upload control.  It seems that its designed to either be File uploads or Directory uploads, not do both at the same time. It seems we would would have to have two buttons one to allow choosing files and one to allow choosing a directory. The same with drop locations we could have a custom zone that accepts files and we would have to have another custom zone that only accepts a directory.

Below are some scenarios to help explain. I would love to know if all of these scenarios are possible and if so how. If they all of them are not then I would like to know what the reasoning is behind this limitation.

Scenario One

The user click an "upload" button that they can choice either 1 or more files, or 1 or more directories and the control will handle uploading all of them

Scenario Two

The user drags some files to a drop location and it detects they are files and uploads

Scenario Three

The user drags one or more directories to the same drop location as above and it detects they are directories and uploads the files represented within

 

 

Marin Bratanov
Telerik team
 answered on 29 Jan 2019
5 answers
282 views

Rad Editor content is not coming in <p> tag for single line text.

In Current Version 2018.2.710.45

While I put single line text like "Test" in rad editor and getting value in debug mode as "Test" 

 

In Previous Version 2013.2.717.45
While I put single line text like "Test" in rad editor and getting value in debug mode as "<p>Test</p>" 

 

My expected result is "<p>Test</p>"  in this version 2018.2.710.45;

 

This is happening only for single line text .

 

Please give any solution.

 

Rumen
Telerik team
 answered on 29 Jan 2019
1 answer
337 views

     Hi, I am having strange behavior. When grid displays edit popup window and only one numeric field is changed Ok button closes the window. But if before changing the value of the box, I change different item from dropdown, database is updated but window stays open.

<telerik:RadGrid runat="server" ID="gvBudget" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" Skin="Office2010Blue" AutoGenerateColumns="False"
    OnNeedDataSource="gvBudget_NeedDataSource" OnInsertCommand="gvBudget_InsertCommand" OnUpdateCommand="gvBudget_UpdateCommand" OnDeleteCommand="gvBudget_DeleteCommand"
    OnItemDataBound="gvBudget_ItemDataBound" OnItemCommand="gvBudget_ItemCommand" OnBatchEditCommand="gvBudget_BatchEditCommand"
    ShowGroupPanel="true" ShowFooter="true">
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
    <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" />
    <ClientSettings ReorderColumnsOnClient="true" AllowDragToGroup="true">
        <%--<Scrolling AllowScroll="True" UseStaticHeaders="True" />--%>
    </ClientSettings>
    <MasterTableView DataKeyNames="ItemID" ShowFooter="false" CommandItemDisplay="Top" PageSize="20" EditMode="PopUp"
        ItemStyle-HorizontalAlign="Left" AlternatingItemStyle-HorizontalAlign="Left" AllowFilteringByColumn="true"
        AllowMultiColumnSorting="true" ShowGroupFooter="true">
        <AlternatingItemStyle BackColor="AliceBlue" BorderColor="Red" />
        <BatchEditingSettings EditType="Cell"></BatchEditingSettings>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldAlias="TeamName" FieldName="TeamName" />
                    <telerik:GridGroupByField FieldAlias="BudgetType" FieldName="BudgetTypeDescription" />
                    <telerik:GridGroupByField FieldAlias="YearlyBudget" FieldName="YearlyBudget" Aggregate="Sum" HeaderText="Total" FormatString="{0:C}" />
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="TeamName" FieldAlias="teamName" />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="editColumn"  ItemStyle-Width="30px">
                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
            </telerik:GridEditCommandColumn>
<EditFormSettings InsertCaption="Add New Budget Item" CaptionFormatString="Edit Budget Item: {0}" CaptionDataField="BudgetTypeDescription" EditFormType="WebUserControl">
    <PopUpSettings Modal="True"></PopUpSettings>
</EditFormSettings>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CCBABudgetCtrlUpdate.ascx.cs" Inherits="ReportDriver.Controls.CCBABudgetCtrlUpdate" %>
<div class="grid_4 alpha">
    <div class="dockContent">
        <label>Year:</label>
        <div class="float-right">
            <telerik:RadNumericTextBox runat="server" ID="txtCurYear" ReadOnly="True" Enabled="False" Width="100px">
                <NumberFormat GroupSeparator="" DecimalDigits="0" />
            </telerik:RadNumericTextBox>
        </div>
    </div>
    <div class="dockContent">
        <label>Provider:</label>
        <div class="float-right">
            <telerik:RadComboBox runat="server" ID="ddlDoctor" DataSource='<%#CrossCurrent.Components.DoctorController.GetAllDoctors() %>' DataValueField="DoctorID" DataTextField="FullName" SelectedValue='<%# Bind("DoctorID")%>'
                EmptyMessage="Select Doctor/Facility" MarkFirstMatch="True" Width="280px" AutoPostBack="True" OnSelectedIndexChanged="ddlDoctor_OnSelectedIndexChanged">                                       
            </telerik:RadComboBox>
        </div>
    </div>
    <div class="dockContent">
        <label>Budget Type:</label>
        <div class="float-right">
            <telerik:RadComboBox runat="server" ID="ddlBudgetType" DataValueField="BudgetTypeID" DataTextField="BudgetTypeDescription"
                EmptyMessage="Select Budget Type" MarkFirstMatch="True" Width="280px" AutoPostBack="True" OnSelectedIndexChanged="ddlBudgetType_OnSelectedIndexChanged">                                       
            </telerik:RadComboBox>
        </div>
    </div>
    <div class="dockContent">
        <label>Annual Budget:</label>
        <div class="float-right">
            <telerik:RadNumericTextBox runat="server" ID="txtBudgetAmount" MinValue="0" EmptyMessage="Budget" Type="Currency" DbValue='<%# Bind("YearlyBudget")%>'></telerik:RadNumericTextBox>
        </div>
    </div>
</div>
<div class="clear"></div>
<div class="float-right">
    <asp:Button runat="server" ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' CssClass="button"/>
    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" CssClass="button"></asp:Button>
</div>

 

 

Eyup
Telerik team
 answered on 29 Jan 2019
5 answers
254 views

     Hi,

I need to disable the tooltip on an appointment when I drop a  row on top of it.  Currently, if I do this, and remain atop the appointment (my cursor that is), it will bring up the tooltip and cancel my row drop if the background execution takes too long (which it does because this is a very busy calendar).

 

It would also help to disable it temporarily after a context menu selection.

 

Any help would be appreciated.

 

Thanks!

Attila Antal
Telerik team
 answered on 28 Jan 2019
0 answers
101 views

I am working with RadPanelBar and RadPanelItem objects.   On page load, I have anIEnumberable of a type that I iterate over to build my 1st and 2nd layers of PanelItems.   Iam using the ItemTemplate features and setting those to each object.   The issue I'm encountering is that when I postback to update some information,  The ItemTemplate for each PanelItem and it's children is null.   Below is a snippet of how i'm building out the PanelBar.  I need to be able to access the user controls inside each template to update some data.

 

foreach (var integration in integrations)
           {
               RadPanelItem integrationGroup = new RadPanelItem(integration.Name);
               integrationGroup.ItemTemplate = new IntegrationItemEnabledTemplate(integration.UniqueId, integration.IsActive);
               foreach (var param in integration.Parameters)
               {
                   if (!string.IsNullOrEmpty(param.Key))
                   {
                       var pnlItem = new RadPanelItem();
                        
                       pnlItem.ItemTemplate = new IntegrationItemTemplate(param.Integration, param.Key, param.Value);
                       integrationGroup.Items.Add(pnlItem);
                   }
               }
 
               integrationsPanel.Items.Add(integrationGroup);
 
           }
           integrationsPanel.DataBind();
Taylor
Top achievements
Rank 1
 asked on 28 Jan 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?