editable gridview cell events

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

  1. Robert Smith

    Robert Smith Guest

    Hi,
    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
    Robert
    My gridview is as follows:

    <eo:CallbackPanel ID="cbpTargetGroup" runat="server" Width="100%"
    GroupName="SysTargetGroup"
    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"
    OnRowCommand="gvwTargetGroup_RowCommand"
    OnRowEditing="gvwTargetGroup_RowEditing"
    OnRowCancelingEdit="gvwTargetGroup_RowCancelingEdit"
    OnRowUpdating="gvwTargetGroup_RowUpdating"

    OnSelectedIndexChanged="gvwTargetGroup_SelectedIndexChanged"
    OnRowCreated="gvwTargetGroup_RowCreated"
    OnRowDataBound = "gvwTargetGroup_RowDataBound">
    <RowStyle CssClass="row" />
    <AlternatingRowStyle CssClass="alt_row" />

    <Columns>
    <asp:TemplateField HeaderText="Edit">
    <EditItemTemplate>
    <asp:ImageButton
    ID="imgCmdUpdate" runat="server" CommandArgument="UpdateItem"
    CommandName="Select"


    ImageUrl="~/Images/Informs/add.GIF" ToolTip="Update Target Group" />
    <asp:ImageButton
    ID="imgCmdCancel" runat="server" CommandArgument="CancelItem"
    CommandName="Select"


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

    </EditItemTemplate>
    <ItemTemplate>
    <asp:ImageButton ID="imgCmdEdit"
    runat="server" CommandArgument="EditItem" CommandName="Select"


    ImageUrl="~/Images/Informs/edit.gif" ToolTip="Edit Target Group" />
    </ItemTemplate>
    </asp:TemplateField>

    <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" >
    <ItemTemplate>
    <asp:Checkbox id="chkIsActive"
    Runat="server" Enabled = "false" />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:Checkbox id="chkIsActive"
    Runat="server" Enabled = "true" />
    </EditItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText ="From Insight"
    SortExpression="From Insight" >
    <ItemTemplate>

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

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

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

    </asp:GridView>
     
    Robert Smith, Mar 15, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JMC
    Replies:
    0
    Views:
    444
  2. sapo
    Replies:
    0
    Views:
    391
  3. greenb

    Setting focus to first editable cell in datagrid

    greenb, Jul 11, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    153
    greenb
    Jul 11, 2005
  4. Prasad Peesapati

    Making a cell editable on clicking the cell

    Prasad Peesapati, Feb 3, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    127
    Prasad Peesapati
    Feb 3, 2005
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    375
    Chris
    Aug 30, 2005
Loading...

Share This Page