473,811 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 1951
Frinavale
9,735 Recognized Expert Moderator Expert
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
5016
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
2016
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
1131
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 interface IDXMachEvents { // ....
0
3318
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 Then how to add header template with header text for each column in data repeater at run time Thanks and regard Nilesh W
0
1042
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 first 50 characters when the datarepeater is bound and displayed. Is there a way to set the number of characters in a repeater column?
9
1877
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 equivalent. I have found a weaker versions of it in the web controls called Repeater, DataList and DataGrid. However, I have not found anything in the form controls. I can not port to .Net without it. I have an enterprise application that...
0
876
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%> <%# writeLine1(DataBinder.Eval(Container.DataItem,
0
411
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 from that textbox to next window in asp .net
2
1220
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 say for some of the rows, I would like to show a website for the company if they had that level of membership but for others, I would like to HIDE the website for the company. It could be as easy as a BIT field in the table like SHOWURL, if...
1
2480
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 is happening is that the displaying of the data is not happening until the process is complete, I have tryed a for next loop, for x = 1 to 5, text1(x).text = char(5,1), next x, I have even tryed just text(0).text = char(5,1), sleep 500, text(1).text =...
0
9722
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.