Hi Folks,
Loading a select (or any element) from the server in the add row modal we would like to identify an empty select and replace it with text.
For our purposes an empty select from the server is a normal condition if there are no rows to be inserted.
Currently when the select is empty from the server the client shows an empty select element.
We would like to replace the empty select element with a span containing text, something like ‘<SPAN>No Rows Available to Insert</SPAN>’ instead of <SELECT></SELECT>.
We have tried on the server side when the query is empty instead of sending <SELECT></SELECT> we changed the response to <SPAN>No Rows Available to Insert</SPAN> and that does not change the client empty select element to text.
On the client side in Add Row in beforeShowForm we tried this:
Where the colModel field is “pName”
beforeShowForm: function( frm ) {
alert( $(“#tr_pName td.DataTD”).html() ); //shows the contents of the TD
alert ( $(‘#pName’).find(‘option’).length ); //always returns 0.
}
Conditionally when the select length is 0 we would change to the td.DataTD html to span with text.
Also what is the frm object layout, what fields, methods etc?
Thanks
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top