OK. A It worked well. Regards!
On Sun, Feb 21, 2010 at 1:44 PM, crazy <[email protected]> wrote: > > hi , > > check this code > > foreach (DataGridItem objDgitem in myDG.Items) > { > CheckBox ObjChk = > (CheckBox)(objDgitem.FindControl("myChkBox")); > if (ObjChk.Checked) > { > do ur code here... > } > } > > thanks > vipin > On Sat, Feb 20, 2010 at 5:35 AM, Eder Sousa <[email protected]>wrote: > >> Hello Body, >> I am struggling with a code in a GridView where I have >> template (Checkbox) in the header and in the item. >> So I need to check all the itens template where the header >> template was checked >> I developed the code below, afterward it is not working, >> the program don“t pass by this codebloch >> >> >> Protected Sub chktodos_CheckedChanged(ByVal sender As Object, ByVal e As >> EventArgs) >> >> Dim chk As CheckBox >> >> ' Dim grv As GridViewRow >> >> For Each grv As GridViewRow In GridView1.Rows >> >> chk = grv.FindControl( >> "chkitem") >> >> chk.Checked = >> True >> >> Next >> >> >> >> Thanks in Advice >> >> >> -- >> Eder Sousa >> Technology Information >> [email protected] >> [email protected] >> [email protected] >> >> > > > -- > "People who never make mistakes, never do anything." > > Crazy > -- Eder Sousa Technology Information [email protected] [email protected] [email protected]
