Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
355 views
I have been working on a RadGrid implementation where I am using a GridAttachmentColumn. For some reason every time I try to upload a .pdf file it ends up in the invalid files collection of the RadUpload control. I have tried adding .pdf to the allowed file extensions and application/pdf to the allowed mime types, and neither seems to be working.

I have not had any trouble uploading various image formats(.png,.jpg.gif) or text files(.txt,.doc). Is there a reason that pdfs are different?

FYI I am not actually inserting the blob into the database. I am intercepting the insert and update events and saving the file to the server. I have also tried using a GridTemplateColumn but I wasn't able to get the RadUpload control to work inside the template.

Here is some of the code from my insert method...
//Cast EditableItem 
GridEditableItem editedItem = e.Item as GridEditableItem; 
 
//Get the ColumnEditor for the FileColumn 
//Get the RadUpload from the ColumnEditor 
GridAttachmentColumnEditor editor = GridAttachmentColumnEditor)editedItem.EditManager.GetColumnEditor("FileColumn"); 
RadUpload upload = (RadUpload)editor.RadUploadControl; 
                 
//If file invalid, Throw an error 
if (upload.UploadedFiles.Count == 0 && upload.InvalidFiles.Count > 0) 
   { 
        throw new Exception("Invalid File Type."); 
   } 
//If no file found, Throw an error 
else if (upload.UploadedFiles.Count == 0 && upload.InvalidFiles.Count == 0)  
   { 
        throw new Exception("No file to Upload."); 
   } 

Everything I have tried always throws the Invalid File Type exception if I try to upload a pdf.

If anyone can help me out it would be appreciated.
Paul
Top achievements
Rank 1
 answered on 04 Mar 2010
1 answer
143 views
Hi,

In my grid I have set ShowGroupPanel to true and under ClientSetting AllowDragToGroup is also set to true. In my grid I have simple templete which contains Hyperlink. I want to disable AllowDragToGroup for this column. Is that possible?

Thanks
MP
Princy
Top achievements
Rank 2
 answered on 04 Mar 2010
1 answer
132 views
Hi,

I placed a RadToolBar in a GridTemplateColumn, the RadGrid is ajaxfied and is placed at UserControl. The RadToolBar contains SplitButtons with child ToolBarbuttons. Each RadToolBarButton has a design-time setting of ImageUrl.

The problem I have is...When browsing the page, images are not diplayed, but when the mouse is over the toolbar control, the image is refreshed and displayed.

BTW: The usercontrol is placed in a "sub" web application while the images are placed (shared) in "parent" web application. I don't thing that this is the reason, since other images are displayed correctlly at grid CommandTemplate.

Any idea how resolve this issue?

Avidan
T. Tsonev
Telerik team
 answered on 04 Mar 2010
2 answers
152 views
Hi all

I'm using Rad grid 2.0.

I have a couple of issues needing attention. They are the following:

1)  I am unable to do a multi group with different columns. Each time I try it overwrites the current grouping.

2) I am able to group on a column and it refreshes quickly. But when trying to ungroup, the grid "freezes" and only shows "refreshing..." at the bottom of the grid while doing nothing.

Please advice

Thank you
Yavor
Telerik team
 answered on 04 Mar 2010
3 answers
176 views
I am using Q3 2009 version of the controls. The menu works fine if I run it in Compatibility View. As soon as I deselect Compatibility View, submenus are not shown up. And it does not work in Firefox or Chrome. By the way, it worked fine with Q2 2009. Here is my code:
<%@ Control Language="C#" AutoEventWireup="true"   
            Codebehind="NavigationUC.ascx.cs" Inherits="TelerikTesting.UserControls.NavigationUC" %> 
 
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
    Namespace="System.Web.UI" TagPrefix="asp" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<style type="text/css">  
    .RadPanelBar,  
    .RadPanelBar .rpSlide,  
    .RadPanelBar .rpGroup,  
    .RadPanelBar .rpTemplate  
    {  
        overflow:visible !important;  
    }  
 
    div.RadPanelBar .rpLevel1 .rpItem  
    {  
        padding:0;  
    }  
      
    div.RadMenu .rmRootGroup  
    {  
        border: 0;  
    }  
      
    div.RadMenu .rmLink  
    {  
        float: none;  
    }  
</style> 
 
<
telerik:RadPanelBar ID="RadPanelbar1" runat="server"   
        Width="100%" EnableViewState="false" EnableEmbeddedSkins="false">  
    <Items> 
        <telerik:RadPanelItem Text="Menu 1" runat="server" Expanded="True" Width="100%">  
            <Items> 
                <telerik:RadPanelItem runat="server">  
                    <ItemTemplate> 
                        <telerik:RadMenu ID="rmMenu1" Width="99%" Flow="Vertical" runat="server"   
                                 EnableViewState="false" EnableEmbeddedSkins="false">  
                            <Items> 
                                <telerik:RadMenuItem Text="Schedules" NavigateUrl="~/ScheduleList.aspx" /> 
                            </Items> 
                        </telerik:RadMenu> 
                    </ItemTemplate> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelItem> 
        <telerik:RadPanelItem Text="Menu 2" runat="server" Expanded="True" Width="100%">  
            <Items> 
                <telerik:RadPanelItem runat="server">  
                    <ItemTemplate> 
                        <telerik:RadMenu ID="rmMenu2" Width="99%" Flow="Vertical" runat="server"   
                            style="z-index:7000" EnableViewState="false" EnableEmbeddedSkins="false">  
                            <Items> 
                                <telerik:RadMenuItem Text="Menu 2 1">  
                                     <Items> 
                                        <telerik:RadMenuItem Text="Help 1" NavigateUrl="~/Help.aspx">  
                                        </telerik:RadMenuItem> 
                                        <telerik:RadMenuItem Text="Help 2">  
                                             <Items> 
                                                <telerik:RadMenuItem Text="Help 2 1" NavigateUrl="~/Help.aspx">  
                                                </telerik:RadMenuItem> 
                                            </Items> 
                                        </telerik:RadMenuItem> 
                                    </Items> 
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem Text="Menu 2 2">  
                                     <Items> 
                                        <telerik:RadMenuItem Text="Help" NavigateUrl="~/Help.aspx" /> 
                                    </Items> 
                                </telerik:RadMenuItem> 
                           </Items> 
                        </telerik:RadMenu> 
                    </ItemTemplate> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelItem> 
    </Items> 
