Saturday, May 17, 2008

gridview checkbox or any hidden template

damn got this task about two week ago..while got another offer from gov.Huhuh today 17 mei 08 just complete this code less than 10 minutes..hahahha...so here i wanna keep this code myb this code can help some one..this code is to read an id from gridview and do anything crud.. i just modify this code to get my hidden templates..alhamdullilah its work

here

Dim taskID As Integer = 0

'Dim task As Task = New Task()

'Dim row As GridViewRow
'For Each row In GridView2.Rows

'Dim result As Boolean = (CType(row.FindControl("chkSelect"), CheckBox)).Checked

'If (result) Then


taskID = Convert.ToInt32((CType(GridView2.SelectedRow.FindControl("lblTaskID"), Label)).Text)

MsgBox(taskID)

'task.UpdateTask(taskID)

'End If


'Next













my reference from azam #..his web very good reference and many time help me :p.


int taskID = 0;

Task task = new Task();

foreach (GridViewRow row in gvInComplete.Rows)

{

bool result = ((CheckBox) row.FindControl("chkSelect")).Checked;

if (result)

{

taskID = Convert.ToInt32(((Label)row.FindControl("lblTaskID")).Text);

task.UpdateTask(taskID);

}

}

2 comments:

Name Company said...

http://muly0n0.blogspot.com/search/label/download

hey see this cool website!!

Anonymous said...

[B]NZBsRus.com[/B]
Dont Bother With Idle Downloads Using NZB Files You Can Swiftly Search High Quality Movies, PC Games, MP3 Singles, Software and Download Them at Accelerated Rates

[URL=http://www.nzbsrus.com][B]Newsgroup Search[/B][/URL]

Locations of visitors to this page
DROP ME A MSG :D