Could anybody help me about How to Get the Cell value from Gridview Control while I use Mouse Click on one Cell?

Hi Sir,
    Here goes my question,I'v drag a Gridview control and binded data to it ,I'm thinking ,Can I get the value from the Cell which I used the mouse  to click on it ? Thanks for your kindly help.

8/18/2005 6:45:21 AM 72751 articles. 3 followers. Follow

6 Replies

Similar Articles

[PageSpeed] 27

Edit Columns in the Smart Tag
then on the column use want to use click the "Convert to a Templated Field"

Now Click OK

Go back to smart tag, and Edit Templated field,
On the Field you want to change, Item Template, you delete the Label Field and add a HyperLink

When you add the hyperlink, a smart tag will appear asking you to "Edit DataBindings", click it.

Now choose your text field property.
Then choose your URL Property and write


Where "Folder" = your folder name
and detailspage.aspx = your details page

On the DetailsView or FormView, Make the SQLDataSource Where clause = Querystring , and Parameter = id

Thanks Scott
8/18/2005 12:53:22 PM
Firstly ,Thank u sir.
But this is not want I wanted.
My question is How can I get the Cell data from binded Gridview which could handle the MouseClick event?
The GridView which binded to a SqlDataSource will show us Columns and rows on the page ,I don't knwo which cell will be clicked by the remote user , I should handle the Click Event and get the clicked cell  value and make the cell editable (if the remote user clicked on a cell ) that is What I want to handle.

Thanks for ur help Scott,I'll try Template Field,Could anybody give me some other tips ?

8/19/2005 12:47:19 AM
Could anybody help me about that ?No one can give me any tips at all?
8/24/2005 1:03:53 AM

let me understand this you want it so that if anyone were to click a cell it would show a textbox in the cell that can be edited?

8/24/2005 9:42:35 AM

Yes sir,That 's it .Could u give me some tips ?


8/25/2005 4:33:10 AM

I'm thinking something alone the lines:

Every column in your gridview would have to be a template field that would have 2 controls. A hyperlink field and a Textbox. The text box's visibility is set to false.everytime someone clicks one of the hyperlink field you would have to find 2 things...the row and the column. once you have this you can make the textbox in that row and in that particular column visible.

- SH

8/25/2005 11:09:32 AM

Similar Artilces:

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

Issue with getting values from child controls in a gridview, to use for the update using a SQLDataSource control
Hi all, I have a gridview bound with a SQLDataSource. I am using the Update feature of the SQLDataSource to update a SQL Server database with values entered into the gridview. However I am not getting it to work. I believe this is due to the controls that contain the user entries are not the gridview itself, but rather child controls within the gridview. I have been using the names of the actual controls but nothing happens. Upon submit, the screen returns blank, and the database is not updated. Here is some code:   <asp:GridView ID="GridEditSettlement" runat="server" AutoGenerate...

Use different backcolors for GridView control depending on the value of the cell
Hello,here is the GridView control: <asp:GridView ID="gvTable" runat="server"  AutoGenerateColumns ="false"HeaderStyle-CssClass="middle_menu_bg" HeaderStyle-Font-Size="Small"RowStyle-BackColor="#FFFFFF"AlternatingRowStyle-BackColor="#EEEEEE"GridLines="None"BackColor="#FEFEFE"CellPadding="3"CellSpacing="2"ShowHeader="true"OnRowDataBound="gvTable_RowDataBound" ><Columns><asp:BoundField ReadOnly="True" ItemStyle-Font-Bold=...

How to get cell values when GridView is bound with Template Control Fields
Hi, I have following GridView <asp:GridView ID="gdvProcAdmin" runat="server" AutoGenerateColumns="false" AllowSorting="true"> <Columns> <asp:TemplateField HeaderText="ID" Visible="false"> <ItemTemplate> <asp:Label ID="lblID" runat="server" Text='<%#Eval("ID")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Category" SortExpression="Type"> <ItemTemplate> <asp:Lab...

Group of buttons but only one is clicked, uses CSS for clicked ones. How to do get this effectusing AJAX controls.
I am new to AJAX , I have a ASP.NET page with a group of buttons, by default one button has to be shown as clicked, and rest not. If I click other button from the group, it has to be shown as clicked, and rest as not. This means at any given time one button has to be clicked / or selected. There are other Textbox that need to verifyed and process button to go to next page. I am using UpdatePanel for buttons, I have to pass the value associated with each button and for that I do with OnCommand. My hurdel is : How to show the button as clicked without postback as it use ...

Trying to use the FAQ " Sorting and paging in the GridView control when not using data source controls "Sorting and paging in the GridView control when not using..."
and I am not getting the results I had hoped for.  I keep getting a "Compiler Error Message: CS0123: No overload for 'AdhocJobGridView_PageIndexChanged' matches delegate 'System.EventHandler'".   Here is my event handling... protected void AdhocJobGridView_PageIndexChanged(object sender, GridViewPageEventArgs e){ try { AdhocJobGridView.DataSource = wsBaseInfoArray; AdhocJobGridView.PageIndex = e.NewPageIndex; AdhocJobGridView.DataBind(); }catch (Exception ex) {throw ex; }   Here is my aspx... <asp:GridView ID="AdhocJobGridView...

Getting DBGrid cell value from moused-over cell
Platform: DXE3 Control: TDBGrid Goal: My grid has 4 columns and about a hundred rows. I want to make only certain cells clickable. I have all the fonts/underlines etc working so that the grid appears to have mostly non-clickable cells (no underline, black text), and only a few clickable cells, (hotlight colored font, with underline). I want the cursor to be crHandPoint ONLY on the clickable cells, and crDefault (arrow) on the non-clickable cells. I say "cells" and not "rows" or "columns" because not every cell in a particular colum n will be clickable,...

change one gridview cell text format based on another gridview cell value??
I have the following (I code in VB) in a datagrid nested inside a DataList: The hiddencolumn style prevents the CAB column/data field from showing in the browser. How do I make the "Consumer" datafield cell text be purple and italic if CAB is True or -1 in Access?? I code in VB, and I know the code has to be in the one of the row or data events of the gridview. Thank you, Tom Convert your Consumer to a template field with label, id = "Label1" then try using the RowDataBound event of the gridview and code something like: If e.Row.RowType = DataControlRowType.Data...

Adding row (one at a time) in gridview on a button click. And cells of added row should contain controls like DROPDOWN LIST or TEXT BOX.
Dear Friends, I am in great need for the solution/hints/guidance of my requirement, if anyone can help with.  Let me explain what I need."I need a Gridview control on a webpage having following 5 columns/fields.     Column 1: It just has a "+" button in its header only (other cells for this column is empty)    Column 2: The Column header here is "FIELD" and  it should contain dropdown list (which is populated from some database)    Column 3: The Column header here is "Operator" and  it should ...

Getting the control id of a control inside gridview control
 uhmm.. a little bit confusing regarding my subject because i dont know how to say the way my problem is how can i get the id of a control (e.g. textbox) inside the gridview... and the textbox is in the templatefield... is there any way i can get its id??  hoping i could get a reply as soon as possible... Regards,MhaeyPlease remember to click “Mark as Answer” on the post that helps you.. =) What do you want's to do by getting the id of the Text box? Do you want's to find particular Textbox with certain id ? Kamran ShahidSr. Software Engineer(MCP,,MC...

Help getting control name and value of dynamic controls
I have an application which creates a dynamic form consisting of an html table with web controls in the page. I need a user to be able to fill in this form and then grab the values of each control and save both the control name and the control value to a database. This is the Code that I have Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If not ispostback then Dim infotable As New Table Dim objparticipant As New Participants.ParticipantInfo Dim objCustomFields As New CustomFieldController Dim TypeId As Intege...

Find a control using Cells(index).Controls(index)
Hi I have a datagrid with an edit, I also have validators on other parts of the page. When I do an update on the page the validators are firing. I need to disable them when updating. normally I could use Findcontrol, however the update linkbutton has no id. So i need to do something like this:    Sub dglinks_ItemCreated(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dglinks.ItemCreated Dim x As LinkButton If e.Item.ItemType = ListItemType.EditItem Then x = CType(e.Item.Cells(2).Controls(0), LinkButton) x.CausesValidation = False ...

Edit the cell text by clicking in the cell in datagrid control
Sir,In 2.0 application, I want to edit the cell text by clicking in the cell in datagrid control. By EditItemTemplate it is possible to edit the cell text but for that we need to click on Edit button and after edit we need to click on Update button. But this way is not accepted. Is it possible in datagrid (possibly without activex control) to click in cell and edit the value and click out of the cell to update just like windows application grid?I did not find any article on web related to this.Please help me.Thanks in advance.    &nbs...

Pull a cell value from a gridview control
Hi all,  How can I pull a value from a gridview by cell reference.  In a windows forms app I would pull a value from the datagridview control as follows; dim value = Me.datagridview.item(0,1).value.tostring  Is there an equivalent for the gridview?  Thanks in advance  Alex here you will find the answer Ashrafur Rahaman

Web resources about - Could anybody help me about How to Get the Cell value from Gridview Control while I use Mouse Click on one Cell? -

GridView SelectedItem Binding Gotcha in WinRT
Last night when I was doing some WinRT hacking I was trying to setup databinding to the selected item in the GridView control and I ran into ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Advanced Search Gridview Latest News Releases All ...

CNW Group
... Services Beyond the Wire About CNW my CNW CNW Access CNW Directories Financials Webcasts Events my CNW All News Releases Advanced Search Gridview ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Add a Filter Gridview Latest News Releases All Today ...

New CmdLets of Powershell 2.0
New CmdLets of Powershell 2.0

Price Drop: Softbox
... objects- create product reflection- changing the background with something more interestingUse it as:- softbox- honeycomb softbox- gridview ...

Profile.aspx: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 25 Oct 2012 - Upcoming stories is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

View Features - ExtendASP
Call 847-681-9827 or Request a Demo View Features Testimonials Pricing About Us Coming Soon ExtendASP exposes every feature, more than any other ...

Resources last updated: 12/3/2015 7:23:05 AM