</telerik:RadPanelBar> 

Any thoughts?
Yana
Telerik team
 answered on 04 Mar 2010
2 answers
176 views
I am having troubling figuring this out.  I have a form that accepts information about a user - I am using a radInputManger to validate and all of this works fine.  However, if the user wants to enter a "Joint" applicant - they can by selecting the application type from the form.  When they do this - an entire new panel is displayed with additional fields.  I am then using a different inputmanager for these controls and I want to enable it or disable it when appropriate.

This code does not error - but does not make the CoAppInputManager active either.  How can I do this?

Input Managers:
<telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Windows7"> 
                  <telerik:TextBoxSetting ErrorMessage="Required!"> 
                      <TargetControls> 
                          <telerik:TargetInput ControlID="txt_FirstName" /> 
                          <telerik:TargetInput ControlID="txt_LastName" /> 
                          <telerik:TargetInput ControlID="txt_Address" /> 
                          <telerik:TargetInput ControlID="txt_City" /> 
                          <telerik:TargetInput ControlID="txt_Employer" /> 
                          <telerik:TargetInput ControlID="txt_Occupation" /> 
                      </TargetControls> 
                    <Validation IsRequired="True" ValidationGroup="LoanApplication"></Validation> 
                  </telerik:TextBoxSetting> 
</telerik:RadInputManager> 
 
<telerik:RadInputManager ID="radCoAppInputManager" runat="server" Skin="Windows7"> 
        <telerik:TextBoxSetting ErrorMessage="Required!"> 
                      <TargetControls> 
                          <telerik:TargetInput ControlID="txt_CoFirstName" /> 
                          <telerik:TargetInput ControlID="txt_CoLastName" /> 
                          <telerik:TargetInput ControlID="txt_CoOccupation" /> 
                          <telerik:TargetInput ControlID="txt_CoEmployer" /> 
                          <telerik:TargetInput ControlID="txt_CoAddress" /> 
                          <telerik:TargetInput ControlID="txt_CoCity" /> 
                      </TargetControls> 
                    <Validation IsRequired="True" ValidationGroup="LoanApplication"></Validation> 
                  </telerik:TextBoxSetting> 
</telerik:RadInputManager> 

Javascript:
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
    
         <script language="javascript" type="text/javascript"> 
                <!-- 
 
             function ToggleAppType(sender, eventArgs) { 
                 var item = eventArgs.get_item(); 
                 var im_AppType = $find("<%= radCoAppInputManager.ClientID %>");  
 
                 if (item.get_value() == "Joint") { 
                     document.getElementById("Co-Applicant").style.display = "block"; 
                     im_AppType.enabled = true; 
                     // document.getElementById("radCoAppInputManager").visible = true; 
                 } 
                 else { 
                     document.getElementById("Co-Applicant").style.display = "none"; 
                     im_AppType.visible = false; 
                     // document.getElementById("radCoAppInputManager").visible = false; 
                 } 
 
             } 
</script> 
</telerik:RadCodeBlock> 


So is there a way to enable and disable the radinput manager client-side, or will i have to do a post-back? I really don't want to have to do that...






Yavor
Telerik team
 answered on 04 Mar 2010
1 answer
127 views
Hi

Is it possible to hide all the buttons in the RadListBox ?

Best Regards
Kim Johansen
Shinu
Top achievements
Rank 2
 answered on 04 Mar 2010
1 answer
137 views
Hi All,

I have a grid, and i am binding grid with a dynamic table which i generate by c#. in this case i dont know how many columns will come in the grid. much of the columns are the numeric columns. then how can i show the sub total in the footer in this case.

Also i need to show the one more sub total below the sub total in the footer column of numeric columns.

I have attached  an image how my grid should looks.

Please help me regarding this.


Princy
Top achievements
Rank 2
 answered on 04 Mar 2010
1 answer
160 views


Hi...

In RadGrid can I edit more than one row at a time, ie.,all rows should be editable.

What I exactly need is Excel-like editing mode?Can I achieve it using radGrid?

Please provide a sample for the same.

-Liji Jose
Shinu
Top achievements
Rank 2
 answered on 04 Mar 2010
2 answers
416 views
Hi,
   I am using a web user control to edit the grid items. I have specified the Edit mode as "popUp". But I want to change the size of the popup window.

Any idea how to implement this ?
<telerik:RadGrid ID="RadGrid1"  runat="server"    
     GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"   
           Width="97%" OnNeedDataSource="RadGrid1_NeedDataSource"  
           OnDeleteCommand="RadGrid1_DeleteCommand"  
           OnInsertCommand="RadGrid1_InsertCommand"  
           OnUpdateCommand="RadGrid1_UpdateCommand"  
           OnPreRender="RadGrid1_PreRender" >   
           <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>   
               
           <MasterTableView DataKeyNames="IDR_ID" GridLines="None" Width="100%" CommandItemDisplay ="Top" EditMode="PopUp">   

Thanks,
Rita


Rita15
Top achievements
Rank 1
 answered on 04 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?