-1
<div>
                <asp:GridView ID="gdvReceivedLetter" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    CellPadding="3" DataKeyNames="ID" GridLines="Horizontal" EmptyDataText="No Records Found"
                    PageSize="10" Width="95%" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None"
                    Font-Names="Arial" Font-Size="10.5" BorderWidth="1px" OnSelectedIndexChanged="gdvReceivedLetter_SelectedIndexChanged"
                    OnPageIndexChanging="gdvReceivedLetter_PageIndexChanging">

                    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                    <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                    <Columns>
                        <asp:BoundField DataField="ID" HeaderText="ID" Visible="False"></asp:BoundField>
                        <asp:TemplateField Visible="true">
                            <HeaderTemplate>
                                <input type="CheckBox" id="chkSelect" runat="server"  />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chkDelete"  />   
                            </ItemTemplate>
                            <HeaderStyle Width="9px" />
                            <ItemStyle Width="9px" />
                        </asp:TemplateField>

        <asp:BoundField DataField="FileName" HeaderText="फाईल नाव/क्र.">
                            <HeaderStyle CssClass="GridItemHeaderLarge" />
                            <ItemStyle CssClass="GridItemLarge" />
                        </asp:BoundField>                            

                    </Columns>
                    <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                    <HeaderStyle BackColor="#4A3C8C" ForeColor="#F7F7F7" />
                    <AlternatingRowStyle BackColor="#F7F7F7" />
                </asp:GridView>
            </div>

<table width="100%">
                <tr>
                    <td width="80%">
                    </td>
                    <td width="20%" style="padding-top: 18px">
                        <asp:Button runat="server" ID="btnDelete" Text="काढून टाका" Font-Bold="true" OnClientClick="return Delete();"
                            Enabled="true" OnClick="btnDelete_Click" />
                    </td>
                </tr>
            </table>

//////这里是问题 //// exen 复选框被选中光标永远不会出现在这里!!!为什么!!????///问题出在哪里??//请让我出去这个plzzzzzzzzz问题在哪里?

我是这门语言的新手

这是点击事件...

foreach (GridViewRow chkrow in gdvReceivedLetter.Rows)
            {
                CheckBox chk = (CheckBox)chkrow.FindControl("chkDelete");
                if (chk != null && chk.Checked)
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('CHECKEDDDDD');", true);   
                }
            }
4

1 回答 1

0

你在哪里

DataGridView1.EndEdit();

因为曾经,用户检查过它,在发出 EndEdit() 之后,它会保存到数据源中......

于 2012-05-05T11:24:11.897 回答