Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
157 views
I have other project ,It can get "FilterExpression"

code below
=========================================================================================================================
<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeBehind="AdventureWork.aspx.cs" Inherits="Simple.RadGridSortAndPaging.Views.AdventureWork" EnableViewState="false" ViewStateMode="Disabled" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
    <title></title>
</head>
<body>
    <script type="text/javascript">
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) {
                args.set_enableAjax(false);
            }
        }
    </script>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>

        <%--<telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />--%>
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" LoadingPanelID="RadAjaxLoadingPanel1">
        </telerik:RadAjaxPanel>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <%--<ClientEvents OnRequestStart="onRequestStart" />--%>
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <%--<telerik:RadFormDecorator runat="server" DecorationZoneID="demo" EnableRoundedCorners="false" DecoratedControls="All" />--%>
        <asp:ValidationSummary runat="server" ID="ValidationSummary1" />
        <div>
            <div>
                <telerik:RadGrid ID="RadGrid1" runat="server" Culture="zh-TW" Width="990px"
                    AllowCustomPaging="True"
                    AllowPaging="True"
                    PageSize="12"
                    AllowSorting="True"
                    ShowFooter="True"
                    AllowAutomaticDeletes="True"
                    AllowAutomaticInserts="True"
                    AllowAutomaticUpdates="True"
                    AutoGenerateColumns="False"
                    AllowMultiRowSelection="True"
                    AllowMultiRowEdit="true"
                    OnNeedDataSource="RadGrid1_NeedDataSource">

                    <ExportSettings ExportOnlyData="True" OpenInNewWindow="True" IgnorePaging="False">
                        <Excel Format="ExcelML"></Excel>
                    </ExportSettings>
                    <ClientSettings EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="True"></Selecting>
                    </ClientSettings>
                    <EditItemStyle Wrap="False" />
                    <FilterMenu EnableImageSprites="False"></FilterMenu>
                    <MasterTableView CommandItemDisplay="Top" GridLines="none"
                        DataKeyNames="OrderID"
                        AllowFilteringByColumn="True"
                        AllowSorting="True"
                        ShowFooter="False"
                        ItemType="Simple.RadGridSortAndPaging.Models.Orders">
                        <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False" ShowRefreshButton="False" ShowExportToExcelButton="true"></CommandItemSettings>

                        <Columns>
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" Text="Edit" HeaderText="" UniqueName="Edit" />
                            <telerik:GridTemplateColumn HeaderText="BusinessEntityID" UniqueName="BusinessEntityID"
                                DataField="BusinessEntityID" SortExpression="BusinessEntityID">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text="<%# BindItem.OrderID %>"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text="<%# BindItem.OrderID %>"></asp:Label>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>

                            <telerik:GridBoundColumn DataField="CustomerID" AutoPostBackOnFilter="True" FilterControlAltText="Filter CustomerID column" HeaderText="CustomerID" SortExpression="CustomerID" UniqueName="CustomerID">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID11" SortExpression="CustomerID" UniqueName="CustomerID11"
                                CurrentFilterFunction="Contains" AutoPostBackOnFilter="True" ShowFilterIcon="true" FilterDelay="2600" FilterControlAltText="Filter CustomerID column">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                                <HeaderStyle HorizontalAlign="Center" Width="70px"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EmployeeID" FilterControlAltText="Filter EmployeeID column" HeaderText="EmployeeID" SortExpression="EmployeeID" UniqueName="EmployeeID">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="OrderDate" DataFormatString="{0:yyyy/MM/dd}" FilterControlAltText="Filter FirstName column" HeaderText="OrderDate" SortExpression="OrderDate" UniqueName="OrderDate">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RequiredDate" DataFormatString="{0:yyyy/MM/dd}" FilterControlAltText="Filter RequiredDate column" HeaderText="MiddleName" SortExpression="RequiredDate" UniqueName="RequiredDate">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ShippedDate" DataFormatString="{0:yyyy/MM/dd}" FilterControlAltText="Filter LastName column" HeaderText="ShippedDate" SortExpression="ShippedDate" UniqueName="ShippedDate">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ShipVia" FilterControlAltText="Filter ShipVia column" HeaderText="ShipVia" SortExpression="ShipVia" UniqueName="ShipVia">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Freight" FilterControlAltText="Filter Freight column" HeaderText="Freight" SortExpression="Freight" UniqueName="Freight">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ShipName" FilterControlAltText="Filter ShipName column" HeaderText="ShipName" SortExpression="AdditionalContactInfo" UniqueName="ShipName">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ShipAddress" FilterControlAltText="Filter ShipAddress column" HeaderText="ShipAddress" SortExpression="ShipAddress" UniqueName="ShipAddress">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ShipCity" FilterControlAltText="Filter ShipCity column" HeaderText="ShipCity" SortExpression="ShipCity" UniqueName="ShipCity">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ShipRegion" FilterControlAltText="Filter ShipRegion column" HeaderText="ShipRegion" SortExpression="ShipRegion" UniqueName="ShipRegion">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ShipCountry" FilterControlAltText="Filter ShipCountry column" HeaderText="ShipCountry" SortExpression="ShipCountry" UniqueName="ShipCountry">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>

                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete" HeaderText="" UniqueName="Delete" />
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </div>
        </div>
        <br />
    </form>
