Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie question on dataview
Message
 
 
À
11/09/2005 18:14:36
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01048552
Message ID:
01048565
Vues:
14
Bonnie,

This is exactly what I was looking for. Thank you very much!!

>Dmitry,
>
>OK, so you have the index based on the index from whatever was selected from the dropdownlist. It will be the index to whatever is bound to it, which in your case is a DataView. So, to access your column (in my example, a string column) you simply use this syntax:
>
>string MyValue = MyDataView[iIndex]["MyColumn"].ToString();
>
>Does this help?
>
>~~Bonnie
>
>
>
>>Bonnie,
>>
>>Let me explain a bit differently. I have a dropdownlist bound to a dataview. The dataview has 3 columns. When user selects an item from a dropdownlist I want to know the value in some column of the dataview. And I don't know how to reference a dataview by row number and column name. Am I more clear now?
>>
>>Thank you.
>>
>>>Dmitry,
>>>
>>>I guess I'm not sure what it is you're looking for. You already have an index? For the DataTable or the DataView?
>>>
>>>Could you elaborate a bit more on what you're trying to accomplish or explain your question in a different way?
>>>
>>>~~Bonnie
>>>
>>>
>>>
>>>
>>>>How do I get a value for an iIndex row of a dataview? For example,
>>>>suppose I define a dataview like this:
>>>>
>>>>
>>>>DataView MyDataView = new DataView( MyDataSet.Tables["MyTable"]);
>>>>
>>>>
>>>>Then I want to get the value of column "MyColumn" in the row iIndex in the dataview MyDataView. How do I do it? What is the syntax?
>>>>
>>>>Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform