TS6.5 SP2 on Windows.I was wondering, if it is possible to create a Customizable table with out use of replicants.I want a scenario where i have 2 fields to start with for #Rows and #columns, when i enter a number event is triggered and Fields with label of "Row1" "Row2" "Row3"........"RowN" are visible, similarly if i say M columns it should give M fields with labels of "Column1" "Column2" "Column3"...."ColumnM". Is this kind of setup even possible? Please advice.Thank You
Please provide more informationDo the alerts show up?Do they look correct?Do you have a max number of rows and columns defined somewhere?Are the items actually hidden by default? (it might be easier to start from the count value and iterate to the max value setting the fields to be hidden ...)There may be other questions, but those should do for a start.
Yes i get the alertsYes they look correctStarting off i am not defining Max Rows and Columns. I am aware of what is the max number for both my columns and rows.All i am concerned here is my iteration, i guess my iteration is not correct fro some reason.My row names are Row1,Row2,Row3....RowN and my column names are Column1, Column2, Column3, ...... ColumnNSo my iteration for Row or for Column is not correct.Any suggestions here please.Thank You
IWDatacapture.getItem("/Row").setVisible(true);
IWDatacapture.getItem("/Row" + i).setVisible(true);
IWDatacapture.getItem("/Row" + i + "").setVisible(true);
I tried what you have said, that doesn't seem to work. Also i was wondering how to implement colspan and rowspan? I guess i have to give more thought.[html]IWEventRegistry.addItemHandler("/NOR", "onItemChange", Display1); IWEventRegistry.addItemHandler("/NOC", "onItemChange", Display2); IWDatacapture.getItem("/Row1").setVisible(false); IWDatacapture.getItem("/Row2").setVisible(false); IWDatacapture.getItem("/Row3").setVisible(false); IWDatacapture.getItem("/Row4").setVisible(false); IWDatacapture.getItem("/Row5").setVisible(false); IWDatacapture.getItem("/Row6").setVisible(false); IWDatacapture.getItem("/Row7").setVisible(false); IWDatacapture.getItem("/Row8").setVisible(false); IWDatacapture.getItem("/Row9").setVisible(false); IWDatacapture.getItem("/Row10").setVisible(false); IWDatacapture.getItem("/Row11").setVisible(false); IWDatacapture.getItem("/Row12").setVisible(false); IWDatacapture.getItem("/Row13").setVisible(false); IWDatacapture.getItem("/Row14").setVisible(false); IWDatacapture.getItem("/Row15").setVisible(false); IWDatacapture.getItem("/Row16").setVisible(false); IWDatacapture.getItem("/Row17").setVisible(false); IWDatacapture.getItem("/Row18").setVisible(false); IWDatacapture.getItem("/Row19").setVisible(false); IWDatacapture.getItem("/Row20").setVisible(false); IWDatacapture.getItem("/Row21").setVisible(false);function Display1(count1){var rowcount = count1.getValue();alert (rowcount);for(i=0;i<=rowcount;i++){ IWDatacapture.getItem("/Row" + i + "").setVisible(true); IWDatacapture.redraw(); return false;}}function Display2(count2){var columncount = count2.getValue();alert (columncount);for(i=0;i<=columncount;i++){ IWDatacapture.getItem("/Column" + i + "").setVisible(true); IWDatacapture.redraw(); return false;}}[/html]Thank You
Thanks for pointing that out. I am now good with columns and rows. I am thinking about a logic to implement rowspan and colspan.And i donnot have any logic as how to implement that. Can anyone trow light or just an idea as how we can implement that?Thank YouBhargav
Rows: 5Cols: 3Row1: {- col1:rowcontinue="t", col2:rowcontinue="t", col3:rowcontinue="t"}Row2: {- col1:rowcontinue="t", col2:rowcontinue="t", col3:rowcontinue="t"}Row3: {- col1:rowcontinue="t", col2:rowcontinue="t", col3:rowcontinue="t"}Row4: {- col1:rowcontinue="t", col2:rowcontinue="t", col3:rowcontinue="t"}Row5: {- col1:rowcontinue="t", col2:rowcontinue="t", col3:rowcontinue="t"}
Adam, I am still not clear about this. You mean to say that i will display columns in a row depending on number of columns and rows being a "Replicant".So i need to call a Replicant function to add new replicants depending on # of rows right??Please advice.Thank You
IWEventRegistry.addItemHandler("/root/NOR", "onItemChange", Display1); IWEventRegistry.addItemHandler("/root/NOC", "onItemChange", Display2); IWDatacapture.getItem("/root/Row[1]").setVisible(false);function Display1(count1){var rowcount = count1.getValue();alert (rowcount); var controlledItem = IWDatacapture.getItem("/root/Row); var children = controlledItem.getChildren();for(i=1;i<=rowcount;i++){ var replicantInstance = children; IWEventRegistry.addItemHandler("/root/Row", "onReplicantBeforeAdd", insertOverride); return false;}function insertOverride(replicantContainer, i){ replicantContainer.addInstance(i); } return prepend;}
Can you help me with some logic here. I am deviating from what is required. IWEventRegistry.addItemHandler("/root/NOR", "onItemChange", Display1); IWEventRegistry.addItemHandler("/root/NOC", "onItemChange", Display2); IWDatacapture.getItem("/root/Row[1]").setVisible(false);function Display1(count1){var rowcount = count1.getValue();alert (rowcount); var controlledItem = IWDatacapture.getItem("/root/Row); var children = controlledItem.getChildren();for(i=1;i<=rowcount;i++){ var replicantInstance = children; IWEventRegistry.addItemHandler("/root/Row", "onReplicantBeforeAdd", insertOverride); return false;}function insertOverride(replicantContainer, i){ replicantContainer.addInstance(i); } return prepend;} I have a "Row" replicant with columns in it with rowcontiue="t" set.Thanks
Thanks Adam, I am trying to make this work, not relying on anyone though. I have my Row getting added depending on the number of Rows needed (NOR). Now i am trying to setVisible to Columns depending on the number of columns entered (NOC). My Logic is lost here, can you guide me as how can i make coulmns invisible inside each instance depending on NOC