editable gridview cell events

Discussion in 'ASP .Net' started by Robert Smith, Mar 15, 2008.

  1. Robert Smith

    Robert Smith Guest

    I'm using a gridview control in my asp.net page, however I'm getting an
    unhandled exception when I click on one of the editable textbox cells after
    first clicking the edit command button and then clicking the textbox field
    that I wish to edit. Please tell me what event gets triggered when you click
    on an editable cell in a gridview.

    Thanks in advance
    My gridview is as follows:

    <eo:CallbackPanel ID="cbpTargetGroup" runat="server" Width="100%"
    Triggers="{ControlID:gvwTargetGroup;Parameter:gvwTargetGroup}" >

    <strong>Target Groups</strong>
    <div class="container" style="overflow: auto; width: 300px;
    height: 350px";>
    <asp:GridView ID="gvwTargetGroup" runat="server"
    AllowSorting="True" AutoGenerateColumns="False"

    OnRowDataBound = "gvwTargetGroup_RowDataBound">
    <RowStyle CssClass="row" />
    <AlternatingRowStyle CssClass="alt_row" />

    <asp:TemplateField HeaderText="Edit">
    ID="imgCmdUpdate" runat="server" CommandArgument="UpdateItem"

    ImageUrl="~/Images/Informs/add.GIF" ToolTip="Update Target Group" />
    ID="imgCmdCancel" runat="server" CommandArgument="CancelItem"

    ImageUrl="~/Images/Informs/goback.GIF" ToolTip="Cancel Edit Target Group" />

    <asp:ImageButton ID="imgCmdEdit"
    runat="server" CommandArgument="EditItem" CommandName="Select"

    ImageUrl="~/Images/Informs/edit.gif" ToolTip="Edit Target Group" />

    <asp:BoundField DataField="TargetId" ReadOnly
    ="True" />
    <asp:BoundField DataField="TargetName"
    HeaderText="Target Name" SortExpression="TargetGroup" ReadOnly="True" />

    <asp:TemplateField HeaderText="Is Active"
    SortExpression= "Is Active" >
    <asp:Checkbox id="chkIsActive"
    Runat="server" Enabled = "false" />
    <asp:Checkbox id="chkIsActive"
    Runat="server" Enabled = "true" />
    <asp:TemplateField HeaderText ="From Insight"
    SortExpression="From Insight" >

    <asp:Checkbox id="chkFromInsight" Runat="server" Enabled = "false" />

    <asp:BoundField DataField="IsActive"
    ReadOnly="True" />
    <asp:BoundField DataField="SourceId"
    ReadOnly="false" />

    <asp:CommandField ShowSelectButton="True">
    <HeaderStyle CssClass="HideButton" />
    <ItemStyle CssClass="HideButton" />
    <AlternatingRowStyle CssClass="alt_row" />

    Robert Smith, Mar 15, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.