</body>
</html>

=========================================================================================================================

C# Code
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    if (!e.IsFromDetailTable)
    {
        var radGrid = (RadGrid)sender;

        var where1 = RadGridHelper.GetFilterExpression(radGrid.MasterTableView, null);
        var orderBy1 = RadGridHelper.GetOrderBy(radGrid.MasterTableView);
        var filter = radGrid.MasterTableView.FilterExpression;
        var orderBy = radGrid.MasterTableView.SortExpressions.GetSortString();

        var skip = radGrid.MasterTableView.CurrentPageIndex * radGrid.MasterTableView.PageSize;
        var take = radGrid.MasterTableView.PageSize;
        var totalRowCount = 0;
        radGrid.DataSource = GetAllOrders(skip, take, orderBy, filter, out totalRowCount);

        if (e.RebindReason == GridRebindReason.InitialLoad
             || e.RebindReason == GridRebindReason.ExplicitRebind)
        {
            radGrid.VirtualItemCount = totalRowCount;
        }
    }
}
public IEnumerable<Orders> GetAllOrders(
    int startRowIndex, int maximumRows, string sortExpression, string filterExpression, out int totalRowCount)
{
    if (string.IsNullOrWhiteSpace(sortExpression))
    {
        sortExpression = "OrderID ASC";
    }
    NorthwindDbContext dbContext = new NorthwindDbContext();

    var query = dbContext.Orders.OrderBy(sortExpression);

    if (!string.IsNullOrWhiteSpace(filterExpression))
    {
        query = query.Where(filterExpression);
    }

    totalRowCount = query.Count();

    query = query.Skip(startRowIndex);
    query = query.Take(maximumRows);

    return query.AsNoTracking().ToList();
}
Maria Ilieva
Telerik team
 answered on 10 Feb 2015
12 answers
336 views
I am using .wav files to generate the audio. It works in all the popular browsers except Safari. I am using the latest version of safri and also have quicktime installed too but still it didn't work. Have anyone faced this issue earlier .  Can anyone help with this issue.
Slav
Telerik team
 answered on 10 Feb 2015
1 answer
234 views
Dear Friends,
I created RadGrid with Enabled = "false". The grid got disabled.

Now i want to enable Grid cells when Edit Button click through Javascript.

I tried Like this

<ClientEvents OnBatchEditOpened="OnBatchEditOpened" />

//Enable/Disable Grid cell
function OnBatchEditOpened(sender, args)
{   
    if(EventID=="EDIT") 
        args.get_cell().getElementsByTagName("input")[0].disabled = false;
}

but the grid and cells are not enabling.

How to Enable ? Or what is wrong in this code.

Regards,
Rajendran
Maria Ilieva
Telerik team
 answered on 10 Feb 2015
10 answers
1.9K+ views
Hi,
I am trying to set the width of a GridTemplateColumn from a stylesheet rather than in the aspx page but it doesnt seem to work.  For instance the below code works to set the GridTemplateColumn width to 30 pixels.


<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="DeleteRecord" HeaderStyle-Width="30px" >
    <ItemTemplate>
        <asp:ImageButton ID="btnDeleteRecord" runat="server" ImageUrl="../../Common/Images/Icons/small/delete.gif" CommandName="DeleteRecord" CssClass="CursorHand"/>
    </ItemTemplate>
</telerik:GridTemplateColumn>

However, The following code does not:
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="DeleteRecord" HeaderStyle-CssClass="commandHeader" >
    <ItemTemplate>
        <asp:ImageButton ID="btnDeleteRecord" runat="server" ImageUrl="../../Common/Images/Icons/small/delete.gif" CommandName="DeleteRecord" CssClass="CursorHand"/>
    </ItemTemplate>
