Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi,
This is my gridview
 
<asp:GridView ID="gvAvailabledoctors" runat="server" AutoGenerateColumns="False"
                              AllowPaging="true" PageSize="10" CellPadding="4" CellSpacing="1"
                                Font-Names="Verdana" Width="570px"
                                Font-Size="9pt" ForeColor="#333333" BorderStyle="Solid"
                                BorderColor="White" GridLines="none"
                                onrowcommand="gvAvailabledoctors_RowCommand"
                                onselectedindexchanged="gvAvailabledoctors_SelectedIndexChanged">
                                <RowStyle BackColor="#F7F6F3" ForeColor="black" CssClass="gridrowstyle" />
                                <Columns>
                                <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                    <input name="RadioButtondoc" type="radio"  value='<%# Eval("DoctorID") %>' />
                                    </ItemTemplate>
                                    <ItemStyle Width="50px" CssClass="gridcol" Wrap="false"/>
                                    <HeaderStyle  HorizontalAlign="Center" />
                                </asp:TemplateField>
                                   <asp:BoundField  DataField="Name" HeaderText="Doctor Name">
                                        <HeaderStyle Width="150px" HorizontalAlign="Center" />
                                        <ItemStyle Width="150px" CssClass="gridcol" Wrap="false"/>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Specialist" HeaderText="Specialized IN">
                                        <HeaderStyle Width="220px" HorizontalAlign="Center" />
                                         <ItemStyle Width="220px" CssClass="gridcol" Wrap="false"/>
                                    </asp:BoundField>
                                     <asp:BoundField DataField="City" HeaderText="Location">
                                        <HeaderStyle Width="300px" HorizontalAlign="Center" />
                                        <ItemStyle Width="150px" CssClass="gridcol" Wrap="true"/>
                                    </asp:BoundField>
 
                                </Columns>
                                <FooterStyle BackColor="#D4A97F" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#D4A97F" ForeColor="Black" HorizontalAlign="Center" Wrap="False" Font-Bold="True" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#d4a97f" Font-Bold="True" ForeColor="black" Height="20" Wrap="False" Width="75" />
                                <EditRowStyle BackColor="#999999" />
                                <AlternatingRowStyle BackColor="#E2DED6" ForeColor="black" />
                            </asp:GridView>
 

When i select a radio button in a row the doctor id should be checked whether he is available in clinic. i have return that functionality in
gvAvailabledoctors_RowCommand
. but when i select the radiobutton row command is not called. how can i do this
Posted 27-Mar-13 21:46pm
Edited 27-Mar-13 23:24pm
v2
Comments
supriya chaladi at 28-Mar-13 7:50am
   
check whether data is binding to gridview in pageload

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please For Eg Write .What to do.?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 200
1 Kamal Rocks 184
2 PIEBALDconsult 150
3 BillWoodruff 148
4 Jochen Arndt 135
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100