About DropDown and TextBox content references

D

Daniel

Hello.-

I'm developing a form where I need to calculate Date diferences (StartDate -
EndDate), at this time I have working the programming calculations but have
some problems getting information from TextBoxes in a Repeting Section and
the whole context of a DropDown list, let me explain that:

TexBox: I program on the AfterChange event for the TextBoxes StartDate and
EndDate (date pickers) all the logical to calculate difrences and store the
information in the textbox DateDiff, this works fine the first time in the
repeating section, but if I insert a new row, then the diffrence TexBox never
get the results, probably this is due to the form How I get information from
the DatePickers and how I writ the resuts to the text box, I'm using the next
Objects references:

var Difference =
XDocument.DOM.documentElement.selectSingleNode("my:Request/my:ContractProfile/my:DiffDate");

Difference.text= GetDateDifferences(StartDate,EndDate);

About the DropDown (not in a repeting section, just in the document), I have
this connected to a WSS List that include dates for holidays in the year, I
want to use the DropDown like an array to compare the dates contained in this
control with the dates range between StartSate and EndDate in order to deduce
those dates in the Difference calculation. My problem is: I don't know how
move the whole DropDown content to an array or use the control like that, so
I will appreciate any help or reference to code portions/articles that help
me with this task.

Any help will be appreciated. Best Regards.

Daniel
 
D

Daniel

Thanks Sandeep, that could be useful, but at this time my problems are with
the DropDown list as an array and textbox handling in a repeating section.

Atte.-

Daniel
 
S

S.Y.M. Wong-A-Ton

You don't need to use a drop-down list box to retrieve and use the values
from the WSS list. Just add a secondary data connection for your WSS list and
then use the DataObjects collection of the XDocument object to get to the
values stored in the data connection. With

XDocument.DataObjects["<your WSS list>"].DOM

you can get to the DOM and nodes (+values) stored in your WSS list. Loop
through all the nodes and fill the array as you require.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top