Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
Hello,

I am working on a project with a RadGrid.

Inside the RadGrid there is a CommandItem, which has a RadMenu.
When the user clicks the RadMenu, the sub-menu opens but it is hidden under the RadGrid. [See video]

How can I solve this?
 

Thank you,
Daniel.
Daniel
Top achievements
Rank 1
 answered on 14 Aug 2014
5 answers
184 views
Hello everyone,

I was wondering if it is possible to add a new record within radgrid by editing each column field directly in the grid. That is, is it possible to input values directly into a specific (empty) row and have the grid save the row as a new record. I have worked with the edit form template, but my client is insistent on being able to add a record directly from the grid, rather than having a form appear. (I have already implemented a separate form for inputting records) I have included an image to help illustrate the functionality I am trying to achieve. I will supply more information if my goal is still unclear.

Thanks,
Matt
Matthew
Top achievements
Rank 1
 answered on 14 Aug 2014
8 answers
145 views
hi,
i am having
1] three dropdown populates based on each other.
2] grid populates on the 3 dropdown combination
3] i can edit record or add new record.

given code till i manageble, it works for 3 dropdown and shows grid but i am not able to click on edit or add new activity.

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
 
    var column = null;
    function MenuShowing(sender, args) {
            }
 
    function filterMenuShowing(sender, eventArgs) {
        
    }
 
    function RowSelected(sender, eventArgs) {
    }
 
    function CheckSelected() {
 
    }
 
    function validateCombo(source, args) {
     
        }
 
    }
 
</script>
</telerik:RadCodeBlock>
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
<script type="text/javascript" id="telerikClientEvents1">
//<![CDATA[
 
    function radtxtClient_OnValueChanged(sender, args) {
        //Add JavaScript handler code here
    }
//]]>
</script>
</telerik:RadCodeBlock>
 
 
 
 
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="PanelLabel">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="FY"/>
               <telerik:AjaxUpdatedControl ControlID="lblFY"/>
               <telerik:AjaxUpdatedControl ControlID="Asg"/>
               <telerik:AjaxUpdatedControl ControlID="lblAsg"/>
               <telerik:AjaxUpdatedControl ControlID="Task" />
               <telerik:AjaxUpdatedControl ControlID="lblTask" />
               <telerik:AjaxUpdatedControl ControlID="PanelGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
 
 
        <telerik:AjaxSetting>
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="PanelGrid"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
 
<asp:panel ID="PanelLabel" runat="server">
    <table ">
        <tr>
            <td>
                <telerik:RadComboBox ID="FY" runat="server" AutoPostBack="True" OnSelectedIndexChanged="FY_SelectedIndexChanged"
                    EnableLoadOnDemand="true" OnItemsRequested="FY_ItemsRequested"
                   >
                </telerik:RadComboBox>
            </td>
            <td >
                <telerik:RadComboBox ID="Asg" runat="server" AutoPostBack="True"  OnSelectedIndexChanged="Asg_SelectedIndexChanged"
                    EnableLoadOnDemand="true" EnableVirtualScrolling="true" OnItemsRequested="Asg_ItemsRequested"
                  >
                </telerik:RadComboBox>
            </td>
            <td >
                <telerik:RadComboBox ID="Task" runat="server" AutoPostBack="True" OnSelectedIndexChanged="Task_SelectedIndexChanged"
                    EnableLoadOnDemand="true" EnableVirtualScrolling="true" OnItemsRequested="Task_ItemsRequested"
                  >
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblFY" runat="server" Text="Label" Visible="False"></asp:Label>
            </td>
            <td >
                <asp:Label ID="lblAsg" runat="server" Text="Label" Visible="False"></asp:Label>
            </td>
            <td >
                <asp:Label ID="lblTask" runat="server" Text="Label" Visible="False" ></asp:Label>
            </td>
        </tr>
        
    </table>