</telerik:GridTemplateColumn>

.commandHeader
{
    width:30px;
}


Is there a way around this problem? Or am i doing something wrong?

Thanks,
Michael
Pavlina
Telerik team
 answered on 10 Feb 2015
5 answers
613 views
Hi
I have a radgrid in which , I want to set the back color of a cell in every row of  one column . I need to compare the value of the cell in this column in every row of the grid and if its not the same value as the previous row cell value , I had to set different color . For example the column name is datayear , and the first row of the grid has 2013 as the second row has 2012 and so on in that cell . some time the same cell value will be repeated . so I have to compare each row cell value and set the color of the cell how can I achieve this asp.net.vb
thanks for your help
Rajeswari raman
​
Eyup
Telerik team
 answered on 10 Feb 2015
1 answer
230 views
My grid has a template column that contains a radtextbox.  On postback, I want to obtain the value within each radtextbox but it is always returning blank values.  I have the radtextbox in the ItemTemplate, not the EditItemTemplate.  Do I need to do this from an EditItemTemplate and place every row in EditMode?  

Note that the function of the grid is a questionnaire so we want every textbox to be available when the page loads.  We don't want any edit/update links.  

<telerik:RadGrid ID="gvwTextQuestions" runat="server" Width="950px" AutoGenerateColumns="False" DataSourceID="sqlQuestions">
               <MasterTableView EditMode="InPlace" DataKeyNames="QuestionID" CommandItemDisplay="Top" DataSourceID="sqlQuestions">
                   <CommandItemTemplate>
                       <div style="padding-top: 10px; padding-bottom: 10px; padding-left: 10px;">
                           <asp:Label ID="lblHeader" runat="server" Text=""></asp:Label>
                       </div>
                   </CommandItemTemplate>
                   <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False"></CommandItemSettings>
                   <Columns>
                       <telerik:GridBoundColumn DataField="QuestionID" Visible="False" UniqueName="QuestionID" FilterControlAltText="Filter QuestionID column"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn FilterControlAltText="Filter QuestionNumber column" UniqueName="QuestionNumber" DataField="QuestionNumber">
                           <ItemStyle HorizontalAlign="Center" />
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Question" UniqueName="Question" FilterControlAltText="Filter Question column"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Required" FilterControlAltText="Filter Required column" UniqueName="Required" Visible="False">
                       </telerik:GridBoundColumn>
                       <telerik:GridTemplateColumn FilterControlAltText="Filter ResponseText column" UniqueName="ResponseText">
                           <ItemTemplate>
                               <telerik:RadTextBox ID="txtResponseText" Runat="server" Columns="90" Rows="6" TextMode="MultiLine" Width="700px">
                               </telerik:RadTextBox>
                           </ItemTemplate>
                           <ItemStyle HorizontalAlign="Left" />
                       </telerik:GridTemplateColumn>
                   </Columns>
               </MasterTableView>
           </telerik:RadGrid>
Eyup
Telerik team
 answered on 10 Feb 2015
27 answers
2.5K+ views
I'm working on creating an asp.net user control that contains a RadGrid.  Within the user control I want to define the columns in the RadGrid at runtime.  When the grid loads, if the page is not a postback, I generate and add the required columns to the grid.  So far this works as expected.  When the page displays the appropriate columns are visible.  However, when a postback occurs (paging, sorting, etc...) some of the column structure is lost.  For example, when I click on one of the column headers to sort the column, a postback occurs and when the page refreshes on the screen the column header text for every column is blank and the data is not sorted.  Another issue is that when I click the next page button, the postback occurs, the page changes but again the header text for every column is missing and the data in each cell shows "System.Data.DataRowView".  In some of my debugging I've found that when the page posts back on a page index change, each of the GridBoundColumn objects in the grid have lost their DataField property value and the HeaderText property value.  They do however keep their UniqueName property value.

Am I missing somthing to insure that these columns maintain their state upon postback?
Eyup
Telerik team
 answered on 10 Feb 2015
1 answer
214 views
Hello Team,

We are using Rad grid with Form template  edit form, we need to place Radio button list with 2 options "Male" and "Female" for gender inside FormTemplate.

Please find Error below:
 
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: 'rbtGender' has a SelectedValue which is invalid because it does not exist in the list of items.<br>Parameter name: value


