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

Datagrid FOOTERTEMPLATE

I have a FOOTERTEMPLATE that consists of a 3 DropDownLists. When something
from DDL1 is selected it then populates DDL2, when something from DDL2 is
selected it then populates DDL3.

DDL1 is currently populated, but when I make a selection, it just doesn't
recognize that my FOOTERTEMPLATE is part of my Datagrid. I have 2 rows, the
first one for the "Edit" and my FOOTERTEMPLATE for my "Add". The debug
recognizes my 1st row but has no clue about my second row. My sender.id is
showing my DDL1 ("SuccessItem_Add") which is correct. Here's the code...

<asp:TemplateColumn HeaderText="Success Item">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem,"SuccessItem") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="SuccessItem_Edit"
DataTextField="DropDownTrans" DataValueField="DropDownCode"
runat="server" Width="450" enabled="false" />
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList id="SuccessItem_Add"
DataTextField="DropDownTrans" DataValueField="DropDownCode"
runat="server" Width="450" enabled="false" />
</FooterTemplate>
</asp:TemplateColumn>

I can see the "SuccessItem_Edit" in the debug, but not the "SuccessItem_Add".
Thanks
Nov 21 '05 #1
1 1865
SOLUTION:

MyDataGrid.Controls(0).Controls(MyDataGrid.Control s(0).Controls.Count -
1).Controls.Item(0).Controls.Item(1)

http://dotnet247.com/247reference/msgs/49/248980.aspx

"sakieboy" wrote:
I have a FOOTERTEMPLATE that consists of a 3 DropDownLists. When something
from DDL1 is selected it then populates DDL2, when something from DDL2 is
selected it then populates DDL3.

DDL1 is currently populated, but when I make a selection, it just doesn't
recognize that my FOOTERTEMPLATE is part of my Datagrid. I have 2 rows, the
first one for the "Edit" and my FOOTERTEMPLATE for my "Add". The debug
recognizes my 1st row but has no clue about my second row. My sender.id is
showing my DDL1 ("SuccessItem_Add") which is correct. Here's the code...

<asp:TemplateColumn HeaderText="Success Item">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem,"SuccessItem") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="SuccessItem_Edit"
DataTextField="DropDownTrans" DataValueField="DropDownCode"
runat="server" Width="450" enabled="false" />
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList id="SuccessItem_Add"
DataTextField="DropDownTrans" DataValueField="DropDownCode"
runat="server" Width="450" enabled="false" />
</FooterTemplate>
</asp:TemplateColumn>

I can see the "SuccessItem_Edit" in the debug, but not the "SuccessItem_Add".
Thanks

Nov 21 '05 #2

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

Similar topics

0
by: shamila | last post by:
</asp:label><asp:datagrid id="DataGrid3" runat="server" cssclass="DataGrid" showfooter="True" onupdatecommand="DataGrid3_Update"ondeletecommand="DataGrid3_Delete" oneditcommand="DataGrid3_Edit"...
0
by: Shane O. Pinnell | last post by:
I am sure this has come up before, but I haven't been able to find an answer as of yet. That said, any help is definitely appreciated! I have a datagrid populated from a dataset. I have a...
0
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
1
by: tshad | last post by:
I can't seem to get insert into a DataGrid to work. I am using an example from the net and made changes to work on my computer. The grid comes up fine. The edit boxes in the footer are there. ...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
16
by: tshad | last post by:
I am trying to center a button in a datagrid column in asp.net and it doesn't seem to work. I have the following: <asp:TemplateColumn ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">...
4
by: Luis Esteban Valencia | last post by:
I have a asp.net page (C#), with a datagrid. I use template for all columns, and have <asp:requiredfieldvalidator> in with one of the textboxes, to make sure it's filled in. However, this...
7
by: gn | last post by:
Hi have a dropdown list within a datagrid, based on what is selected in the list I want to populate another dropdownlist, the code to populate the dropdownlists is not the problem, my problem is...
1
by: Stu | last post by:
Hi, I have a button in the footer of a datagrid that sometimes does not tigger the item command. The page is quite large & has a number of homegrown controls in it. Has anyone come across this...
1
by: sriii | last post by:
Hi, If u don't mind let me expalin onexample with code.actually am new to the dotnet.I want to develop this application in c# webapplication.Plz plz give me reply. Am giving u code also...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.