</asp:panel>
<asp:Panel runat="server" ID="PanelGrid" BackColor="#66CCFF" Visible="False" BorderStyle="Outset">
    <table >
        <tr>
            <td>
                <telerik:RadGrid ID="radgridTask" runat="server"
              OnPreRender="radgridTask_PreRender"
                    OnItemCreated="radgridTask_ItemCreated" OnNeedDataSource="radgridTask_NeedDataSource"
                    OnItemCommand="radgridTask_ItemCommand" OnItemDataBound="radgridTask_ItemDataBound"
                    AutoGenerateColumns="False">
                
                    <ClientSettings AllowColumnsReorder="true" Resizing-AllowResizeToFit="true" EnablePostBackOnRowClick="false"
                        ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True"></Selecting>
                        <Resizing AllowResizeToFit="True"></Resizing>
                    </ClientSettings>
                 
                    <MasterTableView CommandItemDisplay="Bottom" CommandItemSettings-ShowAddNewRecordButton="true"
                        EditMode="PopUp" DataKeyNames="ID" CommandItemSettings-ShowRefreshButton="false"
                        HierarchyLoadMode="Client" >
                        <CommandItemSettings AddNewRecordText="Add New Task-Activity" />
                        <EditFormSettings EditColumn-EditText="Change Acivity Name"
                        >
                            <EditColumn ButtonType="PushButton">
                           
                            
                        </EditFormSettings>
                        <Columns>
                            <telerik:GridClientSelectColumn UniqueName="GridClientSelectColumn" Visible="False">
                            </telerik:GridClientSelectColumn>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ActivityName" MaxLength="50" FilterControlAltText="Filter column"
                                HeaderText="Task-Activities" UniqueName="ActivityName">
                                <HeaderStyle Font-Bold="True" Font-Size="Larger" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="EditColumn" EditText="Edit"
                                InsertText="Save">
                            </telerik:GridEditCommandColumn>
                        
                    
                    </MasterTableView>
                </telerik:RadGrid>
            </td>
        </tr>
        <tr>
            <td valign="top" style="padding-top: 1px">
                <table width="100%" cellspacing="0">
                    <tr>
                        <td align="left">
                            <asp:Button ID="btnAddtask" runat="server" Text="Add Task-Activity"
                                Enabled="False" Visible="False" />
                        </td>
                        <td style="width: 25%">
                            <asp:Label ID="lblCreatedBy" runat="server" Text="CreatedBy :" Visible="False" ></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCreatedBy" runat="server" ></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 25%">
                            <asp:Label ID="lblOwner" runat="server" Text="Owner :" Visible="False"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtOwner" runat="server" ></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Panel>
<tr>
    <td>
    </td>
</tr>

Thanks
Maria Ilieva
Telerik team
 answered on 14 Aug 2014
1 answer
156 views
Hi, 

