There seems to be issues with using a formtemplate (in EditColumn) - particularly with DropDownLists - with the AllowMultiRowSelection. Selecting items in the dropdownlist select rows underneath the row being edited. Also clicking within form template draws the selection box (used for drag selecting multiple rows).
Is there a way of turning off the click and drag selection of multiple rows and only allowing shift-click or ctrl-click selection?
This is version 5.1.2.0. Below is the markup:
<rad:RadGrid ID="RadGrid1" EnableLinqExpressions="true" Skin="Vista" runat="server"
GridLines="None" AutoGenerateColumns="False" OnEditCommand="RadGrid1_EditCommand"
OnItemDataBound="RadGrid1_ItemDataBound" OnItemUpdated="RadGrid1_ItemUpdated"
OnUpdateCommand="RadGrid1_UpdateCommand" OnCancelCommand="RadGrid1_CancelCommand"
EnableAJAX="True" OnDeleteCommand="RadGrid1_DeleteCommand" AllowMultiRowSelection="true">
<PagerStyle Mode="NextPrevAndNumeric"/>
<MasterTableView TableLayout="Fixed" EditMode="EditForms">
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<rad:GridEditCommandColumn EditText="Edit" CancelText="Cancel" HeaderStyle-Width="40px"
ItemStyle-ForeColor="Blue">
</rad:GridEditCommandColumn>
<rad:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
ConfirmText="Delete this print job?" HeaderStyle-Width="40px" ItemStyle-ForeColor="Red" />
<rad:GridBoundColumn DataField="TimeStamp" SortExpression="TimeStamp" HeaderText="Date"
HeaderStyle-Width="130px">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DocumentName" SortExpression="DocumentName" HeaderText="Document">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="FileName" Visible="false">
</rad:GridBoundColumn>
<rad:GridTemplateColumn HeaderText="Status" HeaderStyle-Width="130px">
<ItemTemplate>
<%# StatusTxt((int)Eval("Status"))%>
</ItemTemplate>
</rad:GridTemplateColumn>
<rad:GridBoundColumn DataField="PaperSize" SortExpression="PaperSize" HeaderText="Paper"
HeaderStyle-Width="40px">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="Copies" SortExpression="Copies" HeaderText="Copies"
HeaderStyle-Width="40px">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="PageCount" SortExpression="PageCount" HeaderText="Pages"
HeaderStyle-Width="40px">
</rad:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormTemplate>
<div class="pqEditContent" style="">
<div style="float: left;">
<table style="border-collapse: collapse;" class="tableSimple">
<tr>
<th>
Job Properties
</th>
</tr>
<tr>
<td>
Time:
</td>
<td>
<%#Eval("TimeStamp") %>
</td>
</tr>
<tr>
<td>
File Name:
</td>
<td>
<asp:Literal ID="LitFN" runat="server" Text='<%#Bind("FileName") %>'></asp:Literal>
</td>
</tr>
</table>
</div>
<div style="float: left; width: 10px;">
</div>
<div style="float: left;">
<table class="tableSimple">
<tr>
<th colspan="2">
Editable Properties
</th>
</tr>
<tr>
<td>
Status:
</td>
<td>
<asp:DropDownList ID="DLStatus" runat="server">
<asp:ListItem Text="Queued" Value="0"></asp:ListItem>
<asp:ListItem Text="Queued & Retained" Value="2"></asp:ListItem>
<asp:ListItem Text="Paused" Value="1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<tr>
<td>
Document Name:
</td>
<td>
<asp:TextBox ID="TBDoc" runat="server" Text='<%#Bind("DocumentName") %>'></asp:TextBox>
</td>
</tr>
</tr>
<tr>
<td>
Paper size:
</td>
<td>
<asp:DropDownList ID="DLPaperSize" runat="server">
<asp:ListItem Value="10- by 14-inch">10- by 14-inch</asp:ListItem>
<asp:ListItem Value="A0">A0</asp:ListItem>
<asp:ListItem Value="A1">A1</asp:ListItem>
<asp:ListItem Value="A2">A2</asp:ListItem>
<asp:ListItem Value="A3">A3</asp:ListItem>
<asp:ListItem Text="A4">A4</asp:ListItem>
<asp:ListItem Value="A5">A5</asp:ListItem>
<asp:ListItem Value="A6">A6</asp:ListItem>
<asp:ListItem Value="B2">B2</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Copies:
</td>
<td>
<asp:TextBox ID="TBCopies" runat="server" Text='<%#Bind("Copies") %>' MaxLength="5"
Width="50px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Colour:
</td>
<td>
<asp:DropDownList ID="DLColour" runat="server">
<asp:ListItem Value="1" Text="Colour"></asp:ListItem>
<asp:ListItem Value="0" Text="B&W"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Duplex:
</td>
</tr>
</table>
</div>
<div style="clear: both;">
</div>
<asp:Button ID="ButUpdate" runat="server" Text="Update" CommandName="Update" />
<asp:Button ID="ButCancel" runat="server" Text="Cancel" CommandName="Cancel" />
<asp:Button ID="ButDelete" runat="server" Text="Delete" CommandName="Delete" OnClientClick="return confirm('Delete Print Job?')" />
</div>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false"
ClipCellContentOnResize="true" EnableRealTimeResize="false"></Resizing>
<Selecting AllowRowSelect="True"></Selecting>
</ClientSettings>
</rad:RadGrid>
Is there a way of turning off the click and drag selection of multiple rows and only allowing shift-click or ctrl-click selection?
This is version 5.1.2.0. Below is the markup:
<rad:RadGrid ID="RadGrid1" EnableLinqExpressions="true" Skin="Vista" runat="server"
GridLines="None" AutoGenerateColumns="False" OnEditCommand="RadGrid1_EditCommand"
OnItemDataBound="RadGrid1_ItemDataBound" OnItemUpdated="RadGrid1_ItemUpdated"
OnUpdateCommand="RadGrid1_UpdateCommand" OnCancelCommand="RadGrid1_CancelCommand"
EnableAJAX="True" OnDeleteCommand="RadGrid1_DeleteCommand" AllowMultiRowSelection="true">
<PagerStyle Mode="NextPrevAndNumeric"/>
<MasterTableView TableLayout="Fixed" EditMode="EditForms">
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<rad:GridEditCommandColumn EditText="Edit" CancelText="Cancel" HeaderStyle-Width="40px"
ItemStyle-ForeColor="Blue">
</rad:GridEditCommandColumn>
<rad:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
ConfirmText="Delete this print job?" HeaderStyle-Width="40px" ItemStyle-ForeColor="Red" />
<rad:GridBoundColumn DataField="TimeStamp" SortExpression="TimeStamp" HeaderText="Date"
HeaderStyle-Width="130px">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DocumentName" SortExpression="DocumentName" HeaderText="Document">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="FileName" Visible="false">
</rad:GridBoundColumn>
<rad:GridTemplateColumn HeaderText="Status" HeaderStyle-Width="130px">
<ItemTemplate>
<%# StatusTxt((int)Eval("Status"))%>
</ItemTemplate>
</rad:GridTemplateColumn>
<rad:GridBoundColumn DataField="PaperSize" SortExpression="PaperSize" HeaderText="Paper"
HeaderStyle-Width="40px">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="Copies" SortExpression="Copies" HeaderText="Copies"
HeaderStyle-Width="40px">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="PageCount" SortExpression="PageCount" HeaderText="Pages"
HeaderStyle-Width="40px">
</rad:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormTemplate>
<div class="pqEditContent" style="">
<div style="float: left;">
<table style="border-collapse: collapse;" class="tableSimple">
<tr>
<th>
Job Properties
</th>
</tr>
<tr>
<td>
Time:
</td>
<td>
<%#Eval("TimeStamp") %>
</td>
</tr>
<tr>
<td>
File Name:
</td>
<td>
<asp:Literal ID="LitFN" runat="server" Text='<%#Bind("FileName") %>'></asp:Literal>
</td>
</tr>
</table>
</div>
<div style="float: left; width: 10px;">
</div>
<div style="float: left;">
<table class="tableSimple">
<tr>
<th colspan="2">
Editable Properties
</th>
</tr>
<tr>
<td>
Status:
</td>
<td>
<asp:DropDownList ID="DLStatus" runat="server">
<asp:ListItem Text="Queued" Value="0"></asp:ListItem>
<asp:ListItem Text="Queued & Retained" Value="2"></asp:ListItem>
<asp:ListItem Text="Paused" Value="1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<tr>
<td>
Document Name:
</td>
<td>
<asp:TextBox ID="TBDoc" runat="server" Text='<%#Bind("DocumentName") %>'></asp:TextBox>
</td>
</tr>
</tr>
<tr>
<td>
Paper size:
</td>
<td>
<asp:DropDownList ID="DLPaperSize" runat="server">
<asp:ListItem Value="10- by 14-inch">10- by 14-inch</asp:ListItem>
<asp:ListItem Value="A0">A0</asp:ListItem>
<asp:ListItem Value="A1">A1</asp:ListItem>
<asp:ListItem Value="A2">A2</asp:ListItem>
<asp:ListItem Value="A3">A3</asp:ListItem>
<asp:ListItem Text="A4">A4</asp:ListItem>
<asp:ListItem Value="A5">A5</asp:ListItem>
<asp:ListItem Value="A6">A6</asp:ListItem>
<asp:ListItem Value="B2">B2</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Copies:
</td>
<td>
<asp:TextBox ID="TBCopies" runat="server" Text='<%#Bind("Copies") %>' MaxLength="5"
Width="50px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Colour:
</td>
<td>
<asp:DropDownList ID="DLColour" runat="server">
<asp:ListItem Value="1" Text="Colour"></asp:ListItem>
<asp:ListItem Value="0" Text="B&W"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Duplex:
</td>
</tr>
</table>
</div>
<div style="clear: both;">
</div>
<asp:Button ID="ButUpdate" runat="server" Text="Update" CommandName="Update" />
<asp:Button ID="ButCancel" runat="server" Text="Cancel" CommandName="Cancel" />
<asp:Button ID="ButDelete" runat="server" Text="Delete" CommandName="Delete" OnClientClick="return confirm('Delete Print Job?')" />
</div>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false"
ClipCellContentOnResize="true" EnableRealTimeResize="false"></Resizing>
<Selecting AllowRowSelect="True"></Selecting>
</ClientSettings>
</rad:RadGrid>