TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prasad S M
NA
22
0
How to add new row to datagrid after paging being done?
Nov 5 2008 12:45 AM
Hi All,
Glance this code..
" Public Sub CreateNewRow()
Dim index As Integer
index = StatusGrid.Items.Count
Dim da As New SqlDataAdapter
conn.Open()
da = New SqlDataAdapter("select * from Status", conn)
'New Row Creation
da.Fill(dt)
dt.Rows.Add(dt.NewRow)
'dt.Rows.InsertAt(dt.NewRow(), index)
StatusGrid.EditItemIndex = index
dt.AcceptChanges()
StatusGrid.DataSource = dt
StatusGrid.DataBind()
conn.Close()
End Sub"
With this code, I got new row in the datagrid.
But the problem Occurs, When the pagesize exceeds.
Here I have given pagesize as 10.
Assume there is 10 rows.Now When AddNewRow button is clicked, I should get new row in next page.(Total 11 rows).10 in first page and the new row in next page.
How can I get this?
Thanks in Advance...
Reply
Answers (
0
)
How to change an image/icon in datagrid
What's the benefit of organize and removing using statements?