Guest User

Untitled

a guest
Jul 18th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. gvCaseList.FirstDisplayedScrollingRowIndex = e.NewEditIndex;
  2.  
  3. > 'System.Web.UI.WebControls.GridView' does not contain a definition for
  4. > 'FirstDisplayedScrollingRowIndex' and no extension method
  5. > 'FirstDisplayedScrollingRowIndex' accepting a first argument of type
  6. > 'System.Web.UI.WebControls.GridView' could be found (are you missing a
  7. > using directive or an assembly reference?
  8.  
  9. //When edit is selected, allows user to update textbox and drop down
  10. protected void gvCaseList_edit(object sender, GridViewEditEventArgs e)
  11. {
  12.  
  13.  
  14. EditClicked = true;
  15. Label label1 = (Label)gvCaseList.Rows[e.NewEditIndex].FindControl("Label1");
  16. CurrentException = label1.Text;
  17.  
  18. gvCaseList.EditIndex = e.NewEditIndex;
  19.  
  20. if (ViewState["dirState"] != null)
  21. {
  22. gvCaseList.DataSource = ViewState["dirState"];
  23. gvCaseList.DataBind();
  24. }
  25. else
  26. {
  27. GetgvSearchCaseListData();
  28. }
  29.  
  30. }
  31.  
  32. <asp:updatepanel runat="server">
  33. <ContentTemplate>
  34. <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" >
  35. <AlternatingRowStyle BackColor="Silver" />
  36. <Columns>
  37. <asp:TemplateField>
  38. <ItemTemplate>
  39. <asp:Button ID="EditButton" CssClass="btn btn-primary dropdown-toggle" runat="server" Text="Edit" CommandName="Edit" ></asp:Button>
  40. </ItemTemplate>
  41. <EditItemTemplate>
  42. <asp:Button ID="UpdateButton" CssClass="btn btn-primary dropdown-toggle" runat="server" Text="Update" CommandName="Update" ></asp:Button>
  43. <asp:Button ID="CancelButton" CssClass="btn btn-primary dropdown-toggle" runat="server" Text="Cancel" CommandName="Cancel"></asp:Button>
  44. </EditItemTemplate>
  45.  
  46. <ControlStyle Width="100px" />
  47.  
  48. </asp:TemplateField>
  49.  
  50.  
  51. </Columns>
  52.  
  53.  
  54.  
  55. </asp:GridView>
  56. </ContentTemplate>
  57. </asp:updatepanel>
Add Comment
Please, Sign In to add comment