Click here to Skip to main content
15,885,366 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Problem with Dropdownlist (DDL) box... Pin
<<Tash18>>27-Apr-10 21:42
<<Tash18>>27-Apr-10 21:42 
AnswerRe: Problem with Dropdownlist (DDL) box... Pin
nagendrathecoder27-Apr-10 22:06
nagendrathecoder27-Apr-10 22:06 
AnswerRe: Problem with Dropdownlist (DDL) box... Pin
Mohammed Hameed28-Apr-10 2:58
professionalMohammed Hameed28-Apr-10 2:58 
QuestionASP.Net: Losing Javascript events on async postback Pin
Jake Slack27-Apr-10 10:53
Jake Slack27-Apr-10 10:53 
AnswerRe: ASP.Net: Losing Javascript events on async postback Pin
daveyerwin27-Apr-10 14:12
daveyerwin27-Apr-10 14:12 
GeneralRe: ASP.Net: Losing Javascript events on async postback Pin
Jake Slack28-Apr-10 2:09
Jake Slack28-Apr-10 2:09 
GeneralRe: ASP.Net: Losing Javascript events on async postback Pin
daveyerwin28-Apr-10 2:31
daveyerwin28-Apr-10 2:31 
QuestionItemTemplate can't find a control in placeholder Pin
mark_me27-Apr-10 9:44
mark_me27-Apr-10 9:44 
Hi,
i have a problem retrieving a control that has been added at runtime into the place holder... Please provide help...

 <telerik:GridTemplateColumn HeaderText="Description" SortExpression="ProductName" UniqueName="ProductName2">
          <HeaderStyle HorizontalAlign="center" />
          <ItemStyle HorizontalAlign="Left" Width="700px" />
          <ItemTemplate>
          <table style="border:0px;" >
             <tr >
                 <td style="border:0px;">
               <asp:Label id = "lblProductDescription" runat = "server" Text = '<%# Eval("ProductName") %>'></asp:Label>
               </td>     
             </tr>                                                                                        
             <tr >
                 <td style="border:0px;" ID ="tdAttributes" runat = "server">
                 <asp:PlaceHolder id = "placeHolderAttributes" runat = "server" Visible = "false"></asp:PlaceHolder>
             </td> 
          </tr>  
         </table>                                                                                           
</ItemTemplate>
</telerik:GridTemplateColumn>


Control is added in ItemDataBound as. This code works,
</pre>
'htmltable,row and cells are declared
Select Case controltype
     Case ControlType.TEXTBOX 'Constants declared
          Dim textBox As Telerik.Web.UI.RadTextBox = New Telerik.Web.UI.RadTextBox
          textBox.ID = "MYCONTROL"
          tableCell.Controls.Add(textBox )
     Case ControlType.TEXTAREA
          Dim textBox As Telerik.Web.UI.RadTextBox = New Telerik.Web.UI.RadTextBox
          textBox.ID = "MYCONTROL"
          tableCell.Controls.Add(textBox )
     Case GlobalControls.UCFormFields.FormFieldTypes.CHECKBOX
     Case GlobalControls.UCFormFields.FormFieldTypes.DROPDOWNLIST
End Select             
thisHtmlTable.Rows.Insert(0, thisTableRow)
thisTableRow.Cells.Add(tableCell)
thisTableRow.Visible = True
thisHtmlTable.Rows.Insert(thisHtmlTable.Rows.Count, thisTableRow)
         
Dim placeHolder As PlaceHolder
placeHolder = gridItem.FindControl("placeHolderAttributes")
placeHolder.Controls.Add(thisHtmlTable)
placeHolder.Visible = True


In item command , i want to retrieve the control, i can switch between the controls if i retrieve the placeholder... my problem is that in itemcommand, i can retrieve the Placeholder but when i try placeholder.controls.count, it returns 0 and cannot retrieve any control

i am trying the following code in itemcommand

item("ProductName2").FindControl("placeHolderAttributes").Findcontrol("MYCONTROL")   'this throws an error
'also tried 
item("ProductName2").FindControl("placeHolderAttributes").controls.count 'this shows 0



Please provide help...
Thanks!!!

Mark
AnswerRe: ItemTemplate can't find a control in placeholder Pin
Jamil Hallal27-Apr-10 21:03
professionalJamil Hallal27-Apr-10 21:03 
GeneralRe: ItemTemplate can't find a control in placeholder Pin
mark_me28-Apr-10 11:40
mark_me28-Apr-10 11:40 
QuestionFree Online Test and Interview Questions Pin
Nikhil Bandekar27-Apr-10 7:11
Nikhil Bandekar27-Apr-10 7:11 
AnswerRe: Free Online Test and Interview Questions Pin
Sandeep Mewara27-Apr-10 18:56
mveSandeep Mewara27-Apr-10 18:56 
QuestionHow to align EmptyDataText in the middle of gridview Pin
Andraw11127-Apr-10 6:30
Andraw11127-Apr-10 6:30 
AnswerRe: How to align EmptyDataText in the middle of gridview Pin
RCoate27-Apr-10 17:01
RCoate27-Apr-10 17:01 
QuestionNamespace not exposed in aspx.cs file Pin
Adam Brown 327-Apr-10 6:00
Adam Brown 327-Apr-10 6:00 
AnswerRe: Namespace not exposed in aspx.cs file Pin
michaelschmitt27-Apr-10 7:01
michaelschmitt27-Apr-10 7:01 
AnswerRe: Namespace not exposed in aspx.cs file Pin
daveyerwin27-Apr-10 7:15
daveyerwin27-Apr-10 7:15 
QuestionListbox selecteditem not eqal to true [modified] Pin
Sandesh M Patil27-Apr-10 5:55
Sandesh M Patil27-Apr-10 5:55 
AnswerRe: Listbox selecteditem not eqal to true Pin
Not Active27-Apr-10 7:10
mentorNot Active27-Apr-10 7:10 
AnswerRe: Listbox selecteditem not eqal to true Pin
michaelschmitt27-Apr-10 7:16
michaelschmitt27-Apr-10 7:16 
AnswerRe: Listbox selecteditem not eqal to true Pin
nagendrathecoder27-Apr-10 20:01
nagendrathecoder27-Apr-10 20:01 
QuestionConverting String to pdf ASP.net Pin
Deb_2627-Apr-10 4:55
Deb_2627-Apr-10 4:55 
AnswerRe: Converting String to pdf ASP.net Pin
Eddy Vluggen27-Apr-10 7:24
professionalEddy Vluggen27-Apr-10 7:24 
QuestionPopUp __dopostback Pin
garfield18527-Apr-10 4:54
garfield18527-Apr-10 4:54 
AnswerRe: PopUp __dopostback Pin
Not Active27-Apr-10 7:05
mentorNot Active27-Apr-10 7:05 

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.