on ‎2008 Mar 31 9:02 AM
I've used the below code to populate 3 rows , but at run time first row will be empty after that next 3 rows will be populated.
Why its not starting from the first row?
IPrivateLogin_DCView.IEmpNode node1=wdContext.nodeEmp();
int count=3;
for(int i=0;i<count;i++){
IPrivateLogin_DCView.IEmpElement ele= wdContext.nodeEmp().getEmpElementAt(i);
ele=node1.createEmpElement();
if(i==0){
// ele=node1.createEmpElement();
ele.setEmp_name("Deepa");
ele.setEmp_age("35");
ele.setEmp_no("1");
node1.addElement(ele);
}
if(i==1){
// ele=node1.createEmpElement();
ele.setEmp_name("Raju");
ele.setEmp_age("32");
ele.setEmp_no("INFO 1");
node1.addElement(ele);
}
if(i==2){
// ele=node1.createEmpElement();
ele.setEmp_name("Rose");
ele.setEmp_age("42");
ele.setEmp_no("454 ");
node1.addElement(ele);
}
}
Request clarification before answering.
Hi,
Just replace,
IPrivateLogin_DCView.IEmpElement ele= wdContext.nodeEmp().getEmpElementAt(i);
ele=node1.createEmpElement();
with:
IPrivateLogin_DCView.IEmpElement ele=node1.createEmpElement();
inside your for loop.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.