Hi Robby,
Regarding on this issue, I have also found your another thread in the
microsoft.publi c.dotnet.framew ork.aspnet.data gridcontrol 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:
ms****@microsof t.com.
=============== =============== =============== =====
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?=
<ro****@newsgro up.nospam>
>Subject: GridView Checkboxes
Date: Fri, 23 May 2008 07:08:05 -0700
>
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:GridVie w ID="GridViewPro spectSearch" runat="server" CellPadding="4"
EmptyDataText=" No prospects found." ForeColor="#333 333"
GridLines="Non e">
<FooterStyle BackColor="#990 000" Font-Bold="True"
ForeColor="Whit e"
>/>
<RowStyle BackColor="#FFF BD6" ForeColor="#333 333" />
<Columns>
<asp:TemplateFi eld>
<ItemTemplate >
<asp:CheckBox ID="CheckBoxSel ect" runat="server"/>
</ItemTemplate>
</asp:TemplateFie ld>
</Columns>
<PagerStyle BackColor="#FFC C66" ForeColor="#333 333"
HorizontalAlig n="Center" />
<SelectedRowSty le BackColor="#FFC C66" Font-Bold="True"
ForeColor="Nav y" />
<HeaderStyle BackColor="#990 000" Font-Bold="True"
ForeColor="Whit e"
>/>
<AlternatingRow Style BackColor="Whit e" />
</asp:GridView>
My code to detect selection is:
foreach (GridViewRow row in GridViewProspec tSearch.Rows)
{
CheckBox cbx = (CheckBox)row.F indControl("Che ckBoxSelect");
if (cbx.Checked)
{
//Get the personId
}
}
Any ideas here? Thanks.