473,396 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DataBinding sólo es válido para visualizar?

Hola
pregunto esto porque cuando quiero insertar una nueva fila, los valores de
los campos no se toman de los cotroles a los cuales están enlazadsos, tengo
que asignarlos manualmente.
Estoy progrmando en c# para una PDA.
Tengo unos Text enlazados a campos de una tabla. Cuando quiero insertar una
fila tengo que hacer algo así:

txtBloque.DataBindings.Add(new Binding("Text", ds.Tables["Medicion"],
"Bloque"));
txtPlanta.DataBindings.Add(new Binding("Text", ds.Tables["Medicion"],
"Planta"));
..........
fila = Tables["Medicion"].NewRow();
fila["Bloque"] = txtBloque.Text;
fila["Planta"] = txtPlanta.Text;
...............................
ds.Tables["Medicion"].Rows.Add(fila)

mi pregunta es: las asignaciones de datos a la nueva fila fila["Bloque"]....
por que necesito hacerlas? si no las hago toman valores nulos. No deberían
inicializarse estas columnas con los valores de los text a los cuales están
enlazados? o esty haciendo algo mal?

Gracias
Nov 16 '05 #1
1 3314
Google translation works :D....translated from Spanish:

"Hello I ask this because when I want to insert a new row, the values of the
fields are not taken from the cotrolley poles to which they are enlazadsos, I
must assign them manually. I am progrmando in c # for a PDA. I have a Text
connected to fields of a table. When I want to insert a row I must do
something asi ': txtBloque.DataBindings.Add(new Binding("Text ",
ds.Tables["Medicion "]," Block")); txtPlanta.DataBindings.Add(new
Binding("Text ", ds.Tables["Medicion "]," Plant"));.......... row =
Tables["Medicion"].NewRow(); fila["Bloque "] = txtBloque.Text; fila["Planta
"] = txtPlanta.Text; ...............................
ds.Tables["Medicion"].Rows.Add(fila) my question is: the allocations of data
to the new row fila["Bloque "].... so that I need to do them? if I do not
do them they take null values. Would not have to be initialized these
columns with the values of text to which they are connected? or esty doing
something badly? Thanks"

"Felix González" wrote:
Hola
pregunto esto porque cuando quiero insertar una nueva fila, los valores de
los campos no se toman de los cotroles a los cuales están enlazadsos, tengo
que asignarlos manualmente.
Estoy progrmando en c# para una PDA.
Tengo unos Text enlazados a campos de una tabla. Cuando quiero insertar una
fila tengo que hacer algo asÃ*:

txtBloque.DataBindings.Add(new Binding("Text", ds.Tables["Medicion"],
"Bloque"));
txtPlanta.DataBindings.Add(new Binding("Text", ds.Tables["Medicion"],
"Planta"));
..........
fila = Tables["Medicion"].NewRow();
fila["Bloque"] = txtBloque.Text;
fila["Planta"] = txtPlanta.Text;
...............................
ds.Tables["Medicion"].Rows.Add(fila)

mi pregunta es: las asignaciones de datos a la nueva fila fila["Bloque"]....
por que necesito hacerlas? si no las hago toman valores nulos. No deberÃ*an
inicializarse estas columnas con los valores de los text a los cuales están
enlazados? o esty haciendo algo mal?

Gracias

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: 詹亚军 | last post by:
can activex control export large data to container by event's para ? I develop a activex control,and want to export large data to container(IE),web page can use javascript to capture the...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
3
by: John Bailey | last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great. The formview and detailview contorls would automatically layout the controls for you, the update methods were...
4
by: Nathan Sokalski | last post by:
I have two databinding expressions (the first & last names from a DB) that I want to assign to the text property of a Label so that the result is LASTNAME,FIRSTNAME. At the moment, I have the...
0
by: risomarmarques | last post by:
Agora todos os seus sonhos se realizarão! VOCÊ JÁ IMAGINOU GANHAR R$ 30.000,00 EM MENOS DE 4 SEMANAS INVESTINDO APENAS R$ 6,00 - Valor único - não mensal? ACHA IMPOSSÍVEL?? ENTÃO LEIA ESTE...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
8
by: Dirk | last post by:
Hello, I have a problem to use databinding with my business layer classes. My data class does not have simple properties (string, int or datetime), instead, all my properties are objects of the...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello to all, I want to know if DataBinding in asp.net 2,0 is better than to fill up the values of the controls of the following form: this.miControlTextBox.Text = valorParaControlTextbox; ...
0
by: Ranger | last post by:
TRANSFORME R$12,00 EM R$12.000,00 SÓ VAI TOMAR UM POUCO DO SEU TEMPO E VC Ñ VAI SE ARREPENDER ACREDITE!!! LEIA COM ATENÇÃO. MÉTODO APROVADO PELA REVISTA EXAME Você já imaginou ganhar até R$...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.