4/3/08

Fila actual de un BindingSource

Actualización: Parece que esto funcionaría y compacta el código.

return (this.BaseDeDatosBS.Current as DataRowView).Row as DS.BaseDeDatosRow;
// Si no hay Current devolvería un null.


Sirve para acceder al elemento actual de un binding source con el tipo de fila adecuado.

public DS.JuzgadoRow JuzgadoActual {
get {
DS.JuzgadoRow result = null;
if (this.JuzgadoBs.Current != null) {
DataRowView drw = this.JuzgadoBs.Current as DataRowView;
result = drw.Row as DS.JuzgadoRow;
}
return result;
}
}

1 comentario:

Anónimo dijo...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Home Theater, I hope you enjoy. The address is http://home-theater-brasil.blogspot.com. A hug.