PDA

View Full Version : height of Empty row in the dropdown



AJAIN32
26 Jun 2014, 5:09 AM
Hi All,

I am trying to add a Blank text row to a dropdown.I was able to set a blank record in the store and showing it at the first index.

The problem is if i am giving blank value the height of the row is tiny(almost half of the other rows) than the other value's row.

Can anyone please help me in the issue how the height of the blank record can be equal to the height of other rows (Other Values in the drop down)?

Thanks in advance,
Ankit

Phil Guerrant
26 Jun 2014, 7:47 AM
Try using a value of ' ' as the text for your empty record

AJAIN32
26 Jun 2014, 9:30 PM
Thanks for replying,

I tried with the ' ' and its showing correct in the dropdown, but when i am selecting the Epty record its showing   in the text.

Is there anything else i need to do, so it shows Blank text after selecting also.

Thanks,
Ankit

Phil Guerrant
27 Jun 2014, 11:47 AM
maybe try customizing the tpl of the BoundList and rendering   for empty records there

see http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.view.BoundList-cfg-tpl

AJAIN32
1 Jul 2014, 1:41 AM
Thanks for replying,

I tried to implement this tpl & displayTpl. But i am not able to get it.

can you Please explain how this works, and how i can replace   with the blank value after selecting ??

Thanks,
Ankit

AJAIN32
1 Jul 2014, 2:32 AM
I have just tried with displayTpl Attribute and replaced the blank value with ''.

It is working fine now.

As i am not sure about tpl vs displayTpl, can anyone please tell me that is it right to use displayTpl or anything else that i need to take care ??

Thanks,
Ankit

skirtle
2 Jul 2014, 5:13 AM
Two possible approaches, using a non-breaking space or CSS min-height:

7a2

AJAIN32
4 Jul 2014, 12:38 AM
Thanks for replying !!

Regards,
Ankit