473,326 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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_ItemCreated(ByVal sender As Object, ByVal e As C1.Web.C1WebGrid.C1ItemEventArgs) Handles toys.ItemCreated
If e.Item.ItemType = C1.Web.C1WebGrid.C1ListItemType.Footer Then
Dim lnkbtn As New LinkButton
lnkbtn.Text = "AddNew"
e.Item.Cells(0).Controls.Add(lnkbtn)
AddHandler lnkbtn.Click, AddressOf AddNew_Click
End If
End Sub


//id will be generated automatically

Public Sub Addnew_click(ByVal sender As Object, ByVal e As System.EventArgs)


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

End Sub
Jan 4 '08 #1
0 1053

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: John Crowley | last post by:
I keep running into this over and over again... I want a block server control that renders a header and footer, and child controls in between. But I don't want a templated control, for the...
0
by: tshad | last post by:
I have a table which works fine using the following templates: ********************************************************************************** <asp:TemplateColumn HeaderText="Answer">...
6
by: tshad | last post by:
I need to get to a status label I have on my footer section of my datalist. There is no event happening that would go to the footer. I am just doing some processing and want to update the label...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
14
by: durga2005 | last post by:
hi i have a webgrid control and i have used template columns to display data from the database in the webgrid. But when i use edit,update,cancel and any buttons inside webgrid ,it is executed...
8
by: durga2005 | last post by:
Hi I have used webgrid control using template columns to display data from the database. When I click edit button and enter the data, I m validating the data using regular expression...
0
by: durga2005 | last post by:
Hi I m using webgrid control I m trying to add a new record using the footer. I have three columns in webgrid control namely id, type and category. Id is automatically generated when using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.