R
RJN
Hi
Sorry for posting again.
I have a datagrid which is put inside a div tag to make it scrollable. I
need to page the datagrid. The page numbers appear at the bottom of the
datagrid and has to be scrolled down completely to see the page number
links. The page number should always be visible outside the scroll bar.
Basically I want to create the paging links dynamically and on click of
this it should fire PageIndexChanged event.
The following link has an example of scrollable/sortable datagrid. I'm
trying to paging in the similar way.
http://www.extremeexperts.com/Net/Articles/ScrollableDataGridwithSorting
.aspx
I introduce a table below the datagrid and this table will have all the
paging links.
In the ItemCreated event of the datagrid, I get the control collection
of the paging links and add it to the table.
If e.Item.ItemType = ListItemType.Pager Then
Dim i As Int16
For i = 0 To e.Item.Controls(0).Controls.Count - 1
--Create a new link button
--Get the e.Item.Controls(0).Controls(i) and assign
its properties to link button
--Add the link button to the table
Next
End if
Now I need to assign the events to the new paging links created. It
should fire PageIndexChanged event.
To do this , in the ItemDataBound event I add the
Page.GetPostBackClientHyperlink to the link button .
But in ItemDataBound I'm not able to execute the statements within the
below if condition.
If e.Item.ItemType = ListItemType.Pager
End if
This statement is not executed at all.
Any help is appreciated.
Regards
RJN
Sorry for posting again.
I have a datagrid which is put inside a div tag to make it scrollable. I
need to page the datagrid. The page numbers appear at the bottom of the
datagrid and has to be scrolled down completely to see the page number
links. The page number should always be visible outside the scroll bar.
Basically I want to create the paging links dynamically and on click of
this it should fire PageIndexChanged event.
The following link has an example of scrollable/sortable datagrid. I'm
trying to paging in the similar way.
http://www.extremeexperts.com/Net/Articles/ScrollableDataGridwithSorting
.aspx
I introduce a table below the datagrid and this table will have all the
paging links.
In the ItemCreated event of the datagrid, I get the control collection
of the paging links and add it to the table.
If e.Item.ItemType = ListItemType.Pager Then
Dim i As Int16
For i = 0 To e.Item.Controls(0).Controls.Count - 1
--Create a new link button
--Get the e.Item.Controls(0).Controls(i) and assign
its properties to link button
--Add the link button to the table
Next
End if
Now I need to assign the events to the new paging links created. It
should fire PageIndexChanged event.
To do this , in the ItemDataBound event I add the
Page.GetPostBackClientHyperlink to the link button .
But in ItemDataBound I'm not able to execute the statements within the
below if condition.
If e.Item.ItemType = ListItemType.Pager
End if
This statement is not executed at all.
Any help is appreciated.
Regards
RJN