SmartGWT version: SmartClient Version: v10.1p_2016-08-05/PowerEdition Deployment (built 2016-08-05)
Browsers: Firefox 50.0.2, IE 11, Chrome 54.0.2840.99
Issue:
I have a list grid containing a column that is a text value. The text value may be null.
When sorting by that column, I expect that sorting should either have null values go to the top or to the bottom.
The actual behaviour is that null values are sorted between alpha strings.
Sample:
UI Code:
The canvas item is set on a DynamicForm.
DataSource XML:
DataSource fetch response:
As seen in the attached image, sorting by email comment sorts the null value between t and x.
Browsers: Firefox 50.0.2, IE 11, Chrome 54.0.2840.99
Issue:
I have a list grid containing a column that is a text value. The text value may be null.
When sorting by that column, I expect that sorting should either have null values go to the top or to the bottom.
The actual behaviour is that null values are sorted between alpha strings.
Sample:
UI Code:
Code:
CanvasItem canvasItem = new CanvasItem();
ListGrid emailListGrid = new ListGrid();
emailListGrid.setDataSource( DataSource.get( "email_address" ) );
emailListGrid.setAutoFetchData( true );
canvasItem.setCanvas( emailListGrid );
DataSource XML:
Code:
<DataSource
tableName="email_address"
ID="email_address"
dataSourceVersion="1"
serverType="sql"
>
<fields>
<field primaryKey="true" name="email_id" type="sequence" sequenceName="s_email_address" hidden="true"></field>
<field name="email_address_name" type="ntext" length="128" required="true"/>
<field name="email_address" type="ntext" required="true" />
<field name="email_comment" type="ntext" length="255" />
</fields>
<operationBindings>
<operationBinding operationType="fetch">
</operationBinding>
<operationBinding operationType="add">
</operationBinding>
<operationBinding operationType="update">
</operationBinding>
<operationBinding operationType="remove">
</operationBinding>
</operationBindings>
</DataSource>
Code:
{
affectedRows:0,
data:[
{
email_id:1,
email_address:"c@c",
email_address_name:"c",
rowID:1
},
{
email_id:2,
email_address:"a@a",
email_address_name:"a",
email_comment:"t",
rowID:2
},
{
email_id:3,
email_address:"b@b",
email_address_name:"b",
email_comment:"x",
rowID:3
}
],
endRow:3,
invalidateCache:false,
isDSResponse:true,
operationType:"fetch",
queueStatus:0,
startRow:0,
status:0,
totalRows:3
}
Comment