Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
I have found while working with the RadGrid that when AllowKeyBoardNavigation is set to true all keyboard navigation events are being captured whether focus is in the grid or not.  Not sure if I am going crazy or not, or if there is some other solution.
Here is a simple example that I have duplicated in IE and chrome.

Place a RadTextBox and RadGrid on a form setting the client setting AllowKeyBoardNavigation="True".  Also in my testing I am using a masterpage.
<asp:Content ID="Content1" ContentPlaceHolderID="cphBody" runat="Server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadTextBox ID="RadTextBox1" runat="server">
    </telerik:RadTextBox>
    <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"
        onneeddatasource="RadGrid1_NeedDataSource">
        <ClientSettings AllowKeyboardNavigation="True">
        </ClientSettings>
        <MasterTableView>
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
</asp:Content>

When you open the page and the grid is filled put focus and type something in the textbox and attempt to use the back and forward buttons on your keyboard.  In my testing focus leaves the textbox and is placed immediately on the grid when one of these keys is pressed.  Is this by design or a bug?

Pavel
Telerik team
 answered on 17 Jan 2011
4 answers
148 views
I'm trying to use the code below to perform a batch update in a RadGrid but I'm getting the error below.  I was able to get this to work fine in C# but now I need to get it to work in VB.net

Protected Sub gvGrossPayroll_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs)
    If e.CommandName = "UpdateAll" Then
        For Each editedItem As GridEditableItem In gv_grosspayroll.EditItems
            Dim newValues As New Hashtable()
            e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem)
            Update_PayrollRecord(editedItem.GetDataKeyValue("ID"), Convert.ToDecimal(newValues("PayrollAmount")))
        Next
    End If
    gv_grosspayroll.Rebind()
End Sub

Error:

Selection out of range
Parameter name: value

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Selection out of range
Parameter name: value

Radoslav
Telerik team
 answered on 17 Jan 2011
2 answers
534 views
Hello everyone!

I've been trying out inserting and editing with the RadGrid's edit form ("in" the Grid), and I'm very pleased with the results so far. Here's a sample of what I've achieved:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div style="width: 500px;">
        <telerik:RadGrid ID="RadGrid1" runat="server" OnInsertCommand="RadGrid1_InsertCommand"
            OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnItemCommand="RadGrid1_ItemCommand">
            <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Bottom">
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Number" DataField="Number" HeaderText="Number">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="Title" DataField="Title" HeaderText="Title">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="Description" DataField="Description" HeaderText="Description">
                    </telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                    </telerik:GridEditCommandColumn>
                </Columns>
                <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                        <table>
                            <tr>
                                <td class="textb">
                                    Number
                                </td>
                                <td>
                                    <telerik:RadNumericTextBox ID="RadNumericTextBoxNumber" runat="server" Text='<%# Bind("Number") %>'
                                        NumberFormat-DecimalDigits="0" DataType="System.Int32">
                                    </telerik:RadNumericTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="textb">
                                    Title
                                </td>
                                <td>
                                    <telerik:RadTextBox ID="RadTextBoxTitle" runat="server" MaxLength="1024" Text='<%# Bind("Title") %>'>
                                    </telerik:RadTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="textb">
                                    Description
                                </td>
                                <td>
                                    <telerik:RadTextBox ID="RadTextBoxDescription" runat="server" MaxLength="1024" TextMode="MultiLine"
                                        Text='<%# Bind("Description") %>'>
                                    </telerik:RadTextBox>
                                </td>
                            </tr>
                        </table>
                        <br />
                        <br />
                        <asp:Button CommandName="Cancel" ID="Button1" runat="server" Text="Cancel"></asp:Button>
                        <asp:Button ID="Button2" Text="OK" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
                    </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
    </div>


And the code-behind:

