Radio button Not doing event

T

tshad

I have 2 radio buttons:

<asp:RadioButton ID="radDetail" GroupName="detailSummary"
Text="Detail" checkedChanged="RadDetail_Clicked" runat="server" />
<asp:RadioButton ID="radSummary" GroupName="detailSummary"
Text="Summary" checkedChanged="RadSummary_Clicked" runat="server" />
</p>

I want to have RadDetail_Click or RadSummary_Click executed as soon as the
radio button is clicked.

The buttons work fine and you can see the them change as you select them,
but the events are not executed.

Is there something else you need to set to make them work?

Thanks,

Tom.
 
B

bruce barker

you have to set autopostback to true. this will generate same javascript
that will postback on the change event.

note: this is really bad ui behavior. the user will not expect clicking on a
radio button to post the page (which takes some time on the internet), and
will start to type in other controls. you will need to give some feedback
that a postback is happening.

-- bruce (sqlwork.com)


| I have 2 radio buttons:
|
| <asp:RadioButton ID="radDetail" GroupName="detailSummary"
| Text="Detail" checkedChanged="RadDetail_Clicked" runat="server" />
| <asp:RadioButton ID="radSummary" GroupName="detailSummary"
| Text="Summary" checkedChanged="RadSummary_Clicked" runat="server" />
| </p>
|
| I want to have RadDetail_Click or RadSummary_Click executed as soon as the
| radio button is clicked.
|
| The buttons work fine and you can see the them change as you select them,
| but the events are not executed.
|
| Is there something else you need to set to make them work?
|
| Thanks,
|
| Tom.
|
|
 
T

tshad

bruce barker said:
you have to set autopostback to true. this will generate same javascript
that will postback on the change event.

note: this is really bad ui behavior. the user will not expect clicking on
a
radio button to post the page (which takes some time on the internet), and
will start to type in other controls. you will need to give some feedback
that a postback is happening.

This page has 2 grids on it, one for detail and one for summary. Only one
is visible at a time. What I was trying to do was set it up (similar to
sorting where you just press the Column title which re-sorts the table).

I have 2 radio buttons that show what you are looking at (Summary or
Detail). When you press the Summary radio button, the detail datagrid will
have visible turned off and the Summary datagrid will have visible turned
on. It will then run a different select call that will fill the Summary
Datagrid. Same thing happens if you press Detail.

I didn't want the user to have to press the radio button and then another
button. Also, it is plain what you are looking at as the radio buttons show
what you are looking at.

I tried setting the autopostback and it does post back, but doesn't go to
the checkedChanged events at all.

Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top