Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Want to prevent button posting the Data for add or Update

Want to prevent button posting the Data for add or Update

Scheduled Pinned Locked Moved ASP.NET
javascripthtmlcsshelpannouncement
7 Posts 3 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi all, I have a Kendo Grid as below, it creates a Popup that will submit the Data entered by using into a Controller Action method, my need is, I have a jQuery function that will be called at RequestStart, which has some validations, what I want is, to prevent calling of the calling of the Controller Action method if Validation fails like in the jQuery method <2, or < 3 or etc, any help would be very very helpful, I am using Kendo grid for it, my Kendo grid is as below:

        @(Html.Kendo().Grid()
                        .Name("LookupGrid")
                .EnableCustomBinding(true)
                .AutoBind(true)
                .Columns(columns =>
                {
                    columns.Bound(p => p.Id).Hidden();
                    columns.Bound(p => p.Code).Width(120);
                    columns.Bound(p => p.Description).Width(280);
                    columns.Bound(p => p.CreatedDate).ClientTemplate("#=DateFormat(CreatedDate)#").Width(130);
                    columns.Bound(p => p.CreatedBy).Width(150);
                    columns.Bound(p => p.ModifiedDate).ClientTemplate("#=DateFormat(ModifiedDate)#").Width(140); ;
                    columns.Bound(p => p.ModifiedBy).Width(150);
                    columns.Bound(p => p.Status).Width(100);
                    columns.Bound(p => p.IsValid).Width(100).Hidden();                   
                    columns.Command(command => { command.Edit().UpdateText("OK").CancelText("Cancel");}).Width(100);
                    columns.Bound(p => p.LookupTableId).Hidden();
                    columns.Bound(p => p.ForeignKeyId).Hidden();
                })               
                 .ToolBar(toolbar =>
                        {
                            toolbar.Create().Text("Add New");
                        })
                                    .Editable(editable => { editable.Mode(GridEditMode.PopUp).TemplateName("\_EditLookupCode").DisplayDeleteConfirmation(false); })
                    .Pageable()
                           .Resizable(resize => resize.Columns(true))
                    .Sortable()
                    .Scrollable()
                             .Resizable(resize => resize.Columns(true))
                            .Filterable(x => x.Extra(false).Operators(O => O.ForString(str => str.Clear().StartsWith("Starts With"))))
                    .HtmlAttributes(new { style = "heig
    
    V D 2 Replies Last reply
    0
    • I indian143

      Hi all, I have a Kendo Grid as below, it creates a Popup that will submit the Data entered by using into a Controller Action method, my need is, I have a jQuery function that will be called at RequestStart, which has some validations, what I want is, to prevent calling of the calling of the Controller Action method if Validation fails like in the jQuery method <2, or < 3 or etc, any help would be very very helpful, I am using Kendo grid for it, my Kendo grid is as below:

          @(Html.Kendo().Grid()
                          .Name("LookupGrid")
                  .EnableCustomBinding(true)
                  .AutoBind(true)
                  .Columns(columns =>
                  {
                      columns.Bound(p => p.Id).Hidden();
                      columns.Bound(p => p.Code).Width(120);
                      columns.Bound(p => p.Description).Width(280);
                      columns.Bound(p => p.CreatedDate).ClientTemplate("#=DateFormat(CreatedDate)#").Width(130);
                      columns.Bound(p => p.CreatedBy).Width(150);
                      columns.Bound(p => p.ModifiedDate).ClientTemplate("#=DateFormat(ModifiedDate)#").Width(140); ;
                      columns.Bound(p => p.ModifiedBy).Width(150);
                      columns.Bound(p => p.Status).Width(100);
                      columns.Bound(p => p.IsValid).Width(100).Hidden();                   
                      columns.Command(command => { command.Edit().UpdateText("OK").CancelText("Cancel");}).Width(100);
                      columns.Bound(p => p.LookupTableId).Hidden();
                      columns.Bound(p => p.ForeignKeyId).Hidden();
                  })               
                   .ToolBar(toolbar =>
                          {
                              toolbar.Create().Text("Add New");
                          })
                                      .Editable(editable => { editable.Mode(GridEditMode.PopUp).TemplateName("\_EditLookupCode").DisplayDeleteConfirmation(false); })
                      .Pageable()
                             .Resizable(resize => resize.Columns(true))
                      .Sortable()
                      .Scrollable()
                               .Resizable(resize => resize.Columns(true))
                              .Filterable(x => x.Extra(false).Operators(O => O.ForString(str => str.Clear().StartsWith("Starts With"))))
                      .HtmlAttributes(new { style = "heig
      
      V Offline
      V Offline
      Vincent Maverick Durano
      wrote on last edited by
      #2

      I don't understand why you keep posting queries related to Kendo UI controls here in ASP.NET forum section. Again, to get quick answer to your query, you should post it at Telerik dedicated forums: Forum threads about Grid Kendo UI for jQuery[^] Or atleast at JavaScript forums section: JavaScript Discussion Boards[^] You'd likely get less response or perhaps nothing at all when posting queries to wrong forum section.

      I 1 Reply Last reply
      0
      • I indian143

        Hi all, I have a Kendo Grid as below, it creates a Popup that will submit the Data entered by using into a Controller Action method, my need is, I have a jQuery function that will be called at RequestStart, which has some validations, what I want is, to prevent calling of the calling of the Controller Action method if Validation fails like in the jQuery method <2, or < 3 or etc, any help would be very very helpful, I am using Kendo grid for it, my Kendo grid is as below:

            @(Html.Kendo().Grid()
                            .Name("LookupGrid")
                    .EnableCustomBinding(true)
                    .AutoBind(true)
                    .Columns(columns =>
                    {
                        columns.Bound(p => p.Id).Hidden();
                        columns.Bound(p => p.Code).Width(120);
                        columns.Bound(p => p.Description).Width(280);
                        columns.Bound(p => p.CreatedDate).ClientTemplate("#=DateFormat(CreatedDate)#").Width(130);
                        columns.Bound(p => p.CreatedBy).Width(150);
                        columns.Bound(p => p.ModifiedDate).ClientTemplate("#=DateFormat(ModifiedDate)#").Width(140); ;
                        columns.Bound(p => p.ModifiedBy).Width(150);
                        columns.Bound(p => p.Status).Width(100);
                        columns.Bound(p => p.IsValid).Width(100).Hidden();                   
                        columns.Command(command => { command.Edit().UpdateText("OK").CancelText("Cancel");}).Width(100);
                        columns.Bound(p => p.LookupTableId).Hidden();
                        columns.Bound(p => p.ForeignKeyId).Hidden();
                    })               
                     .ToolBar(toolbar =>
                            {
                                toolbar.Create().Text("Add New");
                            })
                                        .Editable(editable => { editable.Mode(GridEditMode.PopUp).TemplateName("\_EditLookupCode").DisplayDeleteConfirmation(false); })
                        .Pageable()
                               .Resizable(resize => resize.Columns(true))
                        .Sortable()
                        .Scrollable()
                                 .Resizable(resize => resize.Columns(true))
                                .Filterable(x => x.Extra(false).Operators(O => O.ForString(str => str.Clear().StartsWith("Starts With"))))
                        .HtmlAttributes(new { style = "heig
        
        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        Any specific reason not to use jQuery Unobtrusive validation library?

        "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

        I 1 Reply Last reply
        0
        • D dan sh

          Any specific reason not to use jQuery Unobtrusive validation library?

          "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

          I Offline
          I Offline
          indian143
          wrote on last edited by
          #4

          I am not familiar with that, I am new to MVC, can you please help me with that please? Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

          D 1 Reply Last reply
          0
          • V Vincent Maverick Durano

            I don't understand why you keep posting queries related to Kendo UI controls here in ASP.NET forum section. Again, to get quick answer to your query, you should post it at Telerik dedicated forums: Forum threads about Grid Kendo UI for jQuery[^] Or atleast at JavaScript forums section: JavaScript Discussion Boards[^] You'd likely get less response or perhaps nothing at all when posting queries to wrong forum section.

            I Offline
            I Offline
            indian143
            wrote on last edited by
            #5

            The reason is, Telerik allows only members or licensed user to post queries, that's very sad, and I am not a member and as organization I am working in is big, so not sure on whose credentials license is registered with. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

            V 1 Reply Last reply
            0
            • I indian143

              The reason is, Telerik allows only members or licensed user to post queries, that's very sad, and I am not a member and as organization I am working in is big, so not sure on whose credentials license is registered with. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

              V Offline
              V Offline
              Vincent Maverick Durano
              wrote on last edited by
              #6

              I got you. But if you are working in an organization, you should have a team license for it. Why use a paid third-party products when you can't get a full support from them? Go ask your boss and ask for the credentials so you would be able to contact their support or post to their forums when you have problems specific to their products. PS: Their site states that Community questions can be directed to the: KenduUI - Stack Overflow[^]

              1 Reply Last reply
              0
              • I indian143

                I am not familiar with that, I am new to MVC, can you please help me with that please? Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

                D Offline
                D Offline
                dan sh
                wrote on last edited by
                #7

                Check out MSDN. This is recommended practice for client side validation.

                "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups