Dec 23, 2009, 7:20 AM
[CLOSED] Dynamically set field label in javascript
Hello,
I´ve read in the ExtJS boards, that it´s not easy to set a field label dynamically.
Does anybody have a good solution for that?
My problem...
I have a grid and a window. When I click on a grid cell,
then my window opens to edit the selected row in that grid.
I´m doing it like that:
This works fine. But now I want to change the FieldLabel of my LblPrice Label.
How can I do that?
E.g. a:
does not work and a method setFieldLabel does not exist.
So... is there a way to change the field-Label?
Regards,
Martin
I´ve read in the ExtJS boards, that it´s not easy to set a field label dynamically.
Does anybody have a good solution for that?
My problem...
I have a grid and a window. When I click on a grid cell,
then my window opens to edit the selected row in that grid.
I´m doing it like that:
var openInputWindow = function (record) {
currentRecord = record;
var window = <%= Inputwindow.ClientID %>;
if(record.data['PRICE']!=null)
{
<%=LblPrice.ClientID %>.setTitle(record.data['PRICE']);
}
else
{
<%=LblPrice.ClientID %>.setTitle('');
}
This works fine. But now I want to change the FieldLabel of my LblPrice Label.
How can I do that?
E.g. a:
<%=LblPrice.ClientID %>.fieldLabel(record.data['CURRENCY']);
does not work and a method setFieldLabel does not exist.
So... is there a way to change the field-Label?
Regards,
Martin