Adding a new record in footer in Webgrid Control using a Link button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • durga2005
    New Member
    • Nov 2007
    • 49

    Adding a new record in footer in Webgrid Control using a Link button

    Hi

    In my webgrid I have three columns namely “Type” and “Category” and “code” .But while inserting new record I will not enter “Code” Value since it is automatically generated.
    When I click the AddNew linkbutton,a new row should be created with two textboxes and one Save Button at the footer of the webgrid.

    I have created the AddNew link button at the footer
    Now if I click the link 2 textboxes and one save button should be created inside webgrid control


    How can I do this???

    Can anyone help??

    Here is the code I used

    Protected Sub toys_ItemCreate d(ByVal sender As Object, ByVal e As C1.Web.C1WebGri d.C1ItemEventAr gs) Handles toys.ItemCreate d
    If e.Item.ItemType = C1.Web.C1WebGri d.C1ListItemTyp e.Footer Then
    Dim lnkbtn As New LinkButton
    lnkbtn.Text = "AddNew"
    e.Item.Cells(0) .Controls.Add(l nkbtn)
    AddHandler lnkbtn.Click, AddressOf AddNew_Click
    End If
    End Sub


    //id will be generated automatically

    Public Sub Addnew_click(By Val sender As Object, ByVal e As System.EventArg s)


    //how can I write the code here to add the buttons when AddNew linkbtn is clicked

    End Sub
Working...