Deleting data from gridview using sqldatasource control

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 32

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  11 ปีที่แล้ว

    Hi, thank you very much for taking time to give feedback. Actually neither of these are being used in real world. More often people implement custom data access layer, using the standard ado.net classes like SqlConnection, SqlCommand etc. The data access layer will then be consumed by business or other layers depending on the architecture of the application. I have seen a few real time projects using objectdatasource, control, but definitely not sqldatasource control.

  • @chibumbamohammed5006
    @chibumbamohammed5006 3 ปีที่แล้ว

    I will never forget you Sir

  • @MrHooglaz
    @MrHooglaz 11 ปีที่แล้ว

    A very insightful series. I appreciate your explanation of the ADO.Net code as well. What is more common in the working world: sqldatasource or objectdatasource?

  • @ugotzenithful
    @ugotzenithful 11 ปีที่แล้ว

    Great Explanation
    I just want to know, can the confirm box be implemented using onRowDeleting event ??

  • @RahulAgarwal-ne5wg
    @RahulAgarwal-ne5wg 6 ปีที่แล้ว +2

    sir i am using this
    ((LinkButton)control).OnClientClick =
    "return confirm('Are you sure you want to delete? This cannot be undone.');";
    but its not working , please give me solution ASAP, its urgent.

  • @pracashmaster
    @pracashmaster 11 ปีที่แล้ว

    very nice explanation

  • @MrHooglaz
    @MrHooglaz 11 ปีที่แล้ว

    thank you

  • @satyasandeep3699
    @satyasandeep3699 9 ปีที่แล้ว


    I appreciate your explanation and efforts u r putting.....i had a concern in this video .....i am not able to configure insert,update,delete through ADVANCED....they are disabled by default..i am not able to make a selection....i will appreciate if u would help me out.....plzzzzzzzzzzzzzzz

    • @awaisrajpoot3160
      @awaisrajpoot3160 7 ปีที่แล้ว

      same problem.. did u get now ??

    • @veluviorel
      @veluviorel 4 ปีที่แล้ว

      @@awaisrajpoot3160 u need to put primary key in table.

  • @prashantjain9876
    @prashantjain9876 5 ปีที่แล้ว

    Hi sir need one help if you use GUID as primary key then what will be the parameter Type in Type field

  • @narayanakatika4231
    @narayanakatika4231 11 ปีที่แล้ว

    Hi,
    Javascript Validation is not working if I use Button control as Trivedi said.
    Could you plz tell us what is the reason for it?

  • @dzdeathray
    @dzdeathray 10 ปีที่แล้ว

    when i change the button type to = button the fields do not delete. Any Sugestions??

  • @hitarthtrivedi6267
    @hitarthtrivedi6267 11 ปีที่แล้ว

    The javascript thing confirmation box is not working if I am using Button instead of LinkButton.
    ((Button)control).OnClientClick = "return confirm('Are You sure you want to delete? This change cannot be reverted')";
    I am not sure what the reason is??

  • @1999mer
    @1999mer 11 ปีที่แล้ว

    How do you display image path locations from a sql database?

  • @sulemanali4006
    @sulemanali4006 6 ปีที่แล้ว

    i have an error please help: Must declare the scalar variable "@EmployeeID".

  • @hlams2
    @hlams2 11 ปีที่แล้ว

    what if i have 2 options in that row edit and delete than how to get than this works on delete

    • @KochharAmandeep
      @KochharAmandeep 7 ปีที่แล้ว

      Try This Code!
      foreach (DataControlFieldCell cell in e.Row.Cells)
      {
      // check all cells in one row
      foreach (Control control in cell.Controls)
      {
      // Must use LinkButton here instead of ImageButton
      // if you are having Links (not images) as the command button.
      LinkButton button = control as LinkButton;
      if (button != null && button.CommandName == "Delete")
      // Add delete confirmation
      button.OnClientClick = "if (!confirm('Are you sure " +
      "you want to delete this record?')) return;";
      }
      }

  • @bishnumishra3357
    @bishnumishra3357 11 ปีที่แล้ว

    sir ,plz help us to develop a real time project.

  • @michaelburns2273
    @michaelburns2273 9 ปีที่แล้ว

    Did anyone get an answer to this question? I tried the same thing and the post back does not happen if user clicks yes. Thanks in advance!
    The javascript thing confirmation box is not working if I am using Button instead of LinkButton.
    ((Button)control).OnClientClick = "return confirm('Are You sure you want to delete? This change cannot be reverted')";
    I am not sure what the reason is??

    • @swastiknaik97
      @swastiknaik97 8 ปีที่แล้ว

      +Michael Burns i think you are missing the javascript function

  • @erdinc2727
    @erdinc2727 11 ปีที่แล้ว

    i tried what u showed in the video. but when i click the Advanced button botch checkboxes are seen Disabled what can be the reason ?

    • @erdinc2727
      @erdinc2727 11 ปีที่แล้ว +1

      it was because i didnt have primary key in my table. i replied maybe someone else also has the same problem.

    • @awaisrajpoot3160
      @awaisrajpoot3160 7 ปีที่แล้ว

      thank u so much :)

    • @siddiquejaved5036
      @siddiquejaved5036 6 ปีที่แล้ว

      Thanks you so much. It's take lots of time

  • @mustafaabbas2520
    @mustafaabbas2520 10 ปีที่แล้ว

    supposed that javascript must be used in html file not in code file ?

  • @karangoyalkkp
    @karangoyalkkp 5 ปีที่แล้ว

    hello,
    i am getting compilation error-
    Server Error in '/' Application.
    Compiler Error Message: CS0583: Internal Compiler Error (0xc0000006 at address 658F166C): likely culprit is 'IMPORT'.
    plz guide me on this error how to resolve it.

  • @vichitraanand673
    @vichitraanand673 7 ปีที่แล้ว +1

    on button type javascript not working

    • @ww1flyingace263
      @ww1flyingace263 4 ปีที่แล้ว

      Same with me. I tried many things but could not make it work. The linkbutton worked fine though.

  • @RahulAgarwal-ne5wg
    @RahulAgarwal-ne5wg 6 ปีที่แล้ว

    java script code not working.

  • @rahultnna9198
    @rahultnna9198 3 ปีที่แล้ว

    Java Script Code Is Not Properly Worked....

  • @ashokreddyz
    @ashokreddyz 6 ปีที่แล้ว

    java Script code is not working