473,404 Members | 2,178 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,404 software developers and data experts.

REALLY FRUSTRATING, Please help!!

Hi everybody.

I've an Ajax Accordion that gets data from a database, in its content
there is a Repeater that gets data from another table, depending which
header is selected in the accordion.

in the Repeater I've a checkbox (one for eache repeated field) checked
by default that I select/deselect triggering the method
OnCheckedChanged which updates the record in the table connected to
the repeater.

this method OnCheckedChanged is triggered correctly (with the right
ClientID) when I deselect the a checkbox. I use the passed sender
checkbox's ClientID to identify and modify the record in the table

PROBLEM:
when I deselect the CheckBox, the correct sender ClientID is passed,
when I select the previously deselected checkbox a wrong ClientID is
passed!
in particolar, i found that it is passed the ClientID of last
unselected chechbox in the repeater

Please help, I'm going nuts!

here is the essential structure:
======================aspx
page========================================
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Shipping.aspx.cs"
Inherits="test" MaintainScrollPositionOnPostback="true" %>
<ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true"
runat="Server" ID="ToolkitScriptManager1" />
<ajaxToolkit:Accordion ID="MyAccordion" runat="server"
SelectedIndex="0" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent"
FadeTransitions="false" FramesPerSecond="1"
TransitionDuration="1" AutoSize="None"
RequireOpenedPane="true" SuppressHeaderPostbacks="false"
Width="900px" >
<ContentTemplate>
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:CheckBox ID="ManifestCheckBox"
runat="server" AutoPostBack="true"
Checked="True" OnCheckedChanged =
"ManifestCheckBox_CheckedChanged" />
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</ajaxToolkit:Accordion>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:XXXXXXXXXXXXXXX %>"
SelectCommand="SELECT * FROM [tblPICManifest] WHERE
([PICBatchID] =
@PICBatchID)">
<SelectParameters>
<asp:ControlParameter ControlID="selectedLbl"
DefaultValue=""
Name="PICBatchID"
PropertyName="Text" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
======================aspx.cs
code========================================
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
else
{
............
}
protected void ManifestCheckBox_CheckedChanged(object sender,
EventArgs e)
{
Control ctrSender = (Control)sender;
string controlID = ctrSender.ClientID;
............

}
--
ciao
Vittorix

Dec 19 '07 #1
0 976

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
1
by: Margaret101 | last post by:
Hi!! I'm trying to do some simple paging with goes to the database once and then shows and hides the results to display 3 items at a time. It uses a next and previous button. The next button works...
22
by: SQACSharp | last post by:
I'm trying to get the control name of an editbox in another window. The following code set the value "MyPassword" in the password EditBox but it fail to return the control name of the EditBox. ...
0
by: tyson verdez | last post by:
imma beginner and my iinstructur doesnt do hands on wit us we learn out of a lecture but it doesnt help some1 please help me 1. (The MyTriangle class) Write a class/program named MyTriangle. ...
3
by: ummaria | last post by:
Hello I have a drop down list that retrieves data from a data base. Under that I have a textbox that I want to retrieve information also from the database depending on the previously selected...
1
lolixpop
by: lolixpop | last post by:
Hi everybody thanks for reading! i have a few actionscript questions that i really need help on...any help would be greatly appreciated! Okay so i came upon this tutorial:...
4
by: Vittorix | last post by:
I riepilogate with corrections and updates: I've an Ajax Accordion that gets data from a database, in its content there is a Repeater that gets data from another table, depending which header is...
2
by: baxendale12 | last post by:
I have a problem with my access database, I have a table that has the column names (see below), and what I want to do is to change the columns into rows in chronological order with the first 7...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.