protected RegistrationLine DefaultRegistrationLine()
    {
        RegistrationLine dr  = new RegistrationLine();
 
        dr = new RegistrationLine();
        dr.Number = 0;
        dr.Title = "";
        dr.Description = "";
        return dr;
    }
 
    protected class RegistrationLine
    {
        public int Number { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            tempListRegistrationLines = RadGridBindStartUpData();           
        }
    }
     
    protected static List<RegistrationLine> tempListRegistrationLines;
 
    private List<RegistrationLine> RadGridBindStartUpData()
    {
        List<RegistrationLine> list = new List<RegistrationLine>();
         
        RegistrationLine rl;
         
        rl = new RegistrationLine();               
        rl.Number = 1;
        rl.Title = "A";
        rl.Description = "aaa";
        list.Add(rl);
 
        rl = new RegistrationLine();               
        rl.Number = 2;
        rl.Title = "B";
        rl.Description = "bbb";
        list.Add(rl);
 
        rl = new RegistrationLine();               
        rl.Number = 3;
        rl.Title = "C";
        rl.Description = "ccc";
        list.Add(rl);
         
        return list;
    }
 
 
    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = tempListRegistrationLines;
    }
 
    protected void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        GridEditableItem editedItem = e.Item as GridEditableItem;
 
        List<RegistrationLine> table = tempListRegistrationLines;
 
        RegistrationLine newRow = new RegistrationLine();
 
        RadTextBox rtb;      
        rtb = (RadTextBox)editedItem.FindControl("RadTextBoxTitle");
        newRow.Title = rtb.Text;
        rtb = (RadTextBox)editedItem.FindControl("RadTextBoxDescription");
        newRow.Description = rtb.Text;
 
        RadNumericTextBox number = (RadNumericTextBox)editedItem.FindControl("RadNumericTextBoxNumber");
        newRow.Number = number.Value.HasValue ? Convert.ToInt32(number.Value.Value) : 0;       
         
        table.Add(newRow);
    }
 
    protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
    {
        GridEditableItem editedItem = e.Item as GridEditableItem;
        int idx = e.Item.ItemIndex;
        
        List<RegistrationLine> table = tempListRegistrationLines;       
 
        table.RemoveAt(idx);
 
        RegistrationLine newRow = new RegistrationLine();              
 
        RadTextBox rtb;      
        rtb = (RadTextBox)editedItem.FindControl("RadTextBoxTitle");
        newRow.Title = rtb.Text;
        rtb = (RadTextBox)editedItem.FindControl("RadTextBoxDescription");
        newRow.Description = rtb.Text;
 
        RadNumericTextBox number = (RadNumericTextBox)editedItem.FindControl("RadNumericTextBoxNumber");
        newRow.Number = number.Value.HasValue ? Convert.ToInt32(number.Value.Value) : 0; 
 
        table.Insert(idx,newRow);        
    }
 
    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        string strCommand =  e.CommandName;
 
        if (strCommand == RadGrid.InitInsertCommandName)
        {
            // prepare for insert: default data
            e.Canceled = true;
            RegistrationLine rl = DefaultRegistrationLine();
            e.Item.OwnerTableView.InsertItem(rl);          
        
 
        if (strCommand == "Edit")
        {           
            GridEditFormItem editItem = e.Item as GridEditFormItem;
 
            // nothing
        }           
    }


However, I would like to have the insert form at the bottom of the Grid, instead of at the top. So my question is: is there any easy way to do this?

Thanks in advance for your suggestions.

naru
Top achievements
Rank 1
 answered on 17 Jan 2011
4 answers
85 views
may i know how to achieve the following requirement in radScheduler:
- only need to show two columns for a day as AM and PM
- want to split the column vertically than horizontally
Peter
Telerik team
 answered on 17 Jan 2011
1 answer
58 views
I am using a RadGrid and doing group by with jobstateName but when I bind the data my last stage comes first with users.
I also don't want that in my header it appears that I am grouping my data with jobstatename because i don't want it to show to the end-user. Because jobstatename appears at the top of the grid and it looks very ugly in my scenario. Any help would be really appreciated.

For example

stage4
john 
harry

stage3
some users here ...

stage2
some users here ...

stage1
some users here ...


  <telerik:RadGrid ID="gvUserJobMapping" runat="server" PageSize="10" AllowSorting="True"
            GroupingEnabled="true" AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="False"
            GridLines="None" CssClass="gridviewSpacing gvJobStates">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView Width="50%" GroupLoadMode="Client" TableLayout="Fixed">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="JobStateName" FieldAlias="JobStateName" HeaderText="Job Stages"
                                FormatString="{0:D}"></telerik:GridGroupByField>
                        </SelectFields>
<GroupByFields>
   <telerik:GridGroupByField FieldName="JobStateName" FieldAlias="JobStateName"
       HeaderText="Job Stages" SortOrder="Ascending">
   </telerik:GridGroupByField>
</GroupByFields>            
        </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <telerik:GridBoundColumn SortExpression="JobID" HeaderText="JobID" HeaderButtonType="TextButton"
                        DataField="JobID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="JobStateID" HeaderText="JobStateID" HeaderButtonType="TextButton"
                        DataField="JobStateID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="JobID" HeaderText="JobID" HeaderButtonType="TextButton"
                        DataField="JobID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="UserID" HeaderText="UserID" HeaderButtonType="TextButton"
                        DataField="UserID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="RoleID" HeaderText="RoleID" HeaderButtonType="TextButton"
                        DataField="RoleID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="UserName" HeaderText="User Name" HeaderButtonType="TextButton"
                        DataField="UserName">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSendEmail" runat="server"></asp:CheckBox>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="False"
                AllowColumnsReorder="True">
            </ClientSettings>
        </telerik:RadGrid>




