I create a form but always when it is rendered the text is cut (Eg: Número = N)
The Header text only returns to the correct value when I get focus from a TextEdit ( Descrição ) .
See the attached image.
[DisplayOptions(Group = "Onde", PlaceholderText = "Número", Header = "Número", Position = 0, ColumnPosition = 4)]
public string Numero
{
get { return _Numero; }
set
{
if (value != _Numero)
{
_Numero = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Numero"));
}
}
}
}
public EventoView()
{
InitializeComponent();
_evento = new Evento();
this.BindingContext = _evento;
this.dataForm.RegisterEditor(nameof(Evento.Numero), EditorType.TextEditor);
}
3 Answers, 1 is accepted
0
Hello Jean,
I have tried to reproduce this issue into a sample project with DataForm, however, without much success. Please find my test project attached to this thread. Can you download it and give it a try? What is different in your case?
Looking forward to your reply.
Regards,
Yana
Progress Telerik
I have tried to reproduce this issue into a sample project with DataForm, however, without much success. Please find my test project attached to this thread. Can you download it and give it a try? What is different in your case?
Looking forward to your reply.
Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Jean
Top achievements
Rank 1
answered on 31 Jan 2018, 11:35 AM
Hello,
attached to the model of the project
think it may be the distribution in the model
attached to the model of the project
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.XamarinForms.Common.DataAnnotations;
namespace ForFunApp.Model
{
public class Evento : INotifyPropertyChanged
{
#region <
VARIAVEIS
>
private int _Id;
private string _Descricao;
private DateTime _Data;
private TimeSpan? _Hora;
private int? _DuracaoMinutos;
private string _Logradouro;
private string _Numero;
private string _Bairro;
private int? _IdCidade;
private int? _IdUF;
private bool _Ativo;
private string _Referencia;
private int _IdCadastrador;
private DateTime _DataCadastro;
private string _Site;
private string _TelefoneInformacoes;
private string _Realizador;
private int? _NumVisualizacoes;
private int? _NumCheckins;
private int? _NumInteressados;
private bool? _Excluido;
private string _MotivoExclusao;
private int? _IdEventoInteresse;
private string _Icon;
private int? _IdCheckin;
//Não sera usado para transacao no banco, mas sim para regra de negocio.
private DateTime _NaoPersistidoHora;
#endregion
#region <
CONSTRUTORES
>
public Evento()
{
_Id = 0;
_Descricao = string.Empty;
_Data = DateTime.Parse("01/01/1900");
_Hora = null;
_DuracaoMinutos = null;
_Logradouro = string.Empty;
_Numero = string.Empty;
_Bairro = string.Empty;
_IdCidade = null;
_IdUF = null;
_Ativo = false;
_Referencia = string.Empty;
_IdCadastrador = 0;
_DataCadastro = DateTime.Parse("01/01/1900");
_Site = string.Empty;
_TelefoneInformacoes = string.Empty;
_Realizador = string.Empty;
_NumVisualizacoes = null;
_NumCheckins = null;
_NumInteressados = null;
_Excluido = null;
_MotivoExclusao = string.Empty;
_IdEventoInteresse = null;
_Icon = string.Empty;
_IdCheckin = null;
}
public Evento(int Id) : this()
{
_Id = Id;
}
public Evento(int Id, string Descricao, DateTime Data, TimeSpan? Hora, int? DuracaoMinutos, string Logradouro, string Numero, string Bairro, int? IdCidade, int? IdUF, bool Ativo, string Referencia, int IdCadastrador, DateTime DataCadastro, string Site, string TelefoneInformacoes, string Realizador, int? NumVisualizacoes, int? NumCheckins, int? NumInteressados, bool? Excluido, string MotivoExclusao, int? IdEventoInteresse, string Icon, int IdCheckin) : this()
{
_Id = Id;
_Descricao = Descricao;
_Data = Data;
_Hora = Hora;
_DuracaoMinutos = DuracaoMinutos;
_Logradouro = Logradouro;
_Numero = Numero;
_Bairro = Bairro;
_IdCidade = IdCidade;
_IdUF = IdUF;
_Ativo = Ativo;
_Referencia = Referencia;
_IdCadastrador = IdCadastrador;
_DataCadastro = DataCadastro;
_Site = Site;
_TelefoneInformacoes = TelefoneInformacoes;
_Realizador = Realizador;
_NumVisualizacoes = NumVisualizacoes;
_NumCheckins = NumCheckins;
_NumInteressados = NumInteressados;
_Excluido = Excluido;
_MotivoExclusao = MotivoExclusao;
_IdEventoInteresse = IdEventoInteresse;
_Icon = Icon;
_IdCheckin = IdCheckin;
}
#endregion
#region <
PROPRIEDADES
>
[Ignore]
public int? IdEventoInteresse
{
get { return _IdEventoInteresse; }
set
{
if (_IdEventoInteresse != value)
{
_IdEventoInteresse = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("IdEventoInteresse"));
PropertyChanged(this, new PropertyChangedEventArgs("Icon"));
PropertyChanged(this, new PropertyChangedEventArgs("IdCheckin"));
}
}
}
}
[Ignore]
public int? IdCheckin
{
get { return _IdCheckin; }
set
{
if (_IdCheckin != value)
{
_IdCheckin = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("IdEventoInteresse"));
PropertyChanged(this, new PropertyChangedEventArgs("Icon"));
PropertyChanged(this, new PropertyChangedEventArgs("IdCheckin"));
}
}
}
}
[Ignore]
public string Icon
{
get { return _Icon; }
set
{
if (_Icon != value)
{
_Icon = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("IdEventoInteresse"));
PropertyChanged(this, new PropertyChangedEventArgs("Icon"));
PropertyChanged(this, new PropertyChangedEventArgs("IdCheckin"));
}
}
}
}
[Ignore]
public int Id
{
get { return _Id; }
set { _Id = value; }
}
[DisplayOptions(PlaceholderText = "Descrição", Header = "Descrição", Position = 0, ColumnPosition = 0)]
[NonEmptyValidator("Favor informar a descrição", "OK")]
public string Descricao
{
get { return _Descricao; }
set {
if (value != _Descricao)
{
_Descricao = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Descricao"));
}
}
}
}
[DisplayOptions(Group = "Quando", PlaceholderText = "Data", Header = "Data", Position = 0, ColumnPosition = 0)]
[NonEmptyValidator("Favor informar a data", "OK")]
[DisplayValueFormat(Date = "dd-MM-yyyy")]
public DateTime Data
{
get { return _Data; }
set {
if (value != _Data)
{
_Data = value;
if (PropertyChanged != null) {
PropertyChanged(this, new PropertyChangedEventArgs("Data"));
}
}
}
}
[DisplayOptions(Group = "Quando", PlaceholderText = "Hora", Header = "Hora", Position = 0, ColumnPosition = 1)]
[NonEmptyValidator("Favor informar a Hora", "OK")]
public DateTime NaoPersistidoHora
{
get { return _NaoPersistidoHora; }
set
{
if (value != _NaoPersistidoHora)
{
_NaoPersistidoHora = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("NaoPersistidoHora"));
}
}
}
}
[Ignore]
public TimeSpan? Hora
{
get { return _Hora; }
set { _Hora = value; }
}
[Ignore]
[DisplayOptions(Group = "Quando", PlaceholderText = "Duração em minutos", Header = "Duração em minutos")]
public int? DuracaoMinutos
{
get { return _DuracaoMinutos; }
set
{
if (value != _DuracaoMinutos)
{
_DuracaoMinutos = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("DuracaoMinutos"));
}
}
}
}
[DisplayOptions(Group = "Onde", PlaceholderText = "Logradouro", Header = "Logradouro", Position = 0, ColumnSpan = 4)]
public string Logradouro
{
get { return _Logradouro; }
set
{
if (value != _Logradouro)
{
_Logradouro = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Logradouro"));
}
}
}
}
[DisplayOptions(Group = "Onde", PlaceholderText = "Número", Header = "Número", Position = 0, ColumnPosition = 4)]
public string Numero
{
get { return _Numero; }
set
{
if (value != _Numero)
{
_Numero = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Numero"));
}
}
}
}
[DisplayOptions(Group = "Onde", PlaceholderText = "Bairro", Header = "Bairro", Position = 1, ColumnSpan = 5)]
public string Bairro
{
get { return _Bairro; }
set
{
if (value != _Bairro)
{
_Bairro = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Bairro"));
}
}
}
}
[DisplayOptions(Group = "Onde", PlaceholderText = "Cidade", Header = "Cidade", Position = 2, ColumnSpan = 4)]
public int? IdCidade
{
get { return _IdCidade; }
set
{
if (value != _IdCidade)
{
_IdCidade = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("IdCidade"));
}
}
}
}
[DisplayOptions(Group = "Onde", PlaceholderText = "UF", Header = "UF", Position = 2, ColumnPosition = 4)]
public int? IdUF
{
get { return _IdUF; }
set
{
if (value != _IdUF)
{
_IdUF = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("IdUF"));
}
}
}
}
[Ignore]
public bool Ativo
{
get { return _Ativo; }
set { _Ativo = value; }
}
[DisplayOptions(Group = "Onde", PlaceholderText = "Referência", Header = "Referência", Position = 3, ColumnSpan = 5)]
public string Referencia
{
get { return _Referencia; }
set
{
if (value != _Referencia)
{
_Referencia = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Referencia"));
}
}
}
}
[Ignore]
public int IdCadastrador
{
get { return _IdCadastrador; }
set { _IdCadastrador = value; }
}
[Ignore]
public DateTime DataCadastro
{
get { return _DataCadastro; }
set { _DataCadastro = value; }
}
[DisplayOptions(PlaceholderText = "Site", Header = "Site", Position =1,ColumnPosition =0)]
public string Site
{
get { return _Site; }
set
{
if (value != _Site)
{
_Site = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Site"));
}
}
}
}
[DisplayOptions(PlaceholderText = "Contato para informações", Header = "Contato para informações", Position =2, ColumnPosition =0)]
public string TelefoneInformacoes
{
get { return _TelefoneInformacoes; }
set
{
if (value != _TelefoneInformacoes)
{
_TelefoneInformacoes = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("TelefoneInformacoes"));
}
}
}
}
[DisplayOptions(PlaceholderText = "Realizador", Header = "Realizador", Position =3, ColumnPosition =0)]
public string Realizador
{
get { return _Realizador; }
set
{
if (value != _Realizador)
{
_Realizador = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Realizador"));
}
}
}
}
[Ignore]
public int? NumVisualizacoes
{
get { return _NumVisualizacoes; }
set { _NumVisualizacoes = value; }
}
[Ignore]
public int? NumCheckins
{
get { return _NumCheckins; }
set { _NumCheckins = value; }
}
[Ignore]
public int? NumInteressados
{
get { return _NumInteressados; }
set { _NumInteressados = value; }
}
[Ignore]
public bool? Excluido
{
get { return _Excluido; }
set { _Excluido = value; }
}
[Ignore]
public string MotivoExclusao
{
get { return _MotivoExclusao; }
set { _MotivoExclusao = value; }
}
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
}
0
Hello Jean,
Thank you for providing the model. I have tested it in the same app from my previous post, and the headers are displayed properly - please check the attached screenshot for a reference.
I have also attached the updated project, can you try it at your side? Do you observe the issue with the headers with it?
Regards,
Yana
Progress Telerik
Thank you for providing the model. I have tested it in the same app from my previous post, and the headers are displayed properly - please check the attached screenshot for a reference.
I have also attached the updated project, can you try it at your side? Do you observe the issue with the headers with it?
Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items