Code below:
<telerik:RadGrid ID="rgDemoRestrictedTests" runat="server" CssClass="RadGrid" GridLines="None" AllowPaging="True" PageSize="20" AllowSorting="True"
                                                      AutoGenerateColumns="false" ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                                                      DataSourceID="DemoRestrictedTestsSource" OnItemDeleted="rgDemoRestrictedTests_ItemDeleted" OnItemInserted="rgDemoRestrictedTests_ItemInserted"
                                                      OnItemUpdated="rgDemoRestrictedTests_ItemUpdated" OnItemCommand="rgDemoRestrictedTests_ItemCommand">
                                                      <MasterTableView CommandItemDisplay="Bottom" DataSourceID="DemoRestrictedTestsSource" DataKeyNames="TestID">
                                                          <Columns>
                                                              <telerik:GridBoundColumn UniqueName="TestID" HeaderText="TestID" DataField="TestID">
                                                              </telerik:GridBoundColumn>
                                                              <telerik:GridBoundColumn UniqueName="Gender" HeaderText="Gender" DataField="Gender">
                                                              </telerik:GridBoundColumn>                                                          
                                                              <telerik:GridEditCommandColumn HeaderText="Edit">
                                                              </telerik:GridEditCommandColumn>
                                                              <telerik:GridButtonColumn CommandName="Delete" Text="Delete" HeaderText="Delete">
                                                              </telerik:GridButtonColumn>
                                                          </Columns>
                                                          <EditFormSettings EditFormType="Template">
                                                              <FormTemplate>
                                                                  <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                                                                      style="border-collapse: collapse;">
                                                                      <tr>
                                                                          <td>
                                                                              <table id="Table3" width="450px" border="0" class="module">
                                                                                  <tr>
                                                                                      <td style="text-align: center;">TestID :
                                                                                      </td>
                                                                                      <td>
                                                                                          <asp:DropDownList ID="rddlTestID" runat="server" SelectedValue='<%#  Bind("TestID")  %>'
                                                                                              DataSourceID="rddlTestIDSource" DataTextField="TestID" DataValueField="TestID" AppendDataBoundItems="True">
                                                                                              <asp:ListItem Selected="True" Text="Select" Value="">
                                                                                              </asp:ListItem>
                                                                                          </asp:DropDownList>
 
                                                                                      </td>
                                                                                  </tr>
                                                                                  <tr>
                                                                                      <td style="text-align: center;">Gender :
                                                                                      </td>
                                                                                      <td>
                                                                                          <asp:RadioButtonList runat="server" ID="rbtGender" RepeatDirection="Horizontal" DataValueField="Gender" SelectedValue='<%#  Bind("Gender") %>'>
                                                                                              <asp:ListItem Text="Male" Value="Male" Selected="True"></asp:ListItem>
                                                                                              <asp:ListItem Text="Female" Value="Female"></asp:ListItem>
                                                                                          </asp:RadioButtonList>
                                                                                      </td>
                                                                                  </tr>                                                                                 
 
                                                                              </table>
                                                                          </td>
                                                                      </tr>
                                                                      <tr>
                                                                          <td colspan="2"></td>
                                                                      </tr>
                                                                      <tr>
                                                                          <td></td>
                                                                          <td></td>
                                                                      </tr>
                                                                      <tr>
                                                                          <td align="rifht" colspan="2">
                                                                              <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                                  runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button
                                                                       <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                                          </td>
                                                                      </tr>
                                                                  </table>
                                                              </FormTemplate>
                                                          </EditFormSettings>
                                                      </MasterTableView>                                                     
                                                  </telerik:RadGrid>
                                              </telerik:RadPageView>
<asp:SqlDataSource runat="server" ID="DemoRestrictedTestsSource" ConnectionString="x" ProviderName="System.Data.SqlClient"
                                          SelectCommand="Select [TestID], (case when [Gender] = 0 then 'Male' else 'Female' end) as [Gender] From [TestUtil_DemoRestrictedTests]"
                                          InsertCommand="Insert Into [TestUtil_DemoRestrictedTests] Values ('@TestID', (case when @Gender = 'Male' then 1 else 0 end))"
                                          UpdateCommand="Update [TestUtil_DemoRestrictedTests] Set [Gender] = (case when @Gender = 'Male' then 0 else 1 end) Where [TestID] = @TestID"
                                          DeleteCommand="DELETE FROM [TestUtil_DemoRestrictedTests] WHERE [TestID] = @TestID">
                                          <InsertParameters>
                                              <asp:Parameter Name="TestID" Type="String" />
                                              <asp:Parameter Name="Gender" Type="String" />                                             
                                          </InsertParameters>
                                          <UpdateParameters>
                                              <asp:Parameter Name="Gender" Type="string" />                                           
                                              <asp:Parameter Name="TestID" Type="String" />
                                          </UpdateParameters>
                                          <DeleteParameters>
                                              <asp:Parameter Name="TestID" Type="String" />
                                          </DeleteParameters>
                                      </asp:SqlDataSource>


