Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Rudy #1
EDIT & DELETE grid buttons don't work
Hello all,
Going to make this short and sweet for now, need to dig myself out of a foot
of snow this morning. :( I have a data Grid, everything work well, except
for the button. Here is my error: "Index was out of range. Must be
non-negative and less than the size of the collection. Parameter name: index"
Source Error:
Line 275: ' if the user checked a box in a CheckBoxList control,
you could check to see
Line 276: ' if the value SelectedIndex property was > -1.)
Line 277:
DeleteItem(grdProducts.DataKeys(e.Item.ItemIndex). ToString)
Line 278: End If
Line 279:
I'm assuming the index would be my key column. I guess I don't really
understand how the index works.
If someone knows a good sample or HOW To, that would be great!
Thanks for the help!
Rudy
Rudy Guest
-
Checkboxes in grid/delete row not working
I copied the code for this direclty from http://www.asfusion.com/blog, but for some reason when I go to delete a row in the grid, it merely leaves... -
How to edit records in a grid that's within a grid
I am having a heck of a time getting a child grid (a grid within a grid) to go into edit mode. My code is below; it will go into edit mode only... -
Q. About Show and Hide Edit and Delete Buttons
hi, I am using a datareader to assign to the datagrid in my ASP.Net Page using VB.Net I have stored procedure to retrieve the data. In the... -
Buttons on grid
Hi How can I place a push button on each row of a grid? Thanks Regards -
Change text of edit/update/delete buttons
Hi, I Have a datagrid with edit/update/delete hyperlink buttons and would like to change the text of these buttons during runtime. How can I do... -
R. Thomas, aka Xtreme.Net #2
RE: EDIT & DELETE grid buttons don't work
This is an article of how to delete rows from ur d
[url]http://www.aspnetpro.com/newsletterarticle/2003/03/asp200303wf_l/asp200303wf_l.asp[/url]
See how they use index in this and you will get the concept of index..
Another one here : [url]http://www.developerfusion.com/show/3801/5/[/url]
And another one that incorporates, edit,delte and paging into one article
here : [url]http://www.c-sharpcorner.com/asp/Code/northwindLC.asp[/url]
Btw, the error means that the index that you are passing is our of range.
something like : if you have 6 objects and you are looking for the 7th
object..
Hth...
P.S : If this post helped you, Please click on the 'Yes' button on top of
this post. Thanks
R. Thomas
"Rudy" wrote:
> Hello all,
> Going to make this short and sweet for now, need to dig myself out of a foot
> of snow this morning. :( I have a data Grid, everything work well, except
> for the button. Here is my error: "Index was out of range. Must be
> non-negative and less than the size of the collection. Parameter name: index"
> Source Error:
>
>
> Line 275: ' if the user checked a box in a CheckBoxList control,
> you could check to see
> Line 276: ' if the value SelectedIndex property was > -1.)
> Line 277:
> DeleteItem(grdProducts.DataKeys(e.Item.ItemIndex). ToString)
> Line 278: End If
> Line 279:
>
> I'm assuming the index would be my key column. I guess I don't really
> understand how the index works.
> If someone knows a good sample or HOW To, that would be great!
>
> Thanks for the help!
>
> Rudy
>R. Thomas, aka Xtreme.Net Guest
-
Rudy #3
RE: EDIT & DELETE grid buttons don't work
Thanks Thomas,
Now that you explained what error means, I think I know what wrong. Thnks
for advice!!
Rudy
"R. Thomas, aka Xtreme.Net" wrote:
> This is an article of how to delete rows from ur dg
> [url]http://www.aspnetpro.com/newsletterarticle/2003/03/asp200303wf_l/asp200303wf_l.asp[/url]
> See how they use index in this and you will get the concept of index..
> Another one here : [url]http://www.developerfusion.com/show/3801/5/[/url]
> And another one that incorporates, edit,delte and paging into one article
> here : [url]http://www.c-sharpcorner.com/asp/Code/northwindLC.asp[/url]
>
> Btw, the error means that the index that you are passing is our of range.
> something like : if you have 6 objects and you are looking for the 7th
> object..
> Hth...
>
> P.S : If this post helped you, Please click on the 'Yes' button on top of
> this post. Thanks
>
> R. Thomas
>
>
>
> "Rudy" wrote:
>> > Hello all,
> > Going to make this short and sweet for now, need to dig myself out of a foot
> > of snow this morning. :( I have a data Grid, everything work well, except
> > for the button. Here is my error: "Index was out of range. Must be
> > non-negative and less than the size of the collection. Parameter name: index"
> > Source Error:
> >
> >
> > Line 275: ' if the user checked a box in a CheckBoxList control,
> > you could check to see
> > Line 276: ' if the value SelectedIndex property was > -1.)
> > Line 277:
> > DeleteItem(grdProducts.DataKeys(e.Item.ItemIndex). ToString)
> > Line 278: End If
> > Line 279:
> >
> > I'm assuming the index would be my key column. I guess I don't really
> > understand how the index works.
> > If someone knows a good sample or HOW To, that would be great!
> >
> > Thanks for the help!
> >
> > Rudy
> >Rudy Guest



Reply With Quote

