S
Shan1986
Guest
Hallo,
I am making a simple program , which calculates an area for the selected object (e.g square or rectangle, but actual program calculates a complicated math)
I have combo box where the objects are listed for selection and appropriate fields are shown/hidden depending on the object, for e.g. if i select square in the combo box , text field length is shown and area is calculated by a separate sub for the square. separate sub for rectangle and circle. calculation is done automatically as i type or change object
All the variables are stored in a data table (via binding source) as record for each object e.g, selected object , parameters such as length, radius etc, and area. All fields are data bound to data table by binding source.
Program works in a normal use as expected. Now i save this file as xml and import existing rows from this xml (or already calculated objects) to the program by import row or bindingsource.addnew,
when i import row it does not calculate the area for the first row (doing by bindingsource.addnew ) but it calculates from the second row on ..
How can i make this work for the first row, or which event i should trigger? or how it is done normally?
idea is i can import the old file and calculate according to new calculation method.
thanks.
Continue reading...
I am making a simple program , which calculates an area for the selected object (e.g square or rectangle, but actual program calculates a complicated math)
I have combo box where the objects are listed for selection and appropriate fields are shown/hidden depending on the object, for e.g. if i select square in the combo box , text field length is shown and area is calculated by a separate sub for the square. separate sub for rectangle and circle. calculation is done automatically as i type or change object
All the variables are stored in a data table (via binding source) as record for each object e.g, selected object , parameters such as length, radius etc, and area. All fields are data bound to data table by binding source.
Program works in a normal use as expected. Now i save this file as xml and import existing rows from this xml (or already calculated objects) to the program by import row or bindingsource.addnew,
when i import row it does not calculate the area for the first row (doing by bindingsource.addnew ) but it calculates from the second row on ..
How can i make this work for the first row, or which event i should trigger? or how it is done normally?
idea is i can import the old file and calculate according to new calculation method.
thanks.
Continue reading...