|
 |
aspx_beginners thread: Checkbox how ?
Message #1 by "Nick" <nick@g...> on Tue, 16 Jul 2002 17:53:53 +0700
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0199_01C22CF1.BFAC0F20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hai.. All, i'm nicky, i'm new for ASP.Net Language, please helpme to
solve my problem
----------------------------------------------------
No | NAME | Sex | Graduated |
----------------------------------------------------
1 | Tonny | Male | [x] |
2 | sisca | Male | [ ] |
3 | Jhonny | Male | [ ] |
4 | Anie | Male | [x] |
5 | Tommy | Male | [ ] |
---------------------------------------------------
1 2 3 4 5
---------------------------------------------------
Check ALL Clear ALL
---------------------------------------------------
Sample that i describe my program view upstair, I make a "Check ALL" and
"Clear ALL" as a button type, if i click the "Check All" type, in that
page, and the checkbox should be checked, how to make that ? same
condition for Clear ALL button, but effectly only in that page not on
the all data, i using the autopaging from the datagrid....
does anyone know how to solve that problem ??
ps: sorry my english not to good
Thanks
Message #2 by Pavankumar T <PavanKumar.T@k...> on Tue, 16 Jul 2002 16:40:48 +0530
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C22CB9.7065D910
Content-Type: text/plain;
charset="iso-8859-1"
Hi ,
User this following code
myChkAdd as checkbox()
dgRateList as datagrid
For i = 0 To dgRateList.Items.Count - 1
myChkAdd = dgRateList.Items(i).FindControl("CheckboxPAdd1")
myChkAdd.checked= true
next
Here when you click on "Check all" button you have to loop through the items
of datagrid, get the reference of checkbox to a temp checkbox and then make
it checked. The same applies to "Clear all" button also.
Hope this helps U.
Regards,
pavan.
-----Original Message-----
From: Nick [mailto:nick@g...]
Sent: Tuesday, July 16, 2002 4:24 PM
To: aspx_beginners
Subject: [aspx_beginners] Checkbox how ?
Hai.. All, i'm nicky, i'm new for ASP.Net Language, please helpme to solve
my problem
----------------------------------------------------
No | NAME | Sex | Graduated |
----------------------------------------------------
1 | Tonny | Male | [x] |
2 | sisca | Male | [ ] |
3 | Jhonny | Male | [ ] |
4 | Anie | Male | [x] |
5 | Tommy | Male | [ ] |
---------------------------------------------------
1 2 3 4 5
---------------------------------------------------
Check ALL Clear ALL
---------------------------------------------------
Sample that i describe my program view upstair, I make a "Check ALL" and
"Clear ALL" as a button type, if i click the "Check All" type, in that page,
and the checkbox should be checked, how to make that ? same condition for
Clear ALL button, but effectly only in that page not on the all data, i
using the autopaging from the datagrid....
does anyone know how to solve that problem ??
ps: sorry my english not to good
Thanks
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
Message #3 by Neeta.Ambekar@l... on Tue, 16 Jul 2002 16:41:51 +0530
|
|
Hi Nicky
This is example which will help you to write your code
suppose this is a code on Html page
you have datagrid control & checkbox as a column in it
<asp:datagrid id="dtGrdSearch" Runat="server" Width="702px" BorderColor
="White" BorderStyle="None" Font-Names="Arial,Helvetica,sans-serif"
Font-Size="10pt" ForeColor="#006699" AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="chkSelect" Runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
then this is a code at page level
Private Sub btnSelectAll_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSelectAll.Click
Dim introwCnt As Int64
Dim objchk As System.Web.UI.WebControls.CheckBox
For introwCnt = 0 To dtGrdSearch.Items.Count - 1
objchk = dtGrdSearch.Items(introwCnt).FindControl("chkSelect")
objchk.Checked = True
Next
End sub
hope it will help you
Regards
Neeta
Message #4 by "Nick" <nick@g...> on Tue, 16 Jul 2002 18:33:00 +0700
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_01E0_01C22CF7.36D5CA00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
is this depend on how many data that show in the page ?
----- Original Message -----
From: Pavankumar T
To: aspx_beginners
Cc: Nick
Sent: Tuesday, July 16, 2002 6:10 PM
Subject: [aspx_beginners] RE: Checkbox how ?
Hi ,
User this following code
myChkAdd as checkbox()
dgRateList as datagrid
For i =3D 0 To dgRateList.Items.Count - 1
myChkAdd =3D dgRateList.Items(i).FindControl("CheckboxPAdd1")
myChkAdd.checked=3D true
next
Here when you click on "Check all" button you have to loop through the
items of datagrid, get the reference of checkbox to a temp checkbox and
then make it checked. The same applies to "Clear all" button also.
Hope this helps U.
Regards,
pavan.
-----Original Message-----
From: Nick [mailto:nick@g...]
Sent: Tuesday, July 16, 2002 4:24 PM
To: aspx_beginners
Subject: [aspx_beginners] Checkbox how ?
Hai.. All, i'm nicky, i'm new for ASP.Net Language, please helpme to
solve my problem
----------------------------------------------------
No | NAME | Sex | Graduated |
----------------------------------------------------
1 | Tonny | Male | [x] |
2 | sisca | Male | [ ] |
3 | Jhonny | Male | [ ] |
4 | Anie | Male | [x] |
5 | Tommy | Male | [ ] |
---------------------------------------------------
1 2 3 4 5
---------------------------------------------------
Check ALL Clear ALL
---------------------------------------------------
Sample that i describe my program view upstair, I make a "Check ALL"
and "Clear ALL" as a button type, if i click the "Check All" type, in
that page, and the checkbox should be checked, how to make that ? same
condition for Clear ALL button, but effectly only in that page not on
the all data, i using the autopaging from the datagrid....
does anyone know how to solve that problem ??
ps: sorry my english not to good
Thanks
---
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
Message #5 by "Nick" <nick@g...> on Tue, 16 Jul 2002 18:36:47 +0700
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_01E9_01C22CF7.BDC87350
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
----- Original Message -----
From: <Neeta.Ambekar@l...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, July 16, 2002 6:11 PM
Subject: [aspx_beginners] Re: Checkbox how ?
>
> Hi Nicky
>
> This is example which will help you to write your code
>
> suppose this is a code on Html page
> you have datagrid control & checkbox as a column in it
>
> <asp:datagrid id=3D"dtGrdSearch" Runat=3D"server" Width=3D"702px"
BorderColor
> =3D"White" BorderStyle=3D"None"
Font-Names=3D"Arial,Helvetica,sans-serif"
> Font-Size=3D"10pt" ForeColor=3D"#006699"
AutoGenerateColumns=3D"False">
> <Columns>
> <asp:TemplateColumn HeaderText=3D"Select">
> <ItemTemplate>
> <asp:CheckBox ID=3D"chkSelect" Runat=3D"server"></asp:CheckBox>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </asp:datagrid>
>
>
> then this is a code at page level
>
> Private Sub btnSelectAll_Click(ByVal sender As System.Object, ByVal
e As
> System.EventArgs) Handles btnSelectAll.Click
> Dim introwCnt As Int64
> Dim objchk As System.Web.UI.WebControls.CheckBox
>
> For introwCnt =3D 0 To dtGrdSearch.Items.Count - 1 <- is this
will running from the first data or depand on the page when the datagrid
showing ??
> objchk =3D
dtGrdSearch.Items(introwCnt).FindControl("chkSelect")
> objchk.Checked =3D True
> Next
> End sub
>
> hope it will help you
>
> Regards
> Neeta
>
>
>
Message #6 by Pavankumar T <PavanKumar.T@k...> on Tue, 16 Jul 2002 17:09:36 +0530
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C22CBD.7645EB50
Content-Type: text/plain;
charset="iso-8859-1"
You are using a FOR loop to Datagrid, Inside the FOR loop you are checking
the existence of checkbox and taking the reference to another temporary
checkbox and making them checked or unchecked.
It will definitely work. I am using it.
regards,
pavan.
-----Original Message-----
From: Nick [mailto:nick@g...]
Sent: Tuesday, July 16, 2002 5:03 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Checkbox how ?
is this depend on how many data that show in the page ?
----- Original Message -----
From: Pavankumar T <mailto:PavanKumar.T@k...>
To: aspx_beginners <mailto:aspx_beginners@p...>
Cc: Nick <mailto:nick@g...>
Sent: Tuesday, July 16, 2002 6:10 PM
Subject: [aspx_beginners] RE: Checkbox how ?
Hi ,
User this following code
myChkAdd as checkbox()
dgRateList as datagrid
For i = 0 To dgRateList.Items.Count - 1
myChkAdd = dgRateList.Items(i).FindControl("CheckboxPAdd1")
myChkAdd.checked= true
next
Here when you click on "Check all" button you have to loop through the items
of datagrid, get the reference of checkbox to a temp checkbox and then make
it checked. The same applies to "Clear all" button also.
Hope this helps U.
Regards,
pavan.
-----Original Message-----
From: Nick [mailto:nick@g...]
Sent: Tuesday, July 16, 2002 4:24 PM
To: aspx_beginners
Subject: [aspx_beginners] Checkbox how ?
Hai.. All, i'm nicky, i'm new for ASP.Net Language, please helpme to solve
my problem
----------------------------------------------------
No | NAME | Sex | Graduated |
----------------------------------------------------
1 | Tonny | Male | [x] |
2 | sisca | Male | [ ] |
3 | Jhonny | Male | [ ] |
4 | Anie | Male | [x] |
5 | Tommy | Male | [ ] |
---------------------------------------------------
1 2 3 4 5
---------------------------------------------------
Check ALL Clear ALL
---------------------------------------------------
Sample that i describe my program view upstair, I make a "Check ALL" and
"Clear ALL" as a button type, if i click the "Check All" type, in that page,
and the checkbox should be checked, how to make that ? same condition for
Clear ALL button, but effectly only in that page not on the all data, i
using the autopaging from the datagrid....
does anyone know how to solve that problem ??
ps: sorry my english not to good
Thanks
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
|
|
 |