Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Vannela #1
Hoe to get DataList Checkbox status in item template
I want to get the status of the checkbox control in the
item template of the DataList in the code behind
Using findcontrol i am not able to get the status of the
checkbox . How shouls i get the status of the checkbox
whether it is checked or not?\
Thank you
Vannela Guest
-
Adding another item to a completed DataLIst
Hello, I'm using a datalist, 2 columns, verticle direction. When the items are finished being displayed, I'd like to "manually" add addition text... -
checkbox in datalist
I have a datalist that show quantity price and some information in each row when user click oon checkbox it show in quantity 1 and calculate the... -
Evaluating a datalist item using a function
As I read in the records from the SQL into my datalist I want to be able to check if the value is not blank, and if itsn't blank I want to append... -
Programmatically Adding An Item To The DataList
Hi all, I've a DataList control and it's DataBound by a SqlDataReader... The Reader returns say 3 records and as expected the datalist shows 3... -
DataList item not binding.
Hi, I have a Datalist inside the ItemTemplate of another DataList. When I drilldown, I'm not getting any data in either the itemtemplate or... -
Eugene Jenihov #2
Re: Hoe to get DataList Checkbox status in item template
Hi...
foreach(DataListItem item in MyDataList.Items) {
CheckBox myCheckBox = (CheckBox)item.FindControl("chkMyCheckBox");
if (myCheckBox.Checked)
{
//do some work
}
}
"Vannela" <anonymous@discussions.microsoft.com> wrote in message
news:00b901c3c395$cb22ba20$a001280a@phx.gbl...> I want to get the status of the checkbox control in the
> item template of the DataList in the code behind
>
> Using findcontrol i am not able to get the status of the
> checkbox . How shouls i get the status of the checkbox
> whether it is checked or not?\
>
> Thank you
Eugene Jenihov Guest
-
Paul X #3
Re: Hoe to get DataList Checkbox status in item template
How do i do this in VB?
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Paul X Guest
-
Eugene Jenihov #4
Re: Hoe to get DataList Checkbox status in item template
Domething like this...
Dim item As DataListItem
Dim myCheckBox As CheckBox
For Each item In DataList1.Items
If (CType(item.FindControl("chkMyCheckBox"),
CheckBox).Checked)
'Do some work
End If
Next item
"Paul X" <sni_ker@hotmail.com> wrote in message
news:uBEdOPDxDHA.2460@TK2MSFTNGP10.phx.gbl...>
> How do i do this in VB?
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Eugene Jenihov Guest
-
Vannela #5
Re: How to get DataList Checkbox status in item template
Hi
I am getting the error as null object reference
I am no able to get the checkbox of the datalist into the
my checkbox ie., myCheckBox
What could be the problem?
Thank you
("chkMyCheckBox");>-----Original Message-----
>Hi...
>
>foreach(DataListItem item in MyDataList.Items) {
> CheckBox myCheckBox = (CheckBox)item.FindControlmessage> if (myCheckBox.Checked)
> {
> //do some work
> }
>}
>
>"Vannela" <anonymous@discussions.microsoft.com> wrote in>news:00b901c3c395$cb22ba20$a001280a@phx.gbl...>>> I want to get the status of the checkbox control in the
>> item template of the DataList in the code behind
>>
>> Using findcontrol i am not able to get the status of the
>> checkbox . How shouls i get the status of the checkbox
>> whether it is checked or not?\
>>
>> Thank you
>
>.
>Vannela Guest
-
Unregistered #6
null reference
Hey vannela, r u changing the name of datalist from MyDataList to that of your own data-list name..??
And in FindControl() method too, pass your own ckeck-box name...Unregistered Guest



Reply With Quote

