Click here to Skip to main content
15,886,578 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionGridview in Repeater Pin
zeeShan anSari30-May-12 4:33
zeeShan anSari30-May-12 4:33 
AnswerRe: Gridview in Repeater Pin
Sandeep Mewara30-May-12 10:17
mveSandeep Mewara30-May-12 10:17 
GeneralRe: Gridview in Repeater Pin
Apocalypse Now31-May-12 15:17
Apocalypse Now31-May-12 15:17 
GeneralRe: Gridview in Repeater Pin
Sandeep Mewara31-May-12 16:42
mveSandeep Mewara31-May-12 16:42 
GeneralRe: Gridview in Repeater Pin
Apocalypse Now1-Jun-12 15:19
Apocalypse Now1-Jun-12 15:19 
AnswerRe: Gridview in Repeater Pin
wikizhao31-May-12 22:26
wikizhao31-May-12 22:26 
AnswerRe: Gridview in Repeater Pin
taha bahraminezhad Jooneghani3-Jun-12 2:09
taha bahraminezhad Jooneghani3-Jun-12 2:09 
QuestionFind index or row in gridview with RadioButton Pin
Franco Cipriano30-May-12 4:03
Franco Cipriano30-May-12 4:03 
Hi,

I have included a radiobutton on a gridview using HTML control. I tried getting the index of the row selected by the radio button, but I can't figure out how. I tried using the Request.Form["RadiobuttonName"] but it gives me the value on the cell not the row index. Here is the code When I click the button to retrieve the value.

C#
protected void btnSelect_Click(object sender, EventArgs e)
       {
           string selectedValue = Request.Form["radSelect"];
           int index = Convert.ToInt32(Request.Form["radSelect"]);
}


And here is .aspx page

XML
<asp:GridView ID="grdAll" runat="server" OnRowCommand="MPS_Selected" AutoGenerateColumns="false" OnRowDataBound = "grd_rowdatabound">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText = "" Visible="false" />
                <asp:BoundField DataField="Name" HeaderText = "MPS Account Name" />
                <asp:BoundField DataField="Industry" HeaderText = "Industry" />
                <asp:BoundField DataField="SubIndustry" HeaderText = "Sub-Industry" />
                <asp:BoundField DataField="Geo" HeaderText = "Geo" />
                <asp:BoundField DataField="LocType" HeaderText = "Location" />
                <%--<asp:buttonfield buttontype="Button" commandname="Select" headertext="" text="Select"/>--%>
                <asp:TemplateField HeaderText="Select One">
                    <ItemTemplate>
                      <input  id="rdSelect" name= "radSelect" type="radio" value='<%# Eval("ID") %>' />
                      <%--<asp:RadioButton ID = "rdSelect" runat="server" onclick = "RadioCheck(this)" />
                      <asp:HiddenField ID="HiddenField1" runat="server" Value='<%#Eval("ID")%>' />--%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>

        </asp:GridView>


Any help will do.

Thanks!
AnswerRe: Find index or row in gridview with RadioButton Pin
Sandeep Mewara30-May-12 10:11
mveSandeep Mewara30-May-12 10:11 
GeneralRe: Find index or row in gridview with RadioButton Pin
Franco Cipriano30-May-12 10:35
Franco Cipriano30-May-12 10:35 
GeneralRe: Find index or row in gridview with RadioButton Pin
Sandeep Mewara30-May-12 10:41
mveSandeep Mewara30-May-12 10:41 
GeneralRe: Find index or row in gridview with RadioButton Pin
Franco Cipriano31-May-12 4:44
Franco Cipriano31-May-12 4:44 
GeneralRe: Find index or row in gridview with RadioButton Pin
Sandeep Mewara31-May-12 5:06
mveSandeep Mewara31-May-12 5:06 
Questionget the file path in web project when running unit test project Pin
siva45530-May-12 0:34
siva45530-May-12 0:34 
AnswerRe: get the file path in web project when running unit test project Pin
Sandeep Mewara30-May-12 2:26
mveSandeep Mewara30-May-12 2:26 
QuestionRestrict object's properties to be added in ASP.NET application state Pin
Tesic Goran29-May-12 20:20
professionalTesic Goran29-May-12 20:20 
QuestionAutocomplete with multiple values in ASP.NET Pin
VisualLive29-May-12 18:40
VisualLive29-May-12 18:40 
AnswerRe: Autocomplete with multiple values in ASP.NET Pin
Sandeep Mewara30-May-12 2:29
mveSandeep Mewara30-May-12 2:29 
GeneralRe: Autocomplete with multiple values in ASP.NET Pin
VisualLive30-May-12 23:21
VisualLive30-May-12 23:21 
GeneralRe: Autocomplete with multiple values in ASP.NET Pin
Sandeep Mewara30-May-12 23:35
mveSandeep Mewara30-May-12 23:35 
GeneralRe: Autocomplete with multiple values in ASP.NET Pin
VisualLive31-May-12 16:38
VisualLive31-May-12 16:38 
QuestionGrid-View Ajax style Pin
hrishi32129-May-12 6:23
hrishi32129-May-12 6:23 
AnswerRe: Grid-View Ajax style Pin
Sandeep Mewara30-May-12 2:34
mveSandeep Mewara30-May-12 2:34 
Questionlog messages in web form Pin
sc steinhayse29-May-12 4:43
sc steinhayse29-May-12 4:43 
AnswerRe: log messages in web form Pin
Sandeep Mewara30-May-12 2:37
mveSandeep Mewara30-May-12 2:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.