I know there were some issues in the past with using the RequiredFieldValidator not working properly with the AutoCompleteBox control (think it was empty when it wasn't), but after updating our Telerik dll to the assembly version of 2014.1.403.35, it seems the issue has gone away for the most part.  The issue occasionally shows up for me, but in a random way.  Please note that I am using this:

http://www.telerik.com/help/aspnet-ajax/input-validation.html

to highlight required fields that have not been filled out by the user.

One way I'm able to recreate this issue is by pressing the "Get Quote" button first so the required field validators are triggered.  I then fill out the information for the first item, but the highlight (in this case, an error icon) is never cleared out and clicking on the submit button doesn't work (see the attached image).  Please note that this happens randomly, so it could take four, five tries for the glitch to show up.

The only thing I didn't include was the data source, but I'm sure this would work with any with minor tweaking.

Thank you for your help.

<!DOCTYPE html>
 
<head runat="server">
    <title></title>
      
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
         
    </telerik:RadScriptManager>
 
        <telerik:RadAjaxManager ID="ramMain" runat="server" DefaultLoadingPanelID="ralpDefault" >
        <AjaxSettings>
           
            <telerik:AjaxSetting AjaxControlID="btnGetQuote">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LTLUI" UpdatePanelCssClass=""  LoadingPanelID="ralpDefault"/>
                    
                </UpdatedControls>
            </telerik:AjaxSetting>
 
        </AjaxSettings>
            </telerik:RadAjaxManager>
        <telerik:RadSkinManager runat="server" ID="rskmMain" Skin="Windows7" ShowChooser="false" />
         
        <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all" EnableRoundedCorners="false">
        </telerik:RadFormDecorator>
 
        <telerik:RadAjaxLoadingPanel ID="ralpDefault" runat="server" Height="75px" Width="75px" />
 
        <div id="LTLUI" runat="server" >
            <table>
               <tr>
                                                     <td colspan="2">Origin Postal Code</td>
                                                 </tr>
                                                 <tr>
                                                     <td width="290px">
                                                          <telerik:RadAutoCompleteBox OnClientDropDownOpening="OnClientDropDownOpening"  OnClientEntryAdding="AutoCompleteBox_OnClientEntryAdding" InputType="Token"  TextSettings-SelectionMode="Single" AllowCustomEntry="true"  ID="racbOriginZipCode" Width="290px" runat="server"  DropDownWidth="250px" DropDownHeight="325px" EmptyMessage="Required field"  >
                                                                                    <WebServiceSettings   Path="Default.aspx" Method="GetAirportChildren" ></WebServiceSettings>
                                                                            <ClientDropDownItemTemplate>
               
                                                                                <table cellpadding="1" cellspacing="1">
                                                                <tr>
                                                                    <td> #= Attributes.ZipCode #,  #= Attributes.City # (#= Attributes.StateMasterCode #)</td>
                                                                </tr>
                                                            </table>
             
                                                            </ClientDropDownItemTemplate>
                                                        </telerik:RadAutoCompleteBox>
                                                        
                                                     </td>
                                                     <td>
                                                           <asp:RequiredFieldValidator runat="server" ID="rfvOriginZipCode" ControlToValidate="racbOriginZipCode" Text="<img src='../../../Images/Icons/Error.gif'/>" ValidationGroup="InputArea" Enabled="True" InitialValue="" />
 
                                                     </td>
                                                 </tr>
                                                 <tr>
                                                     <td colspan="2">Destination Postal Code</td>
                                                 </tr>
                                                 <tr>
                                                     <td colspan="1">
                                                         <telerik:RadAutoCompleteBox InputType="Token"  TextSettings-SelectionMode="Single" AllowCustomEntry="true"  ID="racbDestZipCode"  EmptyMessage="Required field" Width="290px" runat="server"  DropDownWidth="250px" DropDownHeight="290px" OnClientEntryAdding="AutoCompleteBox_OnClientEntryAdding" >
                                                            <WebServiceSettings Path="Default.aspx" Method="GetAirportChildren"></WebServiceSettings>
                                                        <ClientDropDownItemTemplate>
               
                                                             <table cellpadding="1" cellspacing="1">
                                                                <tr>
                                                                    <td> #= Attributes.ZipCode #,  #= Attributes.City # (#= Attributes.StateMasterCode #)</td>
                                                                </tr>
                                                            </table>
             
                                                        </ClientDropDownItemTemplate>
                                                        </telerik:RadAutoCompleteBox>
 
                                                          
                                                     </td>
                                                     <td>
                                                          <asp:RequiredFieldValidator runat="server" ID="rfvDestZipCode" ControlToValidate="racbDestZipCode" Text="<img src='../../../Images/Icons/Error.gif'/>" ValidationGroup="InputArea"  Enabled="True"/>
                                                     </td>
                                                 </tr>
                                                 
                                             </table>
                                                                   
            <telerik:radbutton runat="server" id="btnGetQuote" Text="Get Quote" CausesValidation="true"  ValidationGroup="InputArea" Width="500px" />
            </div>
    </div>
 
         <telerik:RadCodeBlock runat="server" ID="rcbJavascript">
             
        <script type="text/javascript">
            if (ValidatorUpdateDisplay && typeof (ValidatorUpdateDisplayOriginal) === "undefined") {
 
                ValidatorUpdateDisplayOriginal = ValidatorUpdateDisplay;
                ValidatorUpdateDisplay = function (val) {
                    var control = $find(val.controltovalidate);
                    if ((!val.isvalid) && control && control.set_invalid) {
                        control.set_invalid(true);
                    }
                    ValidatorUpdateDisplayOriginal(val);
                };
            }
 
 
 
            function OnClientDropDownOpening(sender, eventArgs) {
                if (sender.get_entries().get_count() > 0) {
                    eventArgs.set_cancel(true);
 
                }
            }
 
            function AutoCompleteBox_OnClientEntryAdding(sender, eventArgs) {
                if (sender.get_entries().get_count() > 0) {
                    eventArgs.set_cancel(true);
 
                }
            }
 
        </script>
</telerik:RadCodeBlock>
            
 
    </form>
</body>
</html>
Boyan Dimitrov
Telerik team
 answered on 14 Aug 2014
1 answer
126 views
If I drag several column headers to the grouping panel, the grouping arrows always show up at the far left of the panel. I was expecting them to show up at the right of the list of columns. This caused some confusion during user testing, they thought the column was being inserted at the front of the list. (See attached screenshot.)

Is there a setting or a workaround to make this behave the way I want? Thanks!



Tested using Chrome & IE, Telerik aspnet-ajax R 2014 Q1
And aside from small things like this, the grid is really working well and giving us a chance at better UI, very much appreciated!
Viktor Tachev
Telerik team
 answered on 14 Aug 2014
2 answers
130 views

Hi there,

I was wondering whether the visual style builder actually supports changing the coloring of icons?  
So I base a new skin of for example Metro Touch, choose a new base color, save all and download the zip.

1. Unfortunately, if you look at the /Common folder, all the sprites (radActionsSprite.png, radFormToggleSprite.png etc) are still the default blue color and not the new base color.

2. Also not too sure about what is supported, since I can successfully get the skin applied (using StyleSheetManager) on some controls but there are serious issues with other controls (RadDatePicker for instance) - both layout and sprite positioning (offsets).

3. Am I supposed to be able to do this simple change (just change the base color) and the skin should just work for all controls?

Magdalena
Telerik team
 answered on 14 Aug 2014
5 answers
326 views
Pls show me how to achieve that in Bar chart as all the bars in the same serie always have  the same color. It can be done automatically in Pie chart but I cannot figure out how to do that in Bar chart apart from manually assigned colors to every single item.

Thanks in advance
Danail Vasilev
Telerik team
 answered on 14 Aug 2014
0 answers
306 views
Hello Team, 

I am using Rad File Explorer with Telerik file version 2012.2.1002.35 in my application. We are using FileSystemContentProvider to override DeleteFile and DeleteDirectory methods. My issue is when I click Delete button on toolbar or using context menu for deleting file or directory, ItemCommand event of Telerik Rad Fileexplorer is never being hit. Hence Delete is not working for me at all.

Browser: IE 9. We tested this in chrome just to confirm if this is issue with IE alone, but in vain. It does not work in Chrome as well. Below is the code written on OnClientDelete of Rad Explorer.

function OnClientDelete(sender, args) {
                document.getElementById("<%=txtfileTag.ClientID%>").value = "";
                LogEvent("Delete: " + args.get_item().get_name());
                setTimeout(function () {
                    sender.refresh();
                }, 200);
            }

protected void RadTrdFile_ItemCommand(object sender, RadFileExplorerEventArgs e)
    {
        objcommon.InsErrorLog("Entered Item Command", 2, "EditTeardown.aspx", "RadTrdFile_ItemCommand", Convert.ToInt32(Session["UserId"]), "Chrome or IE");
 
        try
        {
            int m_countFileexists = 0;
            int m_fileID = 0;
            string m_fileName = "";
            int m_count = 0;
            int m_count1 = 0;
            string m_actualPath = "";
            if (e.Command == "UploadFile" || e.Command == "DeleteFile" || e.Command == "MoveFile")
            {
                string m_fileNamePath = e.Path.ToString();
                BllAdministration ObjAdministration = new BllAdministration();
                // ObjAdministration.MastersId = 7;
                //ObjAdministration.UserId = Convert.ToInt32(Session["UserId"]);
                ObjTearDown.Type = 7;
                DataTable tb = ObjTearDown.LoadMasters();
                //  DataTable tb = ObjAdministration.LoadMasterFileValues();
 
                foreach (DataRow dr in tb.Rows)
                {
                    if (e.Path.ToUpper().Contains(dr["Description"].ToString().ToUpper().Trim()))
                    {
                        //  m_fileID = Convert.ToInt32(dr["MastersValueId"]);
                        m_fileID = Convert.ToInt32(dr["MasterFileValueId"]);
                        m_fileName = dr["Description"].ToString().Trim();
                        break;
                    }
                }
                if (m_fileID != 0)
                {
                    int m_index = e.Path.ToUpper().IndexOf(m_fileName.ToUpper());
                    if (File.Exists(e.Path))
                    {
                        m_countFileexists = 1;
 
                    }
                    string m_direcoryPath = e.Path.ToUpper().Substring(0, m_index + m_fileName.Length);
                    m_direcoryPath = m_direcoryPath.Replace("/", "\\");
 
 
 
                    DirectoryInfo m_dirInfo = new DirectoryInfo(Server.MapPath(m_direcoryPath));
                    IEnumerable<FileInfo> m_totalFiles = objcommon.GetFilesRecursive(m_dirInfo, "*.*");
                    m_count = m_totalFiles.Count();
                    m_count1 = m_totalFiles.Count();
 
                }
            }
 
            switch (e.Command)
            {
                case "UploadFile":
                    {
 
                        if (m_countFileexists == 0)
                        {
                            string m_FilePath1 = Server.MapPath(e.Path);
                            string dirName1 = new DirectoryInfo(m_FilePath1).Name.Replace('&', '_');
                            string fileExtention = Path.GetExtension(m_FilePath1);
                            if (fileExtention.ToLower() == ".jpg" || fileExtention.ToLower() == ".jpeg"
                                || fileExtention.ToLower() == ".gif" || fileExtention.ToLower() == ".png"
                                || fileExtention.ToLower() == ".bmp" || fileExtention.ToLower() == ".tif" || fileExtention.ToLower() == ".tiff")
                            {
                                m_count = m_count + 2;
 
                            }
                            else
                            {
                                m_count = m_count + 1;
                            }
 
                        }
                        if (m_fileID != 0)
                        {
                            ObjTearDown.MasterFileID = m_fileID;
                            ObjTearDown.MappedFolderPath = m_actualPath;
                            ObjTearDown.FileCount = m_count;
                            ObjTearDown.TearDownId = Request.QueryString["TRDID"];
                            ObjTearDown.UpdateMasterFileCount();
 
                            ObjTearDown.TearDownId = Request.QueryString["TRDID"];
                            ObjTearDown.MappedFolderPath = m_fileName;
                            ObjTearDown.FileCount = m_count;
                            ObjTearDown.InsTRDFiles();
 
 
                        }
                        if (m_count1 == 0)
                        {
                            DataTable dt = objcommon.GetMailSettings();
                            if (dt.Rows.Count > 0)
                            {
                                if (dt.Rows[0]["IsTRDUploadEnabled"].ToString() == "True")
                                {
                                    SendMailDataUpload(Request.QueryString["TRDID"].ToString(), m_fileName, Request.QueryString["TRDID"].ToString(), hdnwrno.Value);
 
                                }
                            }
                        }
 
                        string m_FilePath = Server.MapPath(e.Path);
                        string dirName = new DirectoryInfo(m_FilePath).Name.Replace('&', '_');
                        objcommon.InsAuditLog("U", "tbl_TRD", Request.QueryString["TRDID"].ToString(),
                            Request.QueryString["TRDID"].ToString(), Request.QueryString["TRDID"].ToString(),
                            "UploadFile", null, dirName, Convert.ToInt32(Session["UserId"]));
 
                    } break;
                case "MoveDirectory":
                    {
                        Session["Id"] = Request.QueryString["TRDID"].ToString();
                        Session["Type"] = "T";
                        string foldername = hdnFoldername.Value;
                        string oldfoldername = new DirectoryInfo(hdnoldFoldername.Value).Name;
 
                        objcommon.InsAuditLog("U", "tbl_TRD", Request.QueryString["TRDID"].ToString(),
                            Request.QueryString["TRDID"].ToString(), Request.QueryString["TRDID"].ToString(),
                            "MoveDirectory", oldfoldername, foldername, Convert.ToInt32(Session["UserId"]));
                    } break;
                case "CreateDirectory":
                    {
                        string foldername = hdnFoldername.Value;
                        objcommon.InsAuditLog("U", "tbl_TRD", Request.QueryString["TRDID"].ToString(),
                            Request.QueryString["TRDID"].ToString(), Request.QueryString["TRDID"].ToString(),
                            "CreateDirectory", "", foldername, Convert.ToInt32(Session["UserId"]));
 
                    } break;
                case "DeleteDirectory":
                    {
 
                        DirectoryInfo[] m_SubDir;
                        FileInfo[] m_files;
                        int m_SubDirCount = 0;
                        int m_DirCount = 0;
                        string m_FilePath = Server.MapPath(e.Path); //~results/MappedFoldertest/" +
                        DirectoryInfo m_Dir = new DirectoryInfo(m_FilePath);
                        string dirName = new DirectoryInfo(m_FilePath).Name;
 
                        if (m_Dir.GetDirectories().Length > 0)
                        {
                            m_SubDir = m_Dir.GetDirectories();
                            m_SubDirCount = m_SubDir.Length;
                        }
 
                        if (m_Dir.GetFiles().Length > 0)
                        {
                            m_files = m_Dir.GetFiles();
                            m_DirCount = m_files.Length;
 
                        }
                        objcommon.InsErrorLog("Count" + m_DirCount.ToString(), 2, "EditTeardown.aspx", "Delete Directory", Convert.ToInt32(Session["UserId"]), "Chrome or IE");
 
                        if (m_DirCount > 0 || m_SubDirCount > 0)
                        {                           
                            //ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "alert", "alert('The folder cannot be deleted.Sub Folder(s) or File(s) exist in this folder.')", true);
                            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "alert", "alert('The folder cannot be deleted.Sub Folder(s) or File(s) exist in this folder.')", true);
                            e.Cancel = true;
                            return;
                        }
                        else
                        {
                            string foldername = hdnFoldername.Value;
                            objcommon.InsAuditLog("D", "tbl_TRD", Request.QueryString["TRDID"].ToString(),
                                Request.QueryString["TRDID"].ToString(), Request.QueryString["TRDID"].ToString(),
                                "DeleteDirectory", "", dirName, Convert.ToInt32(Session["UserId"]));
                        }
                    } break;
                case "DeleteFile":
                    {
                        if (m_fileID != 0)
                        {
                            // m_count = m_count - 2;
                            string m_FilePath1 = Server.MapPath(e.Path);
                            string dirName1 = new DirectoryInfo(m_FilePath1).Name.Replace('&', '_');
                            string fileExtention = Path.GetExtension(m_FilePath1);
                            if (fileExtention.ToLower() == ".jpg" || fileExtention.ToLower() == ".jpeg"
                                || fileExtention.ToLower() == ".gif" || fileExtention.ToLower() == ".png"
                                || fileExtention.ToLower() == ".bmp" || fileExtention.ToLower() == ".tif" || fileExtention.ToLower() == ".tiff")
                            {
                                m_count = m_count - 2;
 
                            }
                            else
                            {
                                m_count = m_count - 1;
                            }
                            ObjTearDown.MasterFileID = m_fileID;
                            ObjTearDown.MappedFolderPath = m_actualPath;
                            ObjTearDown.FileCount = m_count;
                            ObjTearDown.TearDownId = Request.QueryString["TRDID"];
                            ObjTearDown.UpdateMasterFileCount();
 
                            string path = e.Path;
                            path = path.Substring(1, path.Length - 1);
                            int index = path.IndexOf('/');
                            path = path.Substring(index);
 
                            ObjTearDown.FilePath = path;
                            ObjTearDown.TearDownId = Request.QueryString["TRDID"];
                            ObjTearDown.DelTRDAnalysisFileTag();
 
 
                            ObjTearDown.TearDownId = Request.QueryString["TRDID"];
                            ObjTearDown.MappedFolderPath = m_fileName;
                            ObjTearDown.FileCount = m_count;
                            ObjTearDown.InsTRDFiles();
 
                            objcommon.InsErrorLog("Count" + m_count.ToString(), 2, "EditTeardown.aspx", "Delete Files", Convert.ToInt32(Session["UserId"]), "Chrome or IE");
 
 
                        }
                        string m_FilePath = Server.MapPath(e.Path);
                        string dirName = new DirectoryInfo(m_FilePath).Name;
                        objcommon.InsAuditLog("D", "tbl_TRD", Request.QueryString["TRDID"].ToString(),
                            Request.QueryString["TRDID"].ToString(), Request.QueryString["TRDID"].ToString(),
                            "DeleteFile", null, dirName, Convert.ToInt32(Session["UserId"]));
 
 
                    } break;
                case "MoveFile":
                    {
                        Session["Id"] = Request.QueryString["TRDID"].ToString();
                        Session["Type"] = "T";
                        string oldpath = hdnoldFoldername.Value;
                        string newpath = hdnFoldername.Value;
 
                        string[] newpatharray = newpath.Split('/');
                        string newFolder = newpatharray.Last();
                         
 
                        ObjTearDown.FilePath = m_fileName;
                        ObjTearDown.TearDownId = Request.QueryString["TRDID"];
                        ObjTearDown.DelTRDAnalysisFileTag();
 
 
                        ObjTearDown.TearDownId = Request.QueryString["TRDID"].ToString() + "," + m_fileName;
                        ObjTearDown.MappedFolderPath = newFolder;
                        ObjTearDown.FileCount = m_count;
                        ObjTearDown.InsTRDFiles();
                    } break;
                case "CopyFile":
                    {
                        Session["Id"] = Request.QueryString["TRDID"].ToString();
                        Session["Type"] = "T";
                    } break;
            }
            // e.Cancel = true; // Cancel the operation
        }
        catch (Exception ce)
        {
            string BrowserType = Request.Browser.Browser + " " + Request.Browser.Version + " " + Request.Browser.Platform;
            objcommon.InsError(ce.Message.ToString() + "<br/> Method Name : RadTrdFile_ItemCommand <br/> Page Name :EditTeardown.aspx");
            objcommon.InsErrorLog(ce.Message.ToString(), 2, "EditTeardown.aspx", "RadTrdFile_ItemCommand", Convert.ToInt32(Session["UserId"]), BrowserType);
        }
    }

