Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GridView DataRowView
Message
From
02/08/2008 02:20:50
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
To
02/08/2008 02:12:38
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01336044
Message ID:
01336050
Views:
9
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform