5
Answers

RadioButton control in every row of the GridView control to select one row at a time?

Vikas Ahlawat

Vikas Ahlawat

14y
4.6k
1
I have taken RadioButton control in every row of the GridView control to select one row at a time. (asp.net C#)
for this i write the following code, But it is slow process, I want to best way to do this

        protected void RadioButton1_CheckedChanged1(object sender, EventArgs e)
        {
            RadioButton SelectedRadioButton = (RadioButton)sender;

            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                RadioButton rb = (RadioButton)GridView1.Rows[i].FindControl("RadioButton1");
                rb.Checked = false;

            }
            GridViewRow SelectedGridRow = (GridViewRow)SelectedRadioButton.NamingContainer;  //for get the index of selected row
            int RowIndex = SelectedGridRow.RowIndex;
            RadioButton rb1 = (RadioButton)GridView1.Rows[RowIndex].FindControl("RadioButton1");
            rb1.Checked = true;
            
        }

is there any suggestion?
Answers (5)
0
Amreesh Sharma
NA 16 3.2k 16y
hi jagdish,
go to "Project" Menu and click properties of the project developed by you. in properties click debug and then click radio button "Start browser with URL:"Type the URL of your site collection or subsite for which you are developing the solution.
0
jagadeesh babu
NA 9 0 16y
hi amareesh,
                   Thanks for your reply,i am able to get alll templates like team site template,blank site defination .But i dont know how to work and how deploy that in server ,actually the server is another system.so give one example of site defination with sample code or give url sample project developed with visual studio 2005..

one more double can i able open my sharepoint website  from server to in my client system visual studio 2005 IDE.i want start start sharepoint portal so please give me some instrution and how to .if u have any sample code please help and send to my personal mail id :Jagadeeshcv@gmail.com

Regards

Jagadeesh

Regadrs

Jagadeesh
0
Amreesh Sharma
NA 16 3.2k 16y
0
Amreesh Sharma
NA 16 3.2k 16y
Hi jagdish,
after installing VS extensions for WSS. go to create new project in VS 2005. A template called sharepoint and sharepoint server will automatically be installed. click on it you will get list of all the templates available. choose and write the approprite code and then debug it and attach it to the w3p.exe process using DEBUG menu and by clicking Attach to Process. then build it and deploy it. it will be deployed in site features and acticvate it after going to the site features through site actions. Then finally you can perform the action you want.

Let me know if your problem is still not solved.because i am not able to paste the screenshots in this editor......
cheers
Amreesh
0
jagadeesh babu
NA 9 0 16y
Hi,
      Thanks for reply,can u please give an idea after completion of creating template how to store in share point templates,if it is possible please give one example

Thanks&Regards

JagadeeshV
0
Amreesh Sharma
NA 16 3.2k 16y
hi Jagdish,
You dont need a wsp builder for developing sharepoint template in VS 2005. instead of that just install the visual studio extensions for windows sharepoint services version 1.1 from the following link.
http://www.microsoft.com/downloads/details.aspx?FamilyID=3e1dcccd-1cca-433a-bb4d-97b96bf7ab63&displaylang=en
and you can the develop any kind of template in sharepoint.