Home All Groups Group Topic Archive Search About

Datagrid soes not page nor edits

Author
1 Feb 2006 12:14 AM
Doru Roman
Hi,

I try to use a datagrid with paging. Even though it shows the numbers for
the following pages at the bottom of the grid, when I click on the page
number it does not go there, it keeps the first page, even though there are
lots of them to be seen.
And when I provide an EDIT button it does not allow me to change values
inside the grid. It looks like a setting I am not aware of.

Thanks,
Doru

Author
2 Feb 2006 2:48 PM
NS
To enable Edit mode handle the EditCommand event.
In the edit command event handler add the following lines of code:

DataGrid1.EditItemIndex = e.Item.ItemIndex;
DataGrid1.DataBind();

Check out the Documentation for Datagrid events in msdn.
if u disable viewstate , then i think its the user's responsibility to
store the edititemindex value and set it appropriately in page load for
the datagrid.

if u enable viewstate then the code above is just right to enable editing.

Theres lot of documentation about paging a datagrid control.
Check out datagrid control newsgroup.

bye


Doru Roman wrote:
Show quoteHide quote
> Hi,
>
> I try to use a datagrid with paging. Even though it shows the numbers for
> the following pages at the bottom of the grid, when I click on the page
> number it does not go there, it keeps the first page, even though there are
> lots of them to be seen.
> And when I provide an EDIT button it does not allow me to change values
> inside the grid. It looks like a setting I am not aware of.
>
> Thanks,
> Doru
>
>
Author
3 Feb 2006 5:17 PM
Doru Roman
Thanks NS, it seems that it is doing the job.
Author
3 Feb 2006 5:21 PM
Doru Roman
NS, do you know the trick to make the datagrid to page?
It only shows the first page but it does not change to the others.
How can I get the datagrid newsgroup? I could not find it.
Author
4 Feb 2006 3:47 PM
NS
Hello,

There r 2 types of paging default and custom. Refer to MSDN
documentation on paging a dtagrid control.

handle the pageindexchanged event..

datagrid control newsgroup :
microsoft.public.dotnet.framework.aspnet.datagridcontrol

bye


Doru Roman wrote:
Show quoteHide quote
> NS, do you know the trick to make the datagrid to page?
> It only shows the first page but it does not change to the others.
> How can I get the datagrid newsgroup? I could not find it.
>
>
Author
4 Feb 2006 8:37 PM
Doru Roman
thanks