Click here to Skip to main content
15,903,523 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Ternary Operator Pin
Colin Angus Mackay5-May-05 23:32
Colin Angus Mackay5-May-05 23:32 
GeneralRe: SQL Ternary Operator Pin
Syed Abdul Khader10-May-05 15:54
Syed Abdul Khader10-May-05 15:54 
General"COM object with CLSID {10020200-EB1C-11CF-AE6E-00AA004A34D5} is either not Pin
leezardd5-May-05 9:23
leezardd5-May-05 9:23 
GeneralRe: "COM object with CLSID {10020200-EB1C-11CF-AE6E-00AA004A34D5} is either not Pin
Dan_P5-May-05 20:14
Dan_P5-May-05 20:14 
GeneralRe: "COM object with CLSID {10020200-EB1C-11CF-AE6E-00AA004A34D5} is either not Pin
leezardd12-May-05 3:51
leezardd12-May-05 3:51 
GeneralRunning Store Proc in Access Pin
mjackson115-May-05 7:49
mjackson115-May-05 7:49 
GeneralDatabase logon Pin
Joey Picerno5-May-05 3:53
Joey Picerno5-May-05 3:53 
GeneralNot DataItem Is Nothing == Only true DURING data binding?! Pin
RabidTommy5-May-05 3:29
RabidTommy5-May-05 3:29 
Heres the crack:

During data binding on a repeater control, the RepeaterItem's DataItem property is populated with the current DataRowView that it has enumerated over whilst and during the invokation of the OnItemDataBound routine and ItemDataBound event.

This provides very handy access to the data that this UI component is building its visual dependancy on.

HOWEVER, the moment that this RepeaterItem has finished its data binding and is added to the repeater controls Items collection, its DataItem property is de-referenced and you can no longer gain access to the underlying data.


Now I understand that this may be to encourage good practice in the reliance upon using ViewState, but I just don't have the time to fanny about with all these loose type castings when all I want to do is cast the DataItem{ DataRowView }.Row to my strong typed row from my dataset so I can immediately work with the Repeater controls Items collection to determine the state of controls and work directly with their associated data!


WHY is the DataItem property de-referenced?


Still, a workaround for me at the moment is the handy correlation between the DefaultView's row indexing and the RepeaterItem's ItemIndex property, ALA:

(ItemDataBound Event Context):

ctype(ctype(e.Item.bindingcontainer, DataList).datasource, MyDataTable).Item(e.Item.itemindex) is ctype(e.Item.DataItem, DataRowView).Row

returns True.



Why does it have to be like this!??! Why not just keep the reference in DataItem of the RepeaterItem class? DataList is also the same. Have I missed something totally blatant here?

I look forward to your views on the subject!


GeneralValidateing values in Stored Procedures Pin
hhrafn5-May-05 0:07
hhrafn5-May-05 0:07 
GeneralRe: Validateing values in Stored Procedures Pin
Colin Angus Mackay5-May-05 0:21
Colin Angus Mackay5-May-05 0:21 
GeneralPlease help me: need sp4 Pin
Chak4-May-05 15:29
Chak4-May-05 15:29 
GeneralRe: Please help me: need sp4 Pin
Colin Angus Mackay4-May-05 19:37
Colin Angus Mackay4-May-05 19:37 
GeneralProb using Oracle 9i Pin
vishalmishra4-May-05 11:46
vishalmishra4-May-05 11:46 
GeneralRe: Prob using Oracle 9i Pin
Colin Angus Mackay4-May-05 12:00
Colin Angus Mackay4-May-05 12:00 
GeneralRe: Prob using Oracle 9i Pin
vishalmishra4-May-05 12:14
vishalmishra4-May-05 12:14 
GeneralNewbie GROUP BY question Pin
moredip4-May-05 11:01
moredip4-May-05 11:01 
GeneralRe: Newbie GROUP BY question Pin
Colin Angus Mackay4-May-05 11:36
Colin Angus Mackay4-May-05 11:36 
GeneralRe: Newbie GROUP BY question Pin
moredip4-May-05 11:50
moredip4-May-05 11:50 
GeneralRe: Newbie GROUP BY question Pin
Colin Angus Mackay4-May-05 11:57
Colin Angus Mackay4-May-05 11:57 
GeneralRe: Newbie GROUP BY question Pin
moredip4-May-05 12:11
moredip4-May-05 12:11 
GeneralRe: Newbie GROUP BY question Pin
Colin Angus Mackay4-May-05 12:13
Colin Angus Mackay4-May-05 12:13 
GeneralAverage formula with SQL table Pin
Joey Picerno4-May-05 10:20
Joey Picerno4-May-05 10:20 
GeneralRe: Average formula with SQL table Pin
Colin Angus Mackay4-May-05 11:42
Colin Angus Mackay4-May-05 11:42 
GeneralRe: Average formula with SQL table Pin
Joey Picerno4-May-05 15:33
Joey Picerno4-May-05 15:33 
GeneralRe: Average formula with SQL table Pin
Joey Picerno4-May-05 15:45
Joey Picerno4-May-05 15:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.