Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Friday, March 23, 2012

radio button data binding-how?

hi,

i have a DB that contains some tables.so i have a radio button group of tow radio button to display a field.

now how can i bind this radio button group to this field for updating and insert a new record?

for more explain i brought a little of code below:

in .aspx page i have:

<asp:RadioButton ID="admin" runat="server" Checked="True" GroupName="membertype" Text="admin" OnCheckedChanged="admin_CheckedChanged" /><br /> <asp:RadioButton ID="member" runat="server" GroupName="membertype" Text="member" />

-----------------------

<asp:ControlParameter ControlID="membertype" Name="isadmin" Type="string" PropertyName="text" />

-----------------------

UpdateCommand="UPDATE UserManagement SET UserName = @.UserName, Password = @.Password, FullName = @.FullName, Description = @.Description, UserID = @.UserID ,isadmin=@.isadmin,usercitycode=@.location WHERE (UserID = @.Original_UserID)"

note that the type of the "isadmin" field is "nvarchar(50)"

thanks,

M.H.H

Have you considered using a RadioButtonList control instead? With this, you can bind the SelectedValue property to your Parameter.

|||

thanks for your reply,

no i dont use radiobuttonlist because it doesnt have any groupname property.

so i want to join two radio buttons.

i dont know how can i do this because im starter.

thanks,

M.H.H

Radio button

Hi,

I have one report,in my report i need to display parameters like this:

one radio button :Age and another radio button is Age Ranges

For the Age,I have to dispaly like two text boxes named 'From' and 'To'

For the Age Ranges,I have to display one drop down list contains values :20s,30s ..

In Reporting Services,Putting the Radio button is not possible,i think,If possible how to achive this.

Other workaround is i think Multivalued parameter which displays the Age and Age ranges

When we click on Age we need to display 2 textboxes

When we select Age Ranges we have to display Drop down list

If we select both :both 2 text boxes and drop down list.

Putting multi valued parameters for this requirement is not good and this is not the multi valued parameter concept.Please clarify me whether iam correct or not.

Thanks in advance

Your requirements go beyound the standard parameter prompts. Consider implementing a custom application to handle the parameters and use the ReportViewer controls to render reports.|||

Hi,

How to implement the custuom application,Please provide me the links.

Thanks in advance

|||http://www.devx.com/dotnet/Article/30424/0|||

Hi,

The article describing about the WinForms Report Viewer control. not the creation of custom application.

Thanks

|||By custom applications I meant WinForms or web-based applications you write. You can use the ReportViewers controls to render reports in custom .NET-based applications.