I have a GridView that gets its data from a Microsoft SQL database.
The Person table inside of my database has a few columns
ID, Name ,Surname, Age, Address and Status
The GridView only has 2 columns that get populated 'Name' and 'Status' from my Person table in the database.
The Status can either be 'Active' or 'Inactive'.
Then an additional update column was added to my grid view.
My gridView columns look like the following
Each row that gets added into my GridView it will also have an update button.
All that i need to happen is that when i click on the update button for that specific item in the GridView the corrasponding item in my database my be set from active to Inactive.
i am using C# asp.net and linq.
The Person table inside of my database has a few columns
ID, Name ,Surname, Age, Address and Status
The GridView only has 2 columns that get populated 'Name' and 'Status' from my Person table in the database.
The Status can either be 'Active' or 'Inactive'.
Then an additional update column was added to my grid view.
My gridView columns look like the following
<
telerik:GridBoundColumn
DataField
=
"Name"
HeaderText
=
"First Name"
meta:resourcekey
=
"GridBoundColumnResource1"
UniqueName
=
"fName"
Resizable
=
"False"
/>
<
telerik:GridBoundColumn
DataField
=
"Status"
HeaderText
=
"Status"
meta:resourcekey
=
"GridBoundColumnResource2"
UniqueName
=
"currentStatus"
Resizable
=
"False"
/>
<
telerik:GridTemplateColumn
UniqueName
=
"TemplateUpdateColumn"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"Update"
runat
=
"server"
AutoPostBack
=
"true"
"
Text
=
"Update"
><
img
src
=
"../icons/update.ico"
/></
asp:LinkButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
Each row that gets added into my GridView it will also have an update button.
All that i need to happen is that when i click on the update button for that specific item in the GridView the corrasponding item in my database my be set from active to Inactive.
i am using C# asp.net and linq.