Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding ID of ASP.NET grid controls
Message
General information
Forum:
ASP.NET
Category:
WebForms
Miscellaneous
Thread ID:
00758496
Message ID:
00758597
Views:
20
Glad that worked. The HTML is in the download of the samples on http://gotdotnet.com/team/vfp/ . I was limited on the amount of code that I could show in the article.

>Thanks. That's it. BTW - I still don't see any examples of yours that include the HTML; just the codebehind. Do you have a link to those?
>
>Thank you so much...I think I'll actually get finished tonight!!!
>
>
>>Change your columns to be Template Controls, then you can add the ids. You are using BoundColumn. If you look at my sample, you will see asp:TemplateColumn and the controls inside of that. You can go into the property builder for the datagrid and change the columns to templates.
>>
>>>Well, that's what I thought as well. However, I looked at the html and even tried to add an ID to each control, but it gave an error. Here's what I have in the html concerning the datagrid:
>>>
>>>
>>><asp:DataGrid id="Payment_Grid" runat="server" Width="643px" Height="183px" AllowPaging="True" AutoGenerateColumns="False" AllowSorting="True">
>>>
>>><SelectedItemStyle ForeColor="White"></SelectedItemStyle>
>>><EditItemStyle ForeColor="White"></EditItemStyle>
>>><AlternatingItemStyle ForeColor="Silver"></AlternatingItemStyle>
>>><ItemStyle ForeColor="Silver"></ItemStyle>
>>><HeaderStyle Font-Size="Medium" Font-Bold="True" HorizontalAlign="Center" ForeColor="Silver"></HeaderStyle>
>>><FooterStyle ForeColor="Silver"></FooterStyle>
>>><Columns>
>>><asp:BoundColumn DataField="Debtor" HeaderText="Debtor Name"></asp:BoundColumn>
>>><asp:BoundColumn DataField="Accountnum" HeaderText="Account Number"></asp:BoundColumn>
>>><asp:BoundColumn DataField="paymentamt" HeaderText="Payment Amt"></asp:BoundColumn>
>>><asp:BoundColumn DataField="adjustment" HeaderText="Adjustment"></asp:BoundColumn>
>>><asp:BoundColumn DataField="Balance" HeaderText="Balance"></asp:BoundColumn>
>>><asp:EditCommandColumn ButtonType="PushButton" UpdateText="Update" HeaderText="Action" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
>>><asp:BoundColumn Visible="False" DataField="key" HeaderText="key"></asp:BoundColumn>
>>><asp:BoundColumn Visible="False" DataField="date"></asp:BoundColumn>
>>><asp:BoundColumn Visible="False" DataField="client"></asp:BoundColumn>
>>></Columns>
>>></asp:DataGrid>          
>>>
>>>
>>>In the article I have on the Microsoft site, there is no reference to any HTML...I had wished there was!
>>>Again, thanks for your help and sorry to be so dense :-)
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform