Click here to Skip to main content
15,917,455 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reversing letters in a word [modified] Pin
Johnny Jackson10-Mar-09 19:11
Johnny Jackson10-Mar-09 19:11 
AnswerRe: Reversing letters in a word Pin
Johnny Jackson11-Mar-09 1:38
Johnny Jackson11-Mar-09 1:38 
QuestionCryptoStream Length Pin
BalajiRamasamy10-Mar-09 2:59
BalajiRamasamy10-Mar-09 2:59 
AnswerRe: CryptoStream Length Pin
BalajiRamasamy10-Mar-09 4:48
BalajiRamasamy10-Mar-09 4:48 
Questionwhich API to use? Pin
Try10-Mar-09 2:57
Try10-Mar-09 2:57 
AnswerRe: which API to use? Pin
Calin Tatar10-Mar-09 7:19
Calin Tatar10-Mar-09 7:19 
Answernobrainer Pin
Luc Pattyn10-Mar-09 8:04
sitebuilderLuc Pattyn10-Mar-09 8:04 
Questiondynamic dropdown list box Pin
ramya_jkumar10-Mar-09 2:49
ramya_jkumar10-Mar-09 2:49 
Hi can somebody help me out from this issue...i have a dropdownlistbox which contains 1 to 15 nos, based upon the selected number i.e if i choose 2 that many dropdownlistbox will dynamically generated with some numbers populated in it. upto this point there is no problem.

my problem is if the user selects any number from the dynamically generated drop down then the selected index changed event should fire for each individually generated dropdownlist box.how to achieve this?

since the dropdownlist box is generated dynamically i dont knw how to write the selected indexchanged event for each dynamic control..
with this i have attached part of the codesnippet..please some body help

label2.Text = "No.of Modules:";
label2.Font.Bold = true;
tc1.Controls.Add(label2);
tr1.Cells.Add(tc1);

DropDownList ddLModule = new DropDownList();
ddLModule.ID = "DropDownListID" + (i + 1).ToString();
ddLModule.SelectedIndexChanged += new EventHandler(DDL_SelectedIndexChanged);

int nTotalRecords = 15;
ddLModule.AutoPostBack = true;
for (int i1 = 0; i1 <= nTotalRecords; i1++)
{
ddLModule.Items.Add(i1.ToString());
}

tc.Controls.Add(ddLModule);
tr1.Cells.Add(tc);

// for all the dynamically genarted drodpwn this event only fires ,i need to fire selcted indexchanged event for each control created dynamically??//

private void DDL_SelectedIndexChanged(object sender, System.EventArgs e)
{

for (int i = 0; i < this.myDDLS.Count; i++)
{
string ddlId = (string)this.myDDLS[i];
Control c = phdIterationDetails.FindControl(ddlId);
if (c != null)
{
DropDownList myddl = (DropDownList)c;
int ModuleRows = Convert.ToInt32(myddl.SelectedValue.ToString());
Session["modulerows"] = ModuleRows;
if (ModuleRows > 0)
{
CreateDynamicModules(ModuleRows);
}
}
}
}
AnswerRe: dynamic dropdown list box Pin
Luc Pattyn10-Mar-09 8:06
sitebuilderLuc Pattyn10-Mar-09 8:06 
QuestionWMI for process tracing Pin
lost_in_code10-Mar-09 2:17
lost_in_code10-Mar-09 2:17 
QuestionApply random number to multiple canvas objects Pin
emptythetill10-Mar-09 2:17
emptythetill10-Mar-09 2:17 
QuestionAjax control overlapping with other controls Pin
yesu prakash10-Mar-09 2:15
yesu prakash10-Mar-09 2:15 
QuestionPictureBox MouseUp event? Pin
Megidolaon10-Mar-09 1:43
Megidolaon10-Mar-09 1:43 
AnswerRe: PictureBox MouseUp event? Pin
Xmen Real 10-Mar-09 2:28
professional Xmen Real 10-Mar-09 2:28 
GeneralRe: PictureBox MouseUp event? Pin
Megidolaon11-Mar-09 0:29
Megidolaon11-Mar-09 0:29 
GeneralRe: PictureBox MouseUp event? Pin
Xmen Real 11-Mar-09 3:57
professional Xmen Real 11-Mar-09 3:57 
GeneralRe: PictureBox MouseUp event? Pin
Megidolaon12-Mar-09 21:32
Megidolaon12-Mar-09 21:32 
AnswerRe: PictureBox MouseUp event? Pin
yesu prakash10-Mar-09 3:01
yesu prakash10-Mar-09 3:01 
GeneralRe: PictureBox MouseUp event? Pin
Megidolaon15-Mar-09 21:21
Megidolaon15-Mar-09 21:21 
QuestionHttpWebRequest Pin
dummy461310-Mar-09 1:13
dummy461310-Mar-09 1:13 
AnswerRe: HttpWebRequest Pin
harold aptroot10-Mar-09 1:28
harold aptroot10-Mar-09 1:28 
AnswerRe: HttpWebRequest Pin
#realJSOP10-Mar-09 2:27
professional#realJSOP10-Mar-09 2:27 
GeneralRe: HttpWebRequest Pin
dummy461310-Mar-09 5:19
dummy461310-Mar-09 5:19 
GeneralRe: HttpWebRequest Pin
Curtis Schlak.10-Mar-09 5:49
Curtis Schlak.10-Mar-09 5:49 
GeneralRe: HttpWebRequest Pin
dummy461310-Mar-09 6:02
dummy461310-Mar-09 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.