Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gvCaseList.FirstDisplayedScrollingRowIndex = e.NewEditIndex;
- > 'System.Web.UI.WebControls.GridView' does not contain a definition for
- > 'FirstDisplayedScrollingRowIndex' and no extension method
- > 'FirstDisplayedScrollingRowIndex' accepting a first argument of type
- > 'System.Web.UI.WebControls.GridView' could be found (are you missing a
- > using directive or an assembly reference?
- //When edit is selected, allows user to update textbox and drop down
- protected void gvCaseList_edit(object sender, GridViewEditEventArgs e)
- {
- EditClicked = true;
- Label label1 = (Label)gvCaseList.Rows[e.NewEditIndex].FindControl("Label1");
- CurrentException = label1.Text;
- gvCaseList.EditIndex = e.NewEditIndex;
- if (ViewState["dirState"] != null)
- {
- gvCaseList.DataSource = ViewState["dirState"];
- gvCaseList.DataBind();
- }
- else
- {
- GetgvSearchCaseListData();
- }
- }
- <asp:updatepanel runat="server">
- <ContentTemplate>
- <asp:GridView ID="gvCaseList" runat="server" AllowSorting="True" OnSorting="gvCaseList_Sorting" OnRowEditing="gvCaseList_edit" OnRowUpdating="gvCaseList_RowUpdating" OnRowCancelingEdit="gvCaseList_RowCancelingEdit" OnRowDataBound="gvCaseList_RowDataBound" CellPadding="4" GridLines="Horizontal" AutoGenerateColumns="False" BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" >
- <AlternatingRowStyle BackColor="Silver" />
- <Columns>
- <asp:TemplateField>
- <ItemTemplate>
- <asp:Button ID="EditButton" CssClass="btn btn-primary dropdown-toggle" runat="server" Text="Edit" CommandName="Edit" ></asp:Button>
- </ItemTemplate>
- <EditItemTemplate>
- <asp:Button ID="UpdateButton" CssClass="btn btn-primary dropdown-toggle" runat="server" Text="Update" CommandName="Update" ></asp:Button>
- <asp:Button ID="CancelButton" CssClass="btn btn-primary dropdown-toggle" runat="server" Text="Cancel" CommandName="Cancel"></asp:Button>
- </EditItemTemplate>
- <ControlStyle Width="100px" />
- </asp:TemplateField>
- </Columns>
- </asp:GridView>
- </ContentTemplate>
- </asp:updatepanel>
Add Comment
Please, Sign In to add comment