This is a migrated thread and some comments may be shown as answers.

Batch mode Issue.

3 Answers 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 27 Nov 2013, 11:58 AM
Batch mode is really very useful.We love it so much althrough it has many limits.
The grid enables scrolling.when I apply batch mode in the Detail tables ,it works fine.we can scroll horizontally and vertically.
Unfortunately,after I apply batch mode in both Master and Detail table, the grid seems like applying the UseStaticHeaders property.Scroll bars are disappared.I think you guys konwing what I'm talking about. 
I wish some could help me ,otherwise I will not use the batch mode any more.
Here is the key settings.
thx in advance.
 
        <ClientSettings>
            <Scrolling AllowScroll="True" ScrollHeight="600px" UseStaticHeaders="false" />
        </ClientSettings>
 
<MasterTableView DataKeyNames="Id,OrderId,SourceAreaId" EditMode="Batch" CommandItemDisplay="Top">
 
<telerik:GridTableView runat="server" Name="OrderDetailsOfArea" EditMode="Batch" CommandItemDisplay="Bottom" DataKeyNames="Id" >

3 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 02 Dec 2013, 11:23 AM
Hello Will,

We have not been contacted for such a problem so far. The behavior seems quite strange and I would like to ask you to send us the markup and code-behind of the problematic page so we could investigate further. Additionally note that I tried reproducing the issue in an isolated sample but was unable to do so. As you can see from the attached website the scroll bar appears as expected. Could you please tell us what are the differences between the test sample and your project? Also please ensure that a JavaScript error is not present on the page.

Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Will
Top achievements
Rank 1
answered on 21 Dec 2013, 05:06 AM

I'v done a little modification on the demo you sent to me.you can see there is not horizontal scroll bar while it should have.

A picture attached shows the problem.In the picture we can see, the column name didn't fully showed which means it's squeezed.

I was woundering whether the scrolling bar could be available for the master view not noly for the grid.you can see my requirement in the second picture.

Because I can't upload the modified website you attached in the post.so I paste the code of  default.aspx below.

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
    Inherits="_Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
<html>
<head>
    <title>Test</title>
    <script type="text/javascript">
    </script>
</head>
<body>
    <form id="Form1" runat="server">
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server"
            ShowStatusBar="True" PageSize="30" AllowSorting="True"
            AllowPaging="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True" CellSpacing="0" GridLines="None">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="ProductID"
                EditMode="Batch" CommandItemDisplay="Top" AutoGenerateColumns="False">
                <DetailTables>
                    <telerik:GridTableView DataSourceID="SqlDataSource2" EditMode="Batch" CommandItemDisplay="Bottom" DataKeyNames="OrderID"
                        runat="server" Name="Orders">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="CustomerID" MasterKeyField="CustomerID"></telerik:GridRelationFields>
                        </ParentTableRelation>
 
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">
                                <HeaderStyle Width="20px"></HeaderStyle>
                                <ItemStyle CssClass="MyImageButton"></ItemStyle>
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn SortExpression="OrderID" HeaderText="OrderID" HeaderButtonType="TextButton"
                                DataField="OrderID" UniqueName="OrderID" ReadOnly="true">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="OrderDate" HeaderText="Date Ordered" HeaderButtonType="TextButton"
                                DataField="OrderDate" UniqueName="OrderDate">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="RequiredDate" HeaderText="RequiredDate"
                                HeaderButtonType="TextButton" DataField="RequiredDate" UniqueName="RequiredDate">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="EmployeeID" HeaderText="EmployeeID" HeaderButtonType="TextButton"
                                DataField="EmployeeID" UniqueName="EmployeeID">
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn ConfirmText="Delete these details record?" ButtonType="ImageButton"
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2">
                                <HeaderStyle Width="20px"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                            </telerik:GridButtonColumn>
                        </Columns>
                        <SortExpressions>
                            <telerik:GridSortExpression FieldName="OrderDate"></telerik:GridSortExpression>
                        </SortExpressions>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
 
<BatchEditingSettings EditType="Cell"></BatchEditingSettings>
 
<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                    </telerik:GridTableView>
                </DetailTables>
 
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn SortExpression="ProductID" HeaderText="ProductID"
                        DataField="ProductID" UniqueName="ProductID" DataType="System.Int32"
                        FilterControlAltText="Filter ProductID column" ReadOnly="True">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ProductName" HeaderText="ProductName"
                        DataField="ProductName" UniqueName="ProductName"
                        FilterControlAltText="Filter ProductName column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="SupplierID" HeaderText="SupplierID"
                        DataField="SupplierID" UniqueName="SupplierID" DataType="System.Int32"
                        FilterControlAltText="Filter SupplierID column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="CategoryID" HeaderText="CategoryID"
                        DataField="CategoryID" UniqueName="CategoryID" DataType="System.Int32"
                        FilterControlAltText="Filter CategoryID column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QuantityPerUnit"
                        FilterControlAltText="Filter QuantityPerUnit column"
                        HeaderText="QuantityPerUnit" SortExpression="QuantityPerUnit"
                        UniqueName="QuantityPerUnit">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal"
                        FilterControlAltText="Filter UnitPrice column" HeaderText="UnitPrice"
                        SortExpression="UnitPrice" UniqueName="UnitPrice">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16"
                        FilterControlAltText="Filter UnitsInStock column" HeaderText="UnitsInStock"
                        SortExpression="UnitsInStock" UniqueName="UnitsInStock">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsOnOrder" DataType="System.Int16"
                        FilterControlAltText="Filter UnitsOnOrder column" HeaderText="UnitsOnOrder"
                        SortExpression="UnitsOnOrder" UniqueName="UnitsOnOrder">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReorderLevel" DataType="System.Int16"
                        FilterControlAltText="Filter ReorderLevel column" HeaderText="ReorderLevel"
                        SortExpression="ReorderLevel" UniqueName="ReorderLevel">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="Discontinued" DataType="System.Boolean"
                        FilterControlAltText="Filter Discontinued column" HeaderText="Discontinued"
                        SortExpression="Discontinued" UniqueName="Discontinued">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="CategoryName"
                        FilterControlAltText="Filter CategoryName column" HeaderText="CategoryName"
                        SortExpression="CategoryName" UniqueName="CategoryName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ProductID" HeaderText="ProductID"
                        DataField="ProductID" UniqueName="ProductID1" DataType="System.Int32"
                        FilterControlAltText="Filter ProductID column" ReadOnly="True">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ProductName" HeaderText="ProductName"
                        DataField="ProductName" UniqueName="ProductName1"
                        FilterControlAltText="Filter ProductName column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="SupplierID" HeaderText="SupplierID"
                        DataField="SupplierID" UniqueName="SupplierID1" DataType="System.Int32"
                        FilterControlAltText="Filter SupplierID column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="CategoryID" HeaderText="CategoryID"
                        DataField="CategoryID" UniqueName="CategoryID1" DataType="System.Int32"
                        FilterControlAltText="Filter CategoryID column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QuantityPerUnit"
                        FilterControlAltText="Filter QuantityPerUnit column"
                        HeaderText="QuantityPerUnit" SortExpression="QuantityPerUnit"
                        UniqueName="QuantityPerUnit1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal"
                        FilterControlAltText="Filter UnitPrice column" HeaderText="UnitPrice"
                        SortExpression="UnitPrice" UniqueName="UnitPrice1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16"
                        FilterControlAltText="Filter UnitsInStock column" HeaderText="UnitsInStock"
                        SortExpression="UnitsInStock" UniqueName="UnitsInStock1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsOnOrder" DataType="System.Int16"
                        FilterControlAltText="Filter UnitsOnOrder column" HeaderText="UnitsOnOrder"
                        SortExpression="UnitsOnOrder" UniqueName="UnitsOnOrder1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReorderLevel" DataType="System.Int16"
                        FilterControlAltText="Filter ReorderLevel column" HeaderText="ReorderLevel"
                        SortExpression="ReorderLevel" UniqueName="ReorderLevel1">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="Discontinued" DataType="System.Boolean"
                        FilterControlAltText="Filter Discontinued column" HeaderText="Discontinued"
                        SortExpression="Discontinued" UniqueName="Discontinued1">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="CategoryName"
                        FilterControlAltText="Filter CategoryName column" HeaderText="CategoryName"
                        SortExpression="CategoryName" UniqueName="CategoryName1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ProductID" HeaderText="ProductID"
                        DataField="ProductID" UniqueName="ProductID2" DataType="System.Int32"
                        FilterControlAltText="Filter ProductID column" ReadOnly="True">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ProductName" HeaderText="ProductName"
                        DataField="ProductName" UniqueName="ProductName2"
                        FilterControlAltText="Filter ProductName column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="SupplierID" HeaderText="SupplierID"
                        DataField="SupplierID" UniqueName="SupplierID2" DataType="System.Int32"
                        FilterControlAltText="Filter SupplierID column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="CategoryID" HeaderText="CategoryID"
                        DataField="CategoryID" UniqueName="CategoryID2" DataType="System.Int32"
                        FilterControlAltText="Filter CategoryID column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QuantityPerUnit"
                        FilterControlAltText="Filter QuantityPerUnit column"
                        HeaderText="QuantityPerUnit" SortExpression="QuantityPerUnit"
                        UniqueName="QuantityPerUnit2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal"
                        FilterControlAltText="Filter UnitPrice column" HeaderText="UnitPrice"
                        SortExpression="UnitPrice" UniqueName="UnitPrice2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16"
                        FilterControlAltText="Filter UnitsInStock column" HeaderText="UnitsInStock"
                        SortExpression="UnitsInStock" UniqueName="UnitsInStock2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsOnOrder" DataType="System.Int16"
                        FilterControlAltText="Filter UnitsOnOrder column" HeaderText="UnitsOnOrder"
                        SortExpression="UnitsOnOrder" UniqueName="UnitsOnOrder2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReorderLevel" DataType="System.Int16"
                        FilterControlAltText="Filter ReorderLevel column" HeaderText="ReorderLevel"
                        SortExpression="ReorderLevel" UniqueName="ReorderLevel2">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="Discontinued" DataType="System.Boolean"
                        FilterControlAltText="Filter Discontinued column" HeaderText="Discontinued"
                        SortExpression="Discontinued" UniqueName="Discontinued2">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="CategoryName"
                        FilterControlAltText="Filter CategoryName column" HeaderText="CategoryName"
                        SortExpression="CategoryName" UniqueName="CategoryName2">
                    </telerik:GridBoundColumn>
                </Columns>
 
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
</EditFormSettings>
 
<BatchEditingSettings EditType="Cell"></BatchEditingSettings>
 
<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
            </MasterTableView>
<ExportSettings>
<Pdf>
<PageHeader>
<LeftCell Text=""></LeftCell>
 
<MiddleCell Text=""></MiddleCell>
 
<RightCell Text=""></RightCell>
</PageHeader>
 
<PageFooter>
<LeftCell Text=""></LeftCell>
 
<MiddleCell Text=""></MiddleCell>
 
<RightCell Text=""></RightCell>
</PageFooter>
</Pdf>
</ExportSettings>
 
            <ClientSettings>
                <Scrolling AllowScroll="True" ScrollHeight="600px" UseStaticHeaders="false" />
            </ClientSettings>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString35 %>"
            SelectCommand="SELECT * FROM [Alphabetical list of products]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
            ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString35 %>"
            DeleteCommand="DELETE FROM [Orders] WHERE [OrderID] = @OrderID"
            InsertCommand="INSERT INTO [Orders] ([CustomerID], [EmployeeID], [OrderDate], [RequiredDate]) VALUES (@CustomerID, @EmployeeID, @OrderDate, @RequiredDate)"
            SelectCommand="SELECT * FROM [Orders] WHERE [CustomerID] = @CustomerID"
            UpdateCommand="UPDATE [Orders] SET [EmployeeID] = @EmployeeID, [OrderDate] = @OrderDate, [RequiredDate] = @RequiredDate WHERE [OrderID] = @OrderID">
            <SelectParameters>
                <asp:Parameter Name="CustomerID" Type="String"></asp:Parameter>
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="OrderID" Type="Int32"></asp:Parameter>
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="CustomerID" Type="String"></asp:Parameter>
                <asp:Parameter Name="EmployeeID" Type="Int32"></asp:Parameter>
                <asp:Parameter Name="OrderDate" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="RequiredDate" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="ShippedDate" Type="DateTime"></asp:Parameter>
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="EmployeeID" Type="Int32"></asp:Parameter>
                <asp:Parameter Name="OrderDate" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="RequiredDate" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="OrderID" Type="Int32"></asp:Parameter>
            </UpdateParameters>
        </asp:SqlDataSource>
        <telerik:RadGrid ID="RadGrid2" runat="server">
        </telerik:RadGrid>
    </form>
</body>
</html>


0
Vasil
Telerik team
answered on 26 Dec 2013, 09:48 AM
Hello Will,

Add these markup inside the markup of your grid. It will made the columns a bit wider, and the scroll should appear.
<HeaderStyle Width="100px"></HeaderStyle>

Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Will
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Will
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or