I see there is a property for when there is "no data", you can add some text for empty rows, but if there are no columns defined, can you apply the same text that you use in empty rows to display when the table is empty.
Paul
Hi Pavel,
Please see my response below:
I want to be able to display text when there are no visible rows or columns.
- I think this is just what my sample does and did not understand why it wouldn't work for you - the grid loaded has no visible rows or columns and the empty rows template is rendered inside the grid placeholder. Please explain if I have misunderstood you.
Still you can handle any scenario in code behind and raise exception as this sample, then that exception would load the error template.
In the end, you are defining columns. I am talking about if you have a placeholder for a datagrid and when a user selects a source for the columns, it would load the columns in the datagrid and then at that point, it shows the "no rows" template. I want to be able to display text when there are no visible rows or columns.
Basically if you have an empty rows template and if the dataSource is for example a table with zero rows and no columns are defined for the grid this should work. Please see my attached sample for example of this.
There is also the possibility to raise exception in certain scenarios and use the error template, as demonstrated at http://es.infragistics.com/samples/aspnet/data-grid/error-and-empty-data-row-template