I'm trying to present a boolean column from a MySql table graphically with a GridImageColumn. I added a the GridImageColumn (myauth) and set it to emulate the boolean column (authorized). (myauth) GroupByExpression="Group By authorized" and SortExpression="authorized".
This works well, I can click on the (myauth) column header to change the sorting of the column, and I can drag the (myauth) column header to the group panel and group records. If however I try to click the sort icon on the (myauth) button added to the group panel, then the button is reduced to just a few pixels, and I loose the ability to group, ungroup, or sort by that column or any others on the grid.
This works well, I can click on the (myauth) column header to change the sorting of the column, and I can drag the (myauth) column header to the group panel and group records. If however I try to click the sort icon on the (myauth) button added to the group panel, then the button is reduced to just a few pixels, and I loose the ability to group, ungroup, or sort by that column or any others on the grid.
<%@ Page Language="Oxygene" AutoEventWireup="true" CodeBehind="Default.aspx.pas" Inherits="RadGridGroupSortTest._Default" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Devart.Data.MySql.Web, Version=5.50.79.0, Culture=neutral, PublicKeyToken=09af7300eec23701" Namespace="Devart.Data.MySql.Web" TagPrefix="cc1" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2010.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Untitled Page</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
EnableTheming
=
"True"
>
</
telerik:RadScriptManager
>
<
div
>
<
cc1:MySqlDataSource
ID
=
"MySqlDataSource1"
runat
=
"server"
ConnectionString
=
"User Id=livewire3server;Password=lw3server;Host=192.168.1.5;Database=livewire3;Persist Security Info=True;"
OldValuesParameterFormatString
=
"Original_{0}"
SelectCommand
=
"select id,sender,receiver,authorized from dummydata_testbank"
DeleteCommand
=
"DELETE FROM livewire3.dummydata_testbank WHERE ((id = :Original_id))"
InsertCommand
=
"INSERT INTO livewire3.dummydata_testbank (sender, receiver, authorized) VALUES (:sender, :receiver, :authorized)"
UpdateCommand
=
"UPDATE livewire3.dummydata_testbank SET sender = :sender, receiver = :receiver, authorized = :authorized WHERE ((id = :Original_id))"
>
<
DeleteParameters
>
<
asp:Parameter
Name
=
"Original_id"
Type
=
"String"
/>
</
DeleteParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"sender"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"receiver"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"authorized"
Type
=
"Byte"
/>
<
asp:Parameter
Name
=
"Original_id"
Type
=
"String"
/>
</
UpdateParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"sender"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"receiver"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"authorized"
Type
=
"Byte"
/>
</
InsertParameters
>
</
cc1:MySqlDataSource
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
DataSourceID
=
"MySqlDataSource1"
GridLines
=
"None"
ShowGroupPanel
=
"True"
>
<
MasterTableView
DataKeyNames
=
"id"
DataSourceID
=
"MySqlDataSource1"
>
<
RowIndicatorColumn
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"id"
HeaderText
=
"id"
ReadOnly
=
"True"
SortExpression
=
"id"
UniqueName
=
"id"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"sender"
HeaderText
=
"sender"
SortExpression
=
"sender"
UniqueName
=
"sender"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"receiver"
HeaderText
=
"receiver"
SortExpression
=
"receiver"
UniqueName
=
"receiver"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"authorized"
DataType
=
"System.Int16"
HeaderText
=
"authorized"
SortExpression
=
"authorized"
UniqueName
=
"authorized"
>
</
telerik:GridBoundColumn
>
<
telerik:GridImageColumn
GroupByExpression
=
"Group By authorized"
HeaderText
=
"myauth"
SortExpression
=
"authorized"
UniqueName
=
"myauth"
>
</
telerik:GridImageColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowDragToGroup
=
"True"
>
</
ClientSettings
>
</
telerik:RadGrid
>
</
div
>
</
form
>
</
body
>
</
html
>