Mira
Telerik team
 answered on 17 Jan 2011
3 answers
139 views
Hi,

I have a basic radmenu working fine with 3 levels of data:

Item
 - Item
   - Item
   - Item
   - Item
Item
 - Item
   - Item
   - Item
   - Item

What i want todo visually is display the top level items as normal but almost group the 2nd & 3rd levels together (within the dropdown) eg:

The dropdown would display items as:

Level 2 Level 2
Level 3 Level 3
Level 3 Level 3

Is this possible ?

Cheers

Luke
Yana
Telerik team
 answered on 17 Jan 2011
1 answer
69 views
Hi,

I am having a troublesome issue with the RadGrid in the PopUp Edit mode.  I have a RadGrid that allows users to enter data into the grid via the modal popup edit style form.  My issue is:
  1. The modal pop-up does not close/go away after the user update a record and inmediatelly shows the following message: "String was not recognized as a valid boolean" but the record was updated successfully into the database.
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="oPeriodos" AllowPaging="True" AllowSorting="True" 
            AutoGenerateColumns="False" Culture="Spanish (Mexico)" GridLines="None" Skin="Hay" PageSize="12" CellPadding="3" Width="800px" AllowAutomaticDeletes="True" ShowFooter="True"
             AllowAutomaticUpdates="true" >
        <MasterTableView DataSourceID="oPeriodos" CellPadding="3" Width="800px" DataKeyNames="OIG003_ID_BI" EditMode="PopUp">
            <Columns>
                 <telerik:GridEditCommandColumn EditText="Editar">
                      
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="OIG003_ID_BI" UniqueName="ID" HeaderText="ID" Resizable="False" Visible="false">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px" />
                    </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OIG001_Mes_ST" UniqueName="Mes" HeaderText="Mes" Resizable="False">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px" />
                    </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OIG003_Anio_IN" UniqueName="Ano" HeaderText="Año" Resizable="False">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px" />
                    </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="OIG003_Cerrado_BO" UniqueName="Cerrado" HeaderText="Cerrado" Resizable="false">
                      <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px"  HorizontalAlign="Center" VerticalAlign="Middle"/>
                </telerik:GridCheckBoxColumn>
                <telerik:GridBoundColumn DataField="OIG003_FechaCierre_DT" UniqueName="FechaCierre" HeaderText="Fecha de Apertura / Cierre" Resizable="False" DataFormatString="{0:MM/dd/yyyy hh:mm:ss}" >
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="150px" />
                    </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OSEG001_NOMBRE_ST" UniqueName="Usuario" HeaderText="Usuario" Resizable="False">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="300px" />
                    </telerik:GridBoundColumn>
                 <telerik:GridButtonColumn ConfirmText="¿Confirma la eliminación del Tipo de Cambio Seleccionado?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Eliminar" ButtonType="ImageButton" CommandName="Delete" Text="Eliminar"
                        UniqueName="DeleteColumn">
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>
  
            </Columns>
            <EditFormSettings InsertCaption="Cerrar Periodo" CaptionFormatString="Periodo: {0}"
                CaptionDataField="OIG003_ID_BI" EditFormType="Template" PopUpSettings-Modal="true">
                <FormTemplate>
                    <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0" runat="server">
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Cerrado:
                            </td>
                            <td>
                                <asp:CheckBox ID="chkCerrado" runat="server" Checked='<%# Bind("OIG003_Cerrado_BO") %>' />
                            </td>
                        </tr>
                        
                    </table>
                    <table style="width: 100%">
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="Button1" Text="Actualizar" 
                                    runat="server" CommandName="Update" CausesValidation="false" >
                                </asp:Button
                                <asp:Button ID="Button2" Text="Cancelar" runat="server" CausesValidation="False" CommandName="Cancel">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
  
            <CommandItemSettings ExportToPdfText="Export to Pdf" />
              
       
        </MasterTableView>
         <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
     </telerik:RadGrid>
Pavlina
Telerik team
 answered on 17 Jan 2011
1 answer
107 views
Hi,

I am having a troublesome issue with the RadGrid in the PopUp Edit mode.  I have a RadGrid that allows users to enter data into the grid via the modal popup edit style form.  My issue is:
  1. The modal pop-up does not close/go away after the user update a record and inmediatelly shows the following message: "String was not recognized as a valid boolean" but the record was updated successfully into the database.
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="oPeriodos" AllowPaging="True" AllowSorting="True" 
            AutoGenerateColumns="False" Culture="Spanish (Mexico)" GridLines="None" Skin="Hay" PageSize="12" CellPadding="3" Width="800px" AllowAutomaticDeletes="True" ShowFooter="True"
             AllowAutomaticUpdates="true" >
        <MasterTableView DataSourceID="oPeriodos" CellPadding="3" Width="800px" DataKeyNames="OIG003_ID_BI" EditMode="PopUp">
            <Columns>
                 <telerik:GridEditCommandColumn EditText="Editar">
                      
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="OIG003_ID_BI" UniqueName="ID" HeaderText="ID" Resizable="False" Visible="false">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px" />
                    </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OIG001_Mes_ST" UniqueName="Mes" HeaderText="Mes" Resizable="False">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px" />
                    </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OIG003_Anio_IN" UniqueName="Ano" HeaderText="Año" Resizable="False">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px" />
                    </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="OIG003_Cerrado_BO" UniqueName="Cerrado" HeaderText="Cerrado" Resizable="false">
                      <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px"  HorizontalAlign="Center" VerticalAlign="Middle"/>
                </telerik:GridCheckBoxColumn>
                <telerik:GridBoundColumn DataField="OIG003_FechaCierre_DT" UniqueName="FechaCierre" HeaderText="Fecha de Apertura / Cierre" Resizable="False" DataFormatString="{0:MM/dd/yyyy hh:mm:ss}" >
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="150px" />
                    </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OSEG001_NOMBRE_ST" UniqueName="Usuario" HeaderText="Usuario" Resizable="False">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="300px" />
                    </telerik:GridBoundColumn>
                 <telerik:GridButtonColumn ConfirmText="¿Confirma la eliminación del Tipo de Cambio Seleccionado?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Eliminar" ButtonType="ImageButton" CommandName="Delete" Text="Eliminar"
                        UniqueName="DeleteColumn">
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>
  
            </Columns>
            <EditFormSettings InsertCaption="Cerrar Periodo" CaptionFormatString="Periodo: {0}"
                CaptionDataField="OIG003_ID_BI" EditFormType="Template" PopUpSettings-Modal="true">
                <FormTemplate>
                    <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0" runat="server">
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Cerrado:
                            </td>
                            <td>
                                <asp:CheckBox ID="chkCerrado" runat="server" Checked='<%# Bind("OIG003_Cerrado_BO") %>' />
                            </td>
                        </tr>
                        
                    </table>
                    <table style="width: 100%">
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="Button1" Text="Actualizar" 
                                    runat="server" CommandName="Update" CausesValidation="false" >
                                </asp:Button
                                <asp:Button ID="Button2" Text="Cancelar" runat="server" CausesValidation="False" CommandName="Cancel">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
  
            <CommandItemSettings ExportToPdfText="Export to Pdf" />
              
       
        </MasterTableView>
         <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
     </telerik:RadGrid>
Pavlina
Telerik team
 answered on 17 Jan 2011
1 answer
98 views
Hello, with this (http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx) custom provider I can't delete and rename files. I fixed it:

public override string GetPath(string path)
{
    // First add the '~/' signs in order to use the VirtualPathUtility.GetDirectory() method ;
    /*string PathWithTilde = "~/" + path;
    string virtualPath = VirtualPathUtility.GetDirectory(PathWithTilde);
    virtualPath = virtualPath.Remove(0, 2);// remove the '~' signs
 
    return virtualPath;*/
    string virtualPath = "";
    if (Path.GetFileName(path).Length > 0)
        virtualPath = path.Replace(Path.GetFileName(path), "");
    return virtualPath;
}

It's correct?
Rumen
Telerik team
 answered on 17 Jan 2011
2 answers
184 views
Hi, I'm getting the following page error when selecting a row from RadGrid to display content in a separate pane using ajax manager. This error only appears when published to a a web server not on local development server.
----------------------------------------------------
Webpage error details
  
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; BRI/1; InfoPath.2; .NET4.0C; .NET4.0E; MALC)
Timestamp: Sat, 15 Jan 2011 23:43:05 UTC
  
  
Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
  
<!DOCTYPE html P'.
Line: 6
Char: 84093
Code: 0
URI: http://host/pro2/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1f68db6e-ab92-4c56-8744-13e09bf43565%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3aaa801ad7-53c4-4f5c-9fd3-11d99e4b92f4%3a16e4e7cd%3af7645509%3a22a6274a%3aed16cbdc%3a11a04f7e%3a24ee1bba%3af46195d3%3a1e771326%3aa7e79140%3ae524c98b%3a874f8ea2%3a19620875%3a490a9d4e%3a407acb1c%3ae330518b%3ac8618e41%3ae4f8f289%3a58366029%3a7165f74%3a86526ba7%3abd8f85e4

 

Mark
Top achievements
Rank 1
 answered on 17 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?