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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Web user control , Grid edit item collapse .Cancel

Web user control , Grid edit item collapse .Cancel

Scheduled Pinned Locked Moved ASP.NET
helpcssdatabasedesigntutorial
1 Posts 1 Posters 0 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.
  • M Offline
    M Offline
    mark_me
    wrote on last edited by
    #1

    Hi, i am trying to use a web control previously developed. The web control has been created a while ago and contains 4 -5 textboxes and an update button. The control validates all the data against specific regular expressions and displays a message if the data is invalid data otherwise stores in db. The control is working in 2-3 other pages. I want to re-use the same control but in a gridedittemplate. I can re-use the control and it seems to be working but the only problem is that if validation of data fails, the grid collapses (probably because it assumes that the function has completed. i want the grid to remain in expanded mode, until the value is saved... I am implementing my functionality as: in .ascx page (my parent page is a control too) , i have a grid with a template which defines the control as visible = false in itemcommand. i make the control visible , which works great but on update button of this child control i want the parent grid to remain expanded

    'Code from ItemCommand

    	Case Telerik.Web.UI.GridItemType.EditFormItem ' in template edit form 
                        Dim item As Telerik.Web.UI.GridEditFormItem = e.Item
                            lblError.Visible = True
                            Try                                
                                Select Case LCase(e.CommandName)
                                    Case "performinsert"
                                        'add new                                         
    
                                        Session("ProductAttribute") = attribute
                                        item.FindControl("AttributeControl").Visible = True 'the control that i make visible. 
                                        e.Canceled = True 'so that the control remains visible, 
    				'the control has some textboxes, validation and update button. on update button, this grid collapses to initial state.
    				'i dont want it to collapse
                                        Exit Sub
                                    Case "update"
                                        'TODO: implement update functionality
                                End Select
    

    An idea/ or code snippet on how to solve this issue will be appreciated.. Thanks and regards

    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