![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | GridView Checkboxes I'm having trouble picking up the checked state of checkboxes in my GridView. I'm working in VS2008. I added a TemplateField via smartTag "Edit Columns". My GridView markup is: <asp:GridView ID="GridViewProspectSearch" runat="server" CellPadding="4" EmptyDataText="No prospects found." ForeColor="#333333" GridLines="None"> <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#FFFBD6" ForeColor="#333333" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="CheckBoxSelect" runat="server"/> </ItemTemplate> </asp:TemplateField> </Columns> <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" /> <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView> My code to detect selection is: foreach (GridViewRow row in GridViewProspectSearch.Rows) { CheckBox cbx = (CheckBox)row.FindControl("CheckBoxSelect"); if (cbx.Checked) { //Get the personId } } Any ideas here? Thanks. |
My System Specs![]() |
| | #2 (permalink) |
| | RE: GridView Checkboxes Hi Robby, Regarding on this issue, I have also found your another thread in the microsoft.public.dotnet.framework.aspnet.datagridcontrol newsgroup. I've posted a reply there. Welcome to continue followup in that thread. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxx. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights.-------------------->From: =?Utf-8?B?Um9iYnlE?= <robbyd@xxxxxx> Quote: >Subject: GridView Checkboxes >Date: Fri, 23 May 2008 07:08:05 -0700 Quote: > >I'm having trouble picking up the checked state of checkboxes in my Quote: >I'm working in VS2008. > >I added a TemplateField via smartTag "Edit Columns". My GridView markup Quote: > ><asp:GridView ID="GridViewProspectSearch" runat="server" CellPadding="4" > EmptyDataText="No prospects found." ForeColor="#333333" >GridLines="None"> > <FooterStyle BackColor="#990000" Font-Bold="True" Quote: >/> > <RowStyle BackColor="#FFFBD6" ForeColor="#333333" /> > <Columns> > <asp:TemplateField> > <ItemTemplate> > <asp:CheckBox ID="CheckBoxSelect" runat="server"/> > </ItemTemplate> > </asp:TemplateField> > > </Columns> > <PagerStyle BackColor="#FFCC66" ForeColor="#333333" >HorizontalAlign="Center" /> > <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" >ForeColor="Navy" /> > <HeaderStyle BackColor="#990000" Font-Bold="True" Quote: >/> > <AlternatingRowStyle BackColor="White" /> > </asp:GridView> > >My code to detect selection is: > foreach (GridViewRow row in GridViewProspectSearch.Rows) > { > CheckBox cbx = (CheckBox)row.FindControl("CheckBoxSelect"); > if (cbx.Checked) > { > //Get the personId > > > } > } > >Any ideas here? Thanks. > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| "Checkboxes" pther things look weird | General Discussion | |||
| Vista icons error--checkboxes, etc. look weird | Vista General | |||
| CTP Out-GridView | PowerShell | |||
| system icon checkboxes grayed out | Vista performance & maintenance | |||