PDA

View Full Version : Empty column-message



Tascha
3 Aug 2009, 10:26 PM
Hello Guys!

One question.

I want to make some errorcodes, for example: If a column is empty, the message should be: "Column ist empty".
Saw some threads with this problem, but the point was there, to get an empty grid message.
So I although try it in this way, but it doesn't work. I think, this only works, if the whole grid is empty*?*



test_ListingEditorGrid = new Ext.grid.GridPanel({
id: 'test_ListingEditorGrid',
store: test_DataStore,
cm: test_ColumnModel,
plugins: expander,
frame:true,
animCollapse: true,
width:480,
height:220,
loadMask: true,
iconCls: 'icon-grid',
columnLines: true,
view: new Ext.grid.GridView({
forceFit:true,
enableRowBody:true,
ignoreAdd: true,
emptyText: 'No Record found'
}),
collapsible: true



});

Somebody could help? :)

greetings

Tascha

Tascha
3 Aug 2009, 11:27 PM
Nobody has an idea?

chesstrix
3 Aug 2009, 11:37 PM
Where exactly to you want the "Column is Empty" text to display?

Condor
3 Aug 2009, 11:41 PM
"column is empty"? Don't you mean "field is empty"?

Tascha
3 Aug 2009, 11:49 PM
In this columns you should read"empty column" or something else. It's eneough if you could it in only one column.

Tascha
3 Aug 2009, 11:51 PM
I thought, it would be the column. For example:

The query of ipv4 is empty, so I want to show it.

Tascha
4 Aug 2009, 1:31 AM
Hmm... Have I badly couched myself?

Condor
4 Aug 2009, 2:49 AM
I still don't understand what you are asking:

1. Do you want to display a text if there are no rows -> use emptyText like you already do.
2. Do you want to display a text when a field is empty -> use a renderer, e.g.

{header: 'IPv4', dataIndex: 'ipv4', renderer: function(v){
return v || '[empty]';
}}
3. Do you want to display a text when a field is empty for all rows in the grid (=column) -> why would you want that?

Tascha
4 Aug 2009, 3:20 AM
If the user gives the wrong variable (via ip-address in address-bar) to the database-query, the grid would be empty. Or rather the tables: ipv4, ipv6, datetime, etc...
And I want to inform the user, that ipv4, ipv6 etc is empty, and accordingly no table exist with the information.

I hope, you understand me now, I did my best, besides I've bad luck ;)