Iwant to select a row and column in gridview with select radiobutton. but No checked change event.below put a button .if click that button to seleced row values will select

I want to select a row and column in gridview using radiobutton in gridview . if which radio button is select that row will select and i want that row column values in outside individual textboxes of next page.  but in that only single radiobutton will select and no post back="true" bcz iam not using checked change property. i inserted button below gridview. if i click the that selected row and columns values are stored into textboxes of next page

im using this code .but im getting one column in that row. but i want all columns in that selected row so plz replay me 

<asp:GridView ID="Gridviewselectbus" runat="server" Height="87px"

Width="771px" BorderColor="#BFBFBF" HorizontalAlign="Center">

<RowStyle BorderColor="#999999" ForeColor="#747474" HorizontalAlign="Center"

VerticalAlign="Middle" Wrap="True" />

<EmptyDataRowStyle BorderColor="#999999" />

<Columns>

<asp:TemplateField HeaderText="Select">

<ItemTemplate>

&nbsp;<input name="MyradioButton" type="radio"

value='<%#Eval("bustype") %> />

</ItemTemplate>

</asp:TemplateField>

</Columns>

0
rajenderreddy
10/20/2008 4:46:48 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

1 Replies
1985 Views

Similar Articles

[PageSpeed] 57

 

Check out this code you got the solution from this

 

<asp:TemplateField>

<ItemTemplate>

<asp:LinkButton ID="lnkDisable" runat="server" CommandArgument='<%# Container.DisplayIndex %>' CommandName="Disable">Disable</asp:LinkButton>

<asp:LinkButton ID="lnkEnable" runat="server" CommandArgument='<%# Container.DisplayIndex %>' CommandName="Enable">Enable</asp:LinkButton>

</ItemTemplate>

</asp:TemplateField>

Now in rowcommand event write like this

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)

{

if (e.CommandName == "Enable")

{

int RowNo = Convert.ToInt32(e.CommandArgument);

LinkButton lnkDisable = (LinkButton)GridView1.Rows[RowNo].FindControl("lnkDisable");

lnkDisable.Enabled = false;

}

if (e.CommandName == "Disable")

{

int RowNo = Convert.ToInt32(e.CommandArgument);

LinkButton lnkEnsable = (LinkButton)GridView1.Rows[RowNo].FindControl("lnkEnsable");

lnkEnsable.Enabled = false;

}

}

 


Please Mark as Answred If This Blog has Helped You.


Regards
Mitesh Darji
http://www.indianic.com
http://www.mitatdotnet.blogspot.com
0
Mitesh_Darji
10/20/2008 9:30:36 AM
Reply:

Similar Artilces:

grabbing value of a particular column of the selected row on pressing Select Button
Hi, I'm new to ASP.net. using ASP.net 1.1and c# as my programming language.I have a select button column on my datagrid. If I click it, I need the text in the second column of my datagrid to be grabbed so that I can display it on a label somewhere else in the form.for example, my datagrid looks like this..               xxxID       xxxName        xxxLocationSelect      123           ABC         &nbs...

How to retrieve data row and hiddenField values in <TemplateField> GridView and show it in a TextBox by clicked on each row not Select Command button
asp:GridView ID="GridviewHelpdesk" DataSourceID="srcTransfers" DataKeyNames="IDHelpdesk"    AutoGenerateColumns="false" GridLines="Horizontal" runat="server" AllowPaging="true"    BorderWidth="0px" BackColor="White" CellPadding="2" CellSpacing="0" BorderStyle="None"    BorderColor="#CCCCCC" Font-Names="Arial" PagerSettings-Position="Bottom" PagerSettings-Mode="Numeric"    Pag...

Select a gridview row without a select button
Hi Does anyone have a vb code sample of how to select a gridview row without having to click on a select button?   Thanks    ASPX <asp:label id="Label1" runat="server" /> <asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" datakeynames="ProductID,ProductName" datasourceid="SqlDataSource1" style="margin-top: 12px;"> <columns> <asp:boundfield datafield="ProductID" headertext="ProductID" readonly="True" sort...

How to access the row cells value of gridview on Select button click in Gridview
Hi Friends I am trying to getting the Row cells value on the Select command click. PLz any one know then reply me.  just add the code below between <Columns> element<asp:CommandField ShowSelectButton="True" />  then in you code add GridView1_SelectedIndexChanging events . inside the events you can get te id either  by writig id=GridView1.SelectedRow.cells[0].tostring or temp string= ctype(GridView1.Rows(e.NewSelectedIndex).FindControl(controlname),label)).textnote : assume that the ID is handled by label control in your datagrid.good luck&quo...

Gridview paging enabled. Has checkbox to select the row . If user select the checkbox on one page and move to 2nd page to select the rows there also to export the selected rows to excel. But doing so
HiI am using Gridview and that has paging enabled. Using checkbox to select the particular row of the gridview to export the selected rows to the excel . Everything is working fine except for one case.Let user selected the "check" box for, five rows which user would like to export to excel (two of rows on page 1 of results and 3 of them on page 2 of results), however it only exports the 3 row details from page 2, because it seems to de-select the 2 rows from page 1 when I move to page 2 and vice versa. The code i am using is as :protected void BtnExcel_Click(object sender, EventArg...

How do I select a row using a button that isnt the select command button
I have an 'UP' and 'DOWN' button by the side of a gridview. When i click 'UP' or 'DOWN' the row swaps places with the row above or below which is correct. However i want the row that moved to continue being selected so that i can keep pressing the 'UP' button to move the row rather than having to select the row click 'UP' then select the row then click 'UP' and so on. I need a line of code that changes the selected index up or down when i press the 'UP' or 'DOWN' button. But the events available to me when clicking on...

change row color when i click on select button in gridview?
hi can anyone give me javascript function to change row color when i click on select button in gridview. here i need to change color of the row which i selected in gridview?pavankumar There's no need for javascript:   <SelectedRowStyle BackColor="#FFFF66" /> </asp:GridView> Steve Wellens My blog thnx for the quick reply wellens but initially im changing the first row color when im binding the grid.so when i click on select button in gridview of certain row i need to change color only for dat row n want to assign other rows with the default...

Problem in GridView Row Selection without using Select button
Hi All, I want to Select a Gridview Row without using Select button, So i have used following Javascript in Row DataBound Event.... e.Row.Attributes["onmousedown"] = ClientScript.GetPostBackClientHyperlink(this.grdDocs, "Select$" + e.Row.RowIndex,false); It is working fine. But the page is refreshing every time when i select a row. how can i avoid that....? Using an UpdatePanel is one option, off the top of my head,C# <---> VB.Net Translator I am not using Ajax here. Can't i do with Javascript...? Row selection in a Grid is only handled server-side...

Selecting a gridview row and keeping the last selected row in a gridview highlighted after mouse moves over a new row.
What is the best way to show a gridview row highlighted once selected and keep it highlighted once the mouse moves over a different row? Thanks, Steve hi,you can use <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="#FFFFFF" /> plz let me know if i misunderstood you Thanks for your help. One problem; however, is that after the row has been selected and I check the "grid.SelectedIndex" it has a value of -1 and not the index of the row that was selected on the grid. What do you recommend? Thanks, Steve hi, sorry i din...

Selecting a value from a gridview selected row
i am trying to select a value from a selected row in a gridview. the value i want to select is "workordernumber"  i have the gridview displaying a list of work orders.  the list changed depending on whether or not the person has chosen to view open, closed or all work orders.  if i am view just the open or closed work orders it is obviously not showing every single work order number and there are some gaps in there.  when i try to select the value of the work order number cell with the select button it is acting kinda funky.  it is selecting the index value instead o...

How to select a row without select button
Hi. I am use one Dataview in My Web site Now i Have 2 boubts , 1.How to get a Datagrid item values(All row values)in pageLoad event 2.How to select a row without using Select Button, i want to select a row on mouse click event Please give me a soulation TO SELECT A ROW ONCLICK: Firstly, you will need to enable row selections for your datagrid. this will place the proper javascript in your page for what is to come.  This will place a select button on your page, but you can convert that column into a template and make the linkbutton visible=false. you need a OnRowCreated ev...

change selected index in gridview without clicking the select link/button
Hey guysI’ve a question regarding gridviews and Urls.Assuming I’ve a URL like that http://yourdomain.com/pagename.aspx?GUID=0a502fda-3e41-4f3b-8407-7024dda832a8According to the guid in the URL I want a certain row in a gridview which has the giud as value in some column.Getting the guid from the URL isn't very complicated so far.  protected void Page_Load(object sender, EventArgs e) { System.Uri url = new System.Uri(Request.Url.ToString()); System.Guid _guid = Guid.Empty; if (Request.QueryString.Count != 0) { ...

How can I select a row without clicking "Select" button
Is it possible to select a row by clicking anywhere in the row of the data grid. What I would like to achieve is to put the datagrid in edit mode by cliking anywhere in the datagrid row. Thanks for any help, Remzi Hi! This link to MSDN should help ya out. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchTopQuestionsAboutASPNETDataGridServerControl.asp mingz p/s the very useful link above was originally posted by colt in a different thread so thank him and not me :) http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=3383...

selecting row in gridview by clicking anywhere in row (not just on 'select' link)
Hi there- I would like my gridview to behave such that a click anywhere in the (whole length of the) row would act just like clicking the "select" column link. Anyone have any code or suggestions?   You could use: ( but you would also need to disable event validation ) <%@ Page Language="VB" EnableEventValidation="false"%> Protected Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then e.Row.Attributes.Add("onclick", "javascript:__doPostBack('GridView1','select$" &...

Web resources about - Iwant to select a row and column in gridview with select radiobutton. but No checked change event.below put a button .if click that button to seleced row values will select - asp.net.web-forms

'android-widget' tag wiki - Stack Overflow
Q&A for professional and enthusiast programmers

dBase - Wikipedia, the free encyclopedia
dBase II was the first widely used database management system (DBMS) for microcomputers . It is a relational database management system. It was ...

Perl/Tk Menus: Past, Present and Future - The Perl Journal, Summer 1999
Whether they drop down as rectangles or pop up as pies, menus are widgets that managebundles of related information. Menus are pervasive, appearing ...

Index - 2,000 Things You Should Know About WPF
Below is a list of all posts created so far for the 2,000 Things You Should Know About WPF blog. Total number of posts = 1,077 Animation #7 - ...

Moonify UI - 365psd
Join our growing community of Photoshop users. Sign Up or Log In 365psd Download a free psd every day. Collections Contributors Premium Files ...

Learning Mobile Development - Android and iOS Lessons For Beginners
... Android and iOS Lessons For Beginners Menu Skip to content Home Android Tutorials IOS Tutorials Contact us Search for: Customize RadioButton ...

Basic4android (Basic for Android) - Android programming with Gui designer
Basic4android (Basic for Android) is a simple and powerful development environment for developers of Android applications.

Bravenet Webmaster Resource Center - Scripts, sounds, art and more
Cheap web hosting and free web tools. Build your website with our easy webpage builder, web tools, web services, and free website content.

Gchat - Home
Gchat - is easy to use program, suitable for communicating with friends. This non-commercial program that you can change it as you like. Program ...

Microsoft readies Silverlight 2 beta
Featured in Version 2 is a cross-platform, cross-browser version of the .Net Framework, a Microsoft official said.

Resources last updated: 11/30/2015 11:11:45 PM