Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Tumurbaatar S. #1
Double pager and other behaviors
Spent 2..3 days imagining how the DataGrid works.
And found that:
1. Even the Pager position is not set to TopAndBottom, ItemCreated event
raised twice for the Pager item. So if you're using only Top or Bottom
pager,
don't forget this behavior.
2. ItemCreated is called 2 times during postback processing for every
item/row
within the DataGrid. 1st time - before Load and 2nd time - after it.
I add some controls to the Pager during ItemCreated raised before Load and
found that
these controls vanished away after Load. So I have to recreate them on
ItemCreated
called after Load.
I don't understand where they're going away after creating 1st time?
3. On 1st ItemCreated event I adjust some visual styles of the Footer
(removing some cells, changing ColSpan and etc). And (may be it follows from
2),
after Load and on 2nd ItemCreated event these changes are lost. I have to
modify them
again.
4. From 1 and 2, it follows that ItemCreated for Pager are called 4 times.
5. ItemDataBound does not raise for Pager item.
6. I've 2 DropDownList on my page. One is in the Footer and another outside
of the DataGrid.
I fill the Footer's list during ItemDataBound event and the external list -
from PageLoad with
checking of IsPostBack. So the external list is data bounded only 1 time and
it persists
its items during round trips. But the Footer's list loses its items and I
have to re-fill it
on every ItemDataBound.
EnableViewState is true for the DataGrid and anybody can explain why items
get lost?
7. Do I need to data bind above Footer list on ItemCreated or on
ItemDataBound?
If on ItemCreated, then before Load or after or on both cases?
Anything wrong in above reasoning? Something to add more or change?
Tumurbaatar S. Guest
-
Add label to cell next to Pager
Hi I'm trying to add a cell in the ItemCreated event which appears next to the Pager cell and contains a label. At the moment I'm getting a... -
Custom pager
Hi I have looked at various examples to modify a datagrid control and modified the pager in the datagrid to look the way I want it. The problem I... -
PEAR::Pager examples
Hello, I've been using the PEAR::DB_Pager class for a while, but looking at the PEAR documentation I saw that there is another database paging... -
Pager and Event Handling
OnItemCreated method of DataGrid I modified the Pager cell to have a button TableCell pager = (TableCell)e.Item.Controls; ImageButton hImg = new... -
TAP pager
Has anyone written a script that can connect and send messages via TAP? I'm trying to write a script using device::serialport for this. I can...



Reply With Quote