public override string DeleteFile(string path)
    {
        BllCommon objcommon = new BllCommon();
        objcommon.InsErrorLog("In Delete File overriden ", 2, "EditTeardown.aspx", "Delete File", 1, "Chrome or IE");
 
        string physicalPath = MapPath(RemoveProtocolNameAndServerName(path));
        try
        {
            if (File.Exists(physicalPath))
            {
                File.Delete(physicalPath);
                try
                {
                    File.Delete(physicalPath.Replace(".thumb", ""));
                }
                catch
                {
                    File.Delete(physicalPath.Replace(".thumb", ""));
                }
            }
        }
        catch (UnauthorizedAccessException)
        {
            return "NoPermissionsToDeleteFile";
 
        }
        return string.Empty;
    }
 
    public override string DeleteDirectory(string path)
    {
        BllCommon objcommon = new BllCommon();
        objcommon.InsErrorLog("In Delete Directory overriden ", 2, "EditTeardown.aspx", "Delete Directory", 1, "Chrome or IE");
 
        string absolutePath = MapPath(RemoveProtocolNameAndServerName(path));
        try
        {
            if (Directory.Exists(absolutePath))
            {
                if (Directory.GetFiles(absolutePath).Length == 0)
                    Directory.Delete(absolutePath);
            }
        }
        catch (UnauthorizedAccessException)
        {
            return "NoPermissionsToDeleteFile";
        }
 
        return string.Empty;
    }



Vani
Top achievements
Rank 1
 asked on 14 Aug 2014
7 answers
206 views
Hi,

When pasting content from MS Word in Chrome, FF and IE 11, I am prompted with a popup which suggests to clean the content as it comes from Word. In Chrome and FF it comes in clean, however in IE 11, it seems that even if you choose to clean it, it comes in with extra html. I would expect that pasting would end up with the same results regardless of the browser?

Thanks,

Leon
Ianko
Telerik team
 answered on 14 Aug 2014
1 answer
125 views
Hello,

I am working on a project with a RadListBox.
In the RadListBox there is a list of items.
The user can change a location of an item inside the list, by drag-and-drop.
I am trying to get the new order of the list, after such a change.
I get the new order only after the first change, but not after the following changes. [View video]

How can I get the new order also after multiple changes?

 
Thanks,

Daniel.
Daniel
Top achievements
Rank 1
 answered on 14 Aug 2014
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?