-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: gauravbisht2
Message 1 in Discussion

Please help!
Hi
This is in response to my earlier post. I came across this tip on the website
http://www.developer.com/net/asp/article.php/10917_2215431_1

Top Tip: If you're going to use editing with paging, watch out when updating your 
DataSet. If you're doing it purely on position, remember, after you move to a new 
page, your first item will not correlate with the first item in your DataSet. Remember 
that - you'll have to code around this. You can find out the 
current page by looking up the .CurrentPageIndex property, and find out the number of 
items displayed per page using the .PageSize property


This is what seems to be happening, e.Item.ItemIndex doesnt seem to return the correct 
row from the datagrid. I can retrieve the position of the row I want to edit by using 
CurrentPageIndex in the foll way:
Sub dgResults_Edit(Src as Object, e as DataGridCommandEventArgs)
Dim t as Integer
Dim x as Integer
'multiply currentpage index by pagesize, in this case, 12
t = dgResults.CurrentPageIndex
if t>0
t = t*12 
End if 
'This is where the prob is, I dont think I can set the value of e.Item.ItemIndex like 
this
x=e.Item.ItemIndex+t
dgResults.EditItemIndex = e.Item.ItemIndex
BindTheGrid()


Any suggestions on this?  Is there any way I can make e.Item.ItemIndex set to the row 
im working on in my datagrid?

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to