473,321 Members | 1,667 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,321 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 1864
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.