Can anyone help me out with this error?

Thanks in advance.

Regards,
Ruchi Patel
Eyup
Telerik team
 answered on 10 Feb 2015
1 answer
1.2K+ views
Hi

How to use custom filter in telerik radgrid  using C# Code no need svc and Datasource 

Eyup
Telerik team
 answered on 10 Feb 2015
1 answer
152 views
The following problem happens when using IE11. I haven't been able to recreate the issue with Firefox and Chrome. 

1. Use the Editor demo page and the HTML below. 
2. Switch to design mode and right click either table...select table properties.

The version on your demo page currently places the edited table inside the table below it. I'm currently using version 2014.2.724.45...for me it deletes the table when the Table Properties dialog is closed. 

This doesn't happen with all tables...and for the most part editing tables works as expected in IE11. The HTML below is an example of what can cause the problem.

<table style="width: 746px; height: 274px;">
    <tbody>
        <tr>
            <td style="text-align: center; vertical-align: top;">

                <a href="#0" tabindex="-1">
                    <img alt="" style="border-width: 3px; border-style: solid; margin-right: 0px; vertical-align: top;" src="0.jpg" />
                </a>
                <br />
                Number 0<br />
                Title
            </td>

            <td style="text-align: center; vertical-align: top;"><a href="#1" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; margin-right: 0px; vertical-align: top;" src="1.jpg" /></a><br />
                Number 1<br />
                Title </td>
            <td style="text-align: center; vertical-align: top;"><a href="#2" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; margin-right: 0px; vertical-align: top;" src="2.jpg" /></a><br />
                Number 2<br />
               Title</td>
            <td style="text-align: center; vertical-align: top;"><a href="#3" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; margin-right: 0px; vertical-align: top;" src="3.jpg" /></a><br />
                Number 3<br />
                Title</td>
            <td style="text-align: center; vertical-align: top;"><a href="#4" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; margin-right: 0px; vertical-align: top;" src="4.jpg" /></a><br />
                Number 4<br />
                Title</td>
            <td style="text-align: center; vertical-align: top;"><a href="#5" tabindex="-1" target="_self">
                <img alt="" style="border-width: 3px; border-style: solid; width: 125px; height: 175px; margin-left: 0px; vertical-align: top;" src="5.jpg" /></a><br />
                Number 5<br />
        </tr>
    </tbody>
</table>
<hr />
<table style="width: 695px; height: 726px;">
    <tbody>
        <tr>
            <td style="text-align: center; vertical-align: top;"><a href="#10" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; vertical-align: top;" src="10.jpg" /></a>10<br />
                Number 10<br />
                Title 2</td>
            <td style="text-align: center; vertical-align: top;"><a href="#11" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; vertical-align: top;" src="11.jpg" /></a>11<br />
                Number 11<br />
                Title 2</td>
            <td style="text-align: center; vertical-align: top;"><a href="#12" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; vertical-align: top;" src="12.jpg" /></a>12<br />
                Number 12
                <br />
                Title 2</td>
            <td style="text-align: center; vertical-align: top;"><a href="#13" tabindex="-1" target="_self">
                <img alt="" style="border-width: 3px; border-style: solid; vertical-align: top;" src="13.jpg" /></a>13<br />
                 Number 13 <br />
               Title2 </td>
            <td style="text-align: center; vertical-align: top;"><a href="#14" tabindex="-1">
                <img alt="" style="border-width: 3px; border-style: solid; vertical-align: top;" src="14.jpg" /></a><br />
                Number 14<br />
                Title 2
                <br />
                Title</td>
            <td style="text-align: center; vertical-align: top;">
                <img alt="" style="border-width: 3px; border-style: solid; width: 125px; height: 176px; vertical-align: top;" src="15.JPG" /><br />
                Number 15<br />
                Title</td>
        </tr>

    </tbody>
</table>

Ianko
Telerik team
 answered on 10 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?