473,395 Members | 1,581 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,395 software developers and data experts.

Why does a data repeater lose textbox references with over 200 items?

I have 2 data repeaters with various controls. One repeater has a checkbox, and there is a corresponding text box on the other. The check box has an onclick that will run javascript to blank out the corresponding text box when it is unchecked.

This all works fine if there are 200 or fewer items on the destination data repeater. When there are over 200 or so items, it seems to lose the text boxes on the later ones. There is no error. The javascript gets a reference to the text box, it uses the correct id, but the text doesn't change.

Any ideas on why a large number of items on a data repeater would cause this?

I will say this is a complex app with lots of hidden fields. Here is some of the javascript it uses.
Expand|Select|Wrap|Line Numbers
  1. function ResetMergeLine(obj, lineNo) {
  2.     if (pageLocked == true) {          // Only allow if page is unlocked (not saved)
  3.         return false;
  4.     }
  5.     if (obj.checked == false) {     // find target line and reset it
  6.        var dstPrefix = "rptr2_ctl";   // Source Estimate
  7.         var dstIndex = (lineNo < 10) ? "0" + lineNo.toString() : lineNo.toString();
  8.  
  9.             var txtID = dstPrefix + dstIndex + "_txtMergeFrom";
  10.  
  11.             var txtBox = $get(txtID);
  12.             if (txtBox) {
  13.                     txtBox.value = "";
  14.                     txtBox.disabled = false;
  15.                     mergeLineCount--;
  16.                     if (mergeLineCount < 0)
  17.                         mergeLineCount = 0;
  18.                     CheckMergeDirty();
  19.             }
  20.             else {
  21.                 alert("Internal Script Error. Could not find control: " + txtID + ".\n\n Contact Operations.");
  22.             }
  23.     }
  24. }
  25.  
$get is a function that returns a reference to an object. I've looked at it in debug and it seems to be returning the text box just fine, but the value is " ", instead of containing the line number, and the text box doesn't get updated. It doesn't get enabled, either.

Thanks in advance.
Feb 18 '11 #1
1 1930
Frinavale
9,735 Expert Mod 8TB
How are you applying your JavaScript to your CheckBoxes?
It might be that the ID that you are expecting the checkbox to have doesn't exist....

Consider supplying the ClientID of the TextBox to the function instead of the line number.

-Frinny
Feb 18 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Naveen | last post by:
Hi, Is the data repeater and datalist control available for win forms? if not, then are there any alternatives available? -Naveen
1
by: VIswanathan S | last post by:
Hi All! How to use Data Repeater in VB.NET? Data Fields are Employee Number Name Photo Date of Joining Salary
0
by: Jussi | last post by:
I have a Windows Application project which is registered for the COM Interop and Output type is Class Library. My class is as follows: namespace WSure { //COM events interface public...
0
by: Nilesh W | last post by:
Hi I am using data repeater in my application to display data. Header template for data repeater I want add at run time because the header text for item columns read from some other resources ...
0
by: hsr | last post by:
I'm trying to find a way to only display a fixed amount of characters from one field in a data repeater. The field that is read into the dataset is much larger, but I only want to display say the...
9
by: Robby | last post by:
In my opinion the VB6 Data Repeater has to be the most versatile control ever released by Microsoft. They also sharee this opinion when they released it but I have not been able to find its .Net...
0
by: SimonZ | last post by:
I have data repeater. One of the row is defined: <ItemTemplate> <asp:TableCell > <%If viewState("type") = "3" then%> <%# writeLine(DataBinder.Eval(Container.DataItem, "name")%> <%else%>...
0
by: Raju | last post by:
Hi all i am Rajendran I am working as a asp.net programmer. I am frish to this field so please any of u garify my doubt I Create array of Textbox Dynamically and not passible to retrieve data...
2
by: mikeyatsony | last post by:
Hi all... I've been training a little on the whole ASP.NET and would like to know how someone would use the data repeater like this: For example, I have some data coming from a table and let's...
1
by: seadog | last post by:
Hi, I am having a problem displaying data in a textbox array. What I am trying to do is have 5 number enter 5 textboxes, starting from the first and working there way to the bottom textbox. What...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.