Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GridView DataRowView
Message
De
02/08/2008 02:20:50
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
 
À
02/08/2008 02:12:38
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01336044
Message ID:
01336050
Vues:
10
Or TextBox1.Text = row.Cells[Index].ToString();

>Hi,
>
>I'm a bit of newbie to .Net myself so feel free to ignore anything I say but can you get the row by something like this:
>
>GridViewRow row = GridView1.SelectedRow;
>TextBox1.Text = row.["id"].ToString();
>
>Again apoplogies if i'm miles off the mark.
>
>Jon
>
>>Hi all,
>>
>>How can I refer to DataRowView in GridView1.SelectedIndexChanged Event, I try code below, but system NullReferenceException error.
>>
>>
>>
>>
>>
>> protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
>>    {
>>        DataRowView drv = (DataRowView) GridView1.SelectedRow.DataItem;
>>        TextBox1.Text = drv["id"].ToString();
>>
>>    }
>>
>>
>>
>>TIA.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform