.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Gridview select

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net

Hey Hi,

I have a gridview in which i have selected the select,edit,delete command and i have done with edit nad delete command but not getting the idea that how to work on select command. Mainy i  want is once i select the current i.e on clicking on the select link my selected rows should get displayed in my label.

View Complete Post

More Related Resource Links

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

Select value in gridview


Hi, I am new to gridview. I want to make a gridview. Its row when selected should direct me to a specific .aspx page.Each row should direct to a different page. Should I use querystrings for this? Please suggest. Regards, ap.

Select all checkboxes in gridview using Javascript


Hello members,


              I have used "Check box" inside the gridview...

              I need,

                           If i select the header check box , It should select all the checkbox inside the gridview...

              I have searched in google for this coding ...I got  lot of codes but couldn't get the correct code...

              I request anyone please provide me the correct code(using Javascript) thanks...

Gridview how do you select a row and colunm


I have a buttonfield button on my gridview, when I click of the buttons on one of the rows, from colunm[0] row[0] I need to display that contents in a textbox on another div and panel. How do I do that? 

Repeater and Gridview with select button

Hello every oneI have the following issue:I have a repeater that iterates over a datasource, and each detail of the datasource has a type of control or entry method, I have an enum to represent the type of controlenum ENTRY_METHOD : byte { SINGLE_SELECT = 1, MULTIPLE_SELECT = 2, OPEN_TEXT = 3, FLEXI_SELECT = 4 }And I have this in the repeater's ItemCreated event: switch (EntryMethod) { case ENTRY_METHOD.SINGLE_SELECT: break; case ENTRY_METHOD.MULTIPLE_SELECT: break; case ENTRY_METHOD.OPEN_TEXT: break; case ENTRY_METHOD.FLEXI_SELECT: break; default: break; }This is the aspx file:<asp:Repeater ID="RptUserDefinedInfo" runat="server" OnItemCreated="RptUserDefinedInfo_ItemCreated"> <ItemTemplate> <div style="width: 30%; display: inline-block; vertical-align: top; margin: 10px;"> <asp:HiddenField ID="HddUDTypeID" runat="server" Value='<%#Eval("UDTypeID") %>' /> <asp:HiddenField ID="HddEntryMethod" runat="server&q

Use Data in a Column as Select Button in GridView

I don't want to use the built in "Select" hyperlink that's in the gridview, I'd like to just use the first data column, is there a way to do that or are we forced to use the automatically generated "Select" column.Thanks!

Result of SQL Select in Gridview

Hi All,I want to have a gridview which first column is a link to another page. For that I want to create a link text through a SQL query!I have the following piece of SQL code, to create the first column of the gridview:SELECT '<a href="Page.aspx?pr=' + CAST(tb_table.NameId AS varchar) + '">Selecionar</a>' AS Expr1,I want that code to give me something like: SelecionarInstead of that I get directly in the gridview:    <a href="Page.aspx?pr=1">Selecionar</a> If I go to the source code I see the following:<td>&lt;a href="Page.aspx?pr=1"&gt;Selecionar&lt;/a&gt;</td>What I get in the gridview, is what I want to see in the souce code, so I have the link in the gridview.Does anyone knows the solution? Thanks in advance.

GridView Select Open New Internet Explorer Window

Hi, I'm wondering if there is a built in way to take a GridView select buttons and have them open an IE window or tab and link a FormView Control to that link.Basically a Master-Details type of view, but in a new window instead of the same window.

Select necessary data from Gridview row

Is it possible to select a row without using the SELECT hyperlink/button besides I don't want to slect the entire row instead, i can select the row of the checked radio button? Based on this example image, I just want to retrieve the data from column FROM, TO, FLIGHT and the selected radio button which is PHP 2899.00.

Textbox -> Value -> Gridview -> Select Statement

Hi guys. I have textbox that searches for first or last name. Result show in gridview. But when add value in text box and push my button Find nothing happen. Here code:aspx:........ <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="MobileNum" DataSourceID="SqlDataSource5" style="font-family: Verdana" onselectedindexchanged="GridView1_SelectedIndexChanged"> <Columns> <asp:BoundField DataField="FNAME" HeaderText="FNAME" SortExpression="FNAME" /> <asp:BoundField DataField="LNAME" HeaderText="LNAME" SortExpression="LNAME" /> <asp:BoundField DataField="MobileNum" HeaderText="MobileNum" ReadOnly="True" SortExpression="MobileNum" /> <asp:BoundField DataField="HomeNum" HeaderText="HomeNum" SortExpression="HomeNum" /> <asp:BoundField DataField="OfficeNum" HeaderText="OfficeNum" SortExpression="OfficeNum" /> <asp:Bo

Retrieve data from select columns without creating Gridview etc??

I have an accessdatasource with multiple columns, one column I use it to populate a dropdownlist. Can I use the data from other columns to insert into a table,  insert being done in the aspx.vb page, without creating gridview etc.   Is it possible to make a detailsview one column visible= false and still be able to evaluate its contents? Thanks,

Dropdown select message in item template gridview dropdwon list ???

Hi ....I have used gridview item template , which has two dropdown list .The first dropdown list is binded from database to the dropdown list I have using the below code , to show the select message in dropdown list before selecting any item from dropdown list.In first row its show me --Select-- message and my vaues.. if i select some value form dropdownlist and click add new button it will create a new row dynamic then in previous row again it come back --Select-- message... on going to second row....I need to remain first row user selected value on going to next row.The New row will show --select-- message..Please go to my code and let me know what to do<asp:DropDownList id="DropDonList2" tabIndex=11 runat="server"          OnSelectedIndexChanged="DropDonList2_SelectedIndexChanged" AutoPostBack="True"          DataTextField="SizeRange" DataValueField="SizeRange"          OnDataBound="DropDonList2_DataBound" __designer:wfdid="w10"          AppendDataBoundItems="True">  <asp:ListItem Value="-1">Select</asp:ListItem> </asp:DropDownList><asp:DropDownList id="DropDonList2" tabIndex=11 runat="server" 

How to use GridView.SelectedPersistedDataKey to select a row


I thought this was easy but found the properties of GridView.SelectedPersistedDataKey are essentially read-only. I tried to create a new Datakey to no avail. Could anyone to pass a pointer to an example of how to set GridView.SelectedPersistedDataKey?

Select only one item through radi button in gridview


Hi friends i have a gridview with radio button.i need to select only one item through out gridview i have written code that is working fine but that is giving problem in paging i am displaying gridview with 5 records per page.in first page i am able to select only one item but if i move to second page here also i am able to select only one radio button in this mean time if move to first page in that page also radio button is in selected mode .How can i make only one radio button selected in through out gridview and How can i get paging data from gridview(if i select 3rd page value and i moved to first page in that situation i need to get get that 3rd page value aslo ).How can i get that data pls help me

Gridview Control Select Should Populate Second Gridview Control


Hi guys.

I am new to this forum as well as Visual Studio and asp.

I am connecting to an access db using Visual Studio Express 2010.

I have a dropdownlistbox that pulls names from a database.  When I select a name Gridview1 gets populated.  Now I want to populate Gridview2 with more data when I click 'Select' link in Gridview1 but it's not working.

I am passing name (string) and number (number) fields to the gridview2 based on the gridview1.selectedvalue property and am seeing:

Input string was not in a correct format.

Please any assistance would be greatly appreciated.

This is a very simple web app I am trying to design and my experience with Visual Studio and asp is limited.


Gridview - Update with Dynamic SELECT Command?


Hi All...

We created a GridView-based webform with Update using the design wizards - very nice and it works great.  But then we wanted to the ability to create the SELECT command dynamically based on other controls on the page.  We added something like the following to Page_Load()...

            SqlDataSource1.SelectCommand = "SELECT [StationId], [IP] FROM [Stations]";

The GridView populates normally, but the Update no longer works.  It changes the "Edit" link to "Update", gives the user the edit boxes, but when "Update" is clicked it never seems to write the new data to the database.  No error - it just doesnt work...

Any thoughts?  How can we change the SELECT command (and Connection String) dymamically and still retain the Update functionality?

Many thanks - Curt.  Code follows...

    protected void Page_Load(object sender, EventArgs e)
        //  Doesn't work with or without this conditional
        //if (!IsCallback)
            SqlDataSource1.SelectCommand = "SELECT [StationId], [IP] FROM [Stations]";

Select Row on GridView by Clicking Next button



         I have a button called Next outside the GridView. If I click on Next, I want to highlite the 2nd row and display the details of the 2nd row below in panel. If again I click on Nextm i want to highlite 3rd row and want to display 3rd row results in a panel


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend