Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


How To Make GridView Column Read Only / Editing Whole Row Of The Grid Is In Editable Mode?

I am using Gridview and on that data is binded conditionally.the problem is that at the time of editing whole row of the grid is in editable mode and i want only few of the columns editable. my code is as follows


View 4 Replies (Posted: Jun 2 10)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Forms Data Controls :: Make Editable Grid View
i have createdan application which shows records from the database i haveto makemy grid view editable so that it will reflect into the data base

Posted: Sep 21, 2010 11:41 AM

View 17 Replies!   View Related
Forms Data Controls :: Gridview Column Read Only In A Grid View And Do An Update?
Why can't i have a column be read only in a grid view and still do an update?

I have a partnumber that I am showing in my grid view, I only want the price to be updatable, not the part number, but If I set the part number to be read only my update does not work as it says the part number was not provided.

But i of course need to have the part number so it knows what to update, but I don't want the part number to be editable in the grid view.

How do I then still update the DB and not allow the part number ot be changed in the grid view?

Posted: Nov 03, 2009 02:32 PM

View 3 Replies!   View Related
C# - Make A Specific Column Editable Upon Clicking Edit?
I have a gridview with "Edit Update Cancel" command field. When I click Edit, all the columns in the particular row becomes editable. I just need to have 2 specific columns editable. How is that made possible ? (Screen Shot Attached) [In the screen shot all 3 columns are editable, I just need the second and third to be editable]

Posted: Jan 22 at 16:44

View 2 Replies!   View Related
Get All The Rows Of Gridview To Be Editable Mode?
Getting all the rows of Gridview to be editable mode.

Here is Gridview Source..

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ods"
DataKeyNames="abc" EmptyDataText="There is no entry..." AllowPaging="false">


like I have 10 rows in gridview, I want to show all the rows in editable mode.

Posted: Jan 18 10 at 5:00

View 3 Replies!   View Related
Forms Data Controls :: Gridview Editable - Save Record - Columns Not Editing
I am using 3.5 and in a page i want to make 3 coulmns editable. I don'twant to add Edit button. I have Save Button, which i want to use save all the record.


When I am running the page coulmns are not editable. How can we make editable coulmn.

Posted: Jun 22, 2010 02:31 AM

View 3 Replies!   View Related
Editable Column In Gridview?
I created an ASP.NET 4 columns gridview programmatically using VB.NET. The first two columns are bound to checkboxes and a database. When the user selects one or more checkboxes the database information populates the first two columns. I want the user to be able to enter data into the second two columns' rows. Is this possible and, if it is, how is it accomplished? Following is the code for the gridview:


Posted: Nov 9 09

View 9 Replies!   View Related
Forms Data Controls :: Make Editable Data Grid?
I want to make datagrid as editable i.e when I click New button then in the grid automatically one row should be added so that I can enter data into that and then click save then the new row should be saved.

Posted: Dec 23, 2009 11:54 AM

View 2 Replies!   View Related
Gridview - Highlight The Row When In Editing Mode?
I have the following code in codebehind.I used Gridview "showEditButton"commandbutton.the following code doesn't work all the time.

for example, when i click "edit" link for a row on the first time, it's doing the highlight. then I update it by press "update" button. But now I go to next row, I click on "edit" link,the highlightdoesn't work the second time.


Posted: May 21, 2009 02:56 PM

View 5 Replies!   View Related
Web Forms :: GridView - How To Make Editable Columns As Dropdownlistbox
I have an editable GridView and I would like to add dropdownlistbox for editable columns. Is there a way to do it? I want to bind the data also so the dropdownlistbox comes with values.

Here is a sample source code:


Posted: Mar 24, 2011 12:53 PM

View 3 Replies!   View Related
Forms Data Controls :: How To Make Editable Gridview
I want to make an editable gridview with 4 boundfield. When a row is selected, I want to edit the value of the 2 boundfield. Can I use edit, update commandfield?. Because when I tested it, all the columns of the selected row becomes editable.

Posted: Feb 28, 2010 08:42 AM

View 4 Replies!   View Related
Forms Data Controls :: Make The ImageField Read Only When Changing DetailsView To Insert Mode?
I have someImageField in my DetailsView and when I changed itto Insert mode thenImageField is also became the textbox that allow you to type something, and my question is how I can make ImageField to be read only when I changed DetailsView to Insert mode?

<asp:DetailsView ID="dvNew" runat="server" AutoGenerateRows="False"
AllowPaging="true" DataKeyNames="ID"
DataSourceID="DataSourceNew" Width="600px" Font-Bold="False" AutoGenerateInsertButton="True" >
<asp:BoundField DataField ="name" SortExpression ="name" HeaderStyle-ForeColor="Black" > </asp:BoundField>
<asp:ImageField DataImageUrlField="Image1Path" NullDisplayText="No Image"
ReadOnly="True" ItemStyle-Height="250" ItemStyle-HorizontalAlign="Center"
ItemStyle-VerticalAlign="Middle" ItemStyle-Width="250" >
In my code file
protected void Page_Load(object sender, EventArgs e)
DataSourceNew.Selected += new SqlDataSourceStatusEventHandler(DataSourceNew_Selected);
protected void DataSourceNew_Selected(object sender, SqlDataSourceStatusEventArgs e)
if (e.AffectedRows == 0)

Posted: Jan 17, 2010 05:55 PM

View 4 Replies!   View Related
Forms Data Controls :: Gridview Editing Goes Into Edit Mode Again?
I have a gridview with a edit button for each row. Selectingan edit button changes the row to Edit mode. When in Edit mode, the row ID's are not being captured correctly. Any row I select defaults to one of the first 2 rows I had selected earlier.If I first select Row 1, it puts that in edit mode. When I "Cancel" out of it, row2 goes into Edit mode. Now, when I select row 3, row 1 goes into edit mode again. From this point, any row I select puts either row 1 or 2 into select mode.

Posted: Nov 12, 2010 09:37 AM

View 3 Replies!   View Related
Forms Data Controls :: Make A Gridview Editable Programmatically - Per Row
I have a gridview with bound fields and a templateFieldthat receives data from a submit button which, depending upon the selected object, i.e. dropdown 1, 2, or 3, return a result set. The gridview also has a checkbox column which is used as a marker to determinie the rows to be added to and existing table. If a user selects multiple row, those rows arewritten to the database. Everything works.

Now, I need to add additional functionality to the gridview:

Uponselecting the checkbox, programmaticallythe accompanyingrow must become editable; for each row presented.

Deselected the checkbox, return the gridview row to a read-only state.

There are 14 columns, one of which is a dropdown which needs to maintain its default value.

Posted: Nov 03, 2010 08:30 PM

View 1 Replies!   View Related
Forms Data Controls :: Make Gridview Row Partially Editable
I am displaying data in GridView(5 columns) from a single table Contacts which has a primary key column,ContactId.In the gridview i want to give the user option to edit rest of the columns apart from the primary key column.How to go about it?.

Posted: Dec 11, 2009 07:16 PM

View 1 Replies!   View Related
Forms Data Controls :: Make Gridview Row Editable On Redirect
I have two pages; one page similar to a 'dashboard' displaying an incoming correspondence gridview and the other page 'incoming' displaying the same gridview of incoming correspondence. So my dashboard page is just a snap shot of what some pages have. So there are main pages that are being summarized in the dashboard. What I want to do with the Incoming gridview in the 'Dashboard' Page is once a user clicks a row in that gridview it obtains the correspondence id and redirects to the Incoming page and make that row in that gridview(same view or query as the gridview in the dashboard) editable.

What I have right now is I am obtaining the correspondence id for the row selected and redirecting to the Incoming page but have noo idea how to make that row editable in the gridview in the Incoming page.

Posted: Jan 07, 2011 03:56 AM

View 5 Replies!   View Related
Forms Data Controls :: Creating An Entirely Editable Column In A GridView?
I am looking for a way in which to make a column in a GridView editable.

Currently i am looking into overriding the GridView so that the whole view is editable andthen making all the columnI do not want to be editable,read only.

I'm sure there is a better way, but I cant find it.

Posted: Jan 25, 2010 04:43 PM

View 1 Replies!   View Related
Forms Data Controls :: HorizontalAlign.Right For GridView In Editing Mode Is Not Working?
I am using SQLDataSourcewhich I am using for myGridView "UGrid".

When I click edit, I want numerical data to be aligned on the Right. I have the following codebut its not working.



Posted: Feb 14, 2010 03:52 AM

View 10 Replies!   View Related
VS 2005 GridView Update - Make Editable - All Active Fields Unchecked
I am using GridViewand bounding values from 2 tables. tbl_login and tbl_register. In tbl_register Table the Field is UserName In tbl_login Table the Field is Active(yes/no field) I used this command to show the fields into the gridview.


SELECT tbl_createuser.UserName, tbl_createuser.Role, tbl_login.Active FROM (tbl_createuser INNER JOIN tbl_login ON tbl_createuser.UserID = tbl_login.UserID1) ORDER BY tbl_createuser.RegistrationDate DESC

Initially when the user register, his account is inactive. The admin only wants to make the account active. After showing the fields in gridview, how to make it editable, initially all the Active Field is unchecked, so when the admin checks it, it must be updated to the database?

Posted: Dec 23rd, 2009, 08:21 PM

View 26 Replies!   View Related
Forms Data Controls :: Make Editable Gridview - Add - Update - Delete
I've gotmy data in the gridview via:


Now I need tomake all the data editable (add, update, delete).Why isn't the Gridview the same as DataGridView? With the DGV,the data showed EXACTLY as it did in the database andone couldadd a record,edit a record, or delete a record.

Posted: Feb 24, 2010 01:58 PM

View 2 Replies!   View Related
Forms Data Controls :: Binding A Gridview From Session - Make Editable
In my project i am binding a gridview from session and i want to make it editable. i handled the rowediting,rowupdating and cancelediting event as suppose to and at run time i bound my data to the grid cells in the rowdatebound like this

if (e.Row.RowType == DataControlRowType.DataRow)
{ RequiredPaper paper = (RequiredPaper)e.Row.DataItem;
e.Row.Cells[0].Text = paper.PaperDesc;

and every time i click on the edit link in the grid view the cell never turns in the edit mode so i can not edit it!

Posted: May 31, 2010 02:19 PM

View 4 Replies!   View Related
Forms Data Controls :: How To Update Row On Editable Gridview Depending On Two Column
Solved like this

currentID = Convert.ToInt32(GridView_ABC.DataKeys[0].Values[0]);
activityName = Convert.ToString(GridView_ABC.DataKeys[1].Values[1]);
DataRow row =
originalDataTable.Select(String.Format("EmployeeID = {0} AND ActivityName = '{1}'", currentID, activityName))[0];

Posted: Jun 29, 2010 10:54 AM

View 1 Replies!   View Related
Forms Data Controls :: Can Select Multiple Rows In Gridview Editing Mode
I have a Gridview in default edit mode so that we can select a particular row to edit. Hoever, as you know it takes many steps:-

1) Click Edit,

2) Change record

3) Click update

4) Select next record to amend.

Only one record can be amended and we have to save each time one by one.

Is there a way to let all entries in the Gridview (or any other relevant control)to be editable at same time and then allow select all ? and save all ?

If this is not possible. How to make use of select to do this:-

I have a Gridview of many rows that need to be highlightewd. I want user can select multiple rows and for rows selected, highlighted and there is s save button onclikc will update a field (eg checked) for selected row as "Yes".

Posted: Oct 22, 2009 01:17 PM

View 5 Replies!   View Related
Forms Data Controls :: Gridview - Make All The Row Editable When User Click This Button
I am working in a page, Where I have a button "Edit Grid". I would like to make all the row editable when user click this button.

Posted: Aug 25, 2010 07:26 AM

View 4 Replies!   View Related
Forms Data Controls :: How To Make Number Of Editable Columns Of Gridview Depends On A Textbox Value
I have a Gridview with 12 columns, Jan, Feb...Dec.

Ihave a textbox valuethat could be 1, 2,...12

I want if textboxvalue is 7, then column Aug-Decin Gridview is editable whenin update mode and the column in Jan-Jul is not updatable (eg make itlabel instead oftextbox).

Howcan I do this ?

Posted: Oct 04, 2010 03:28 AM

View 3 Replies!   View Related
Forms Data Controls :: Make Gridview Rows Editable On The Click Event Of A Button
How to make gridview rows editable on the clilck event of a button.

Posted: Sep 20, 2010 05:19 AM

View 3 Replies!   View Related
Forms Data Controls :: Make A GridView Column Invisible If Every Cell In That Column Is Empty?
No sense in showing a competely blank column. how to make a GridView column invisible if every cell in that column is empty?

Posted: Mar 04, 2011 11:07 AM

View 3 Replies!   View Related
Custom Server Controls :: Show Multi Column Gridview With Editable Controls?
Any oneknow any open source user control that is similar to gridtreeview.Basically, I want to show a multi column treeview that when expanded, user can editcertain column values. The columnscan have a text box or dropdown etc.

Posted: Nov 16, 2010 09:04 PM

View 8 Replies!   View Related
Forms Data Controls :: GridView Editing Not Working Properly After Sorting On Any Column
whn i click edit button on grid before sorting on any column it is working properly...but once i click on any column for sorting n thn click on edit then the rows get sorted again and edit is set on some other row... plz help me...herez my code..

protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
gv_photo.EditIndex = e.NewEditIndex;
public void bindgrid(string sort)
string str = "select * from tbl_Album";

Posted: Jun 02, 2010 06:13 AM

View 2 Replies!   View Related
MVC :: How To Create Editable Grid
i am working in MVC & want toshowdata in asp:gridview &also want that on mouse click on any row that row becomes editable.

Posted: Nov 09, 2010 07:00 AM

View 9 Replies!   View Related
Forms Data Controls :: How To Make Gridview Wider When Not In Edit Mode
In Gridview1When I look at the screen (IE8)the checks in checkboxes that are checked are very faint- almost not visible.When I go to edit mode they become darker. How do I make them darker when not in Edit mode?In Gridview1 the column widths for phonemobile and phone home are too narrow.When I go to edit mode they become wider. How do I make themwider when not in Edit mode?


Posted: Oct 03, 2009 07:16 PM

View 4 Replies!   View Related
Forms Data Controls :: Display A Radio Button In The Editable Mode Of A Detailsview?
I'm really struggling with this. How do I display my data with radio buttons in a detail view and bind it to my datasource like I've done with the textbox? The database values are int {yes = 1, no = 0, na = -1}. I want my user to be able to quickly update the radiobuttons instead.I'm working in C#.

<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Electrical_Panels_Fastened_Securely") %>' ></asp:TextBox>


Posted: Jan 19, 2010 08:49 PM

View 2 Replies!   View Related
Marks Upload Using Editable Grid
I need to save the marks in database for each student...I have one drop down list..In this drop down contain 2 std 3 std 4 std, etc..if the user click 2 std ,2 std subjects are display in the grid with textbox for marks upload...If the user click 3 std, 3 std subjects are display in the grid with textbox...and also save the entered marks into database..and i need to edit the marks.

Posted: Mar 15, 2010 06:08 AM

View 1 Replies!   View Related
MVC :: How To Do Handle Editable Grid With Textboxes
Is there any sample shows the best way to create an editable grid with textboxes, so when user clicks on the save button, the entire grid's textboxes are posted back to controller and bind to its model? I prefer not using any 3rd party grid such the one comes with MvcContrib.

Posted: Sep 21, 2010 03:33 AM

View 2 Replies!   View Related
MVC :: Editable Jquery Grid For Asp 2 - Link?
can you send the link where does i get the editable jquery grid for mvc2.

Posted: Nov 11, 2010 04:17 AM

View 1 Replies!   View Related
Free Editable Grid Component For MVC
I've seening quite a few posts on here regarding grids, but nothing specifically asking for a free grid component that supports editing. Has any body come across such a thing? Is there a JQuery pluggin that I could use? If not has anybody got any pointers on a good approach to writing my own (using mvc2 and/or jquery)?

Posted: Apr 15 10 at 12:25

View 1 Replies!   View Related
Datagrid - Editable Web Data Grid
a customer asked me for a web app, written in ASPNET, that can use an editable grid (that works with a SqlServer DB) in the similar manner as Excel works; i can use gridView with Edit link in every row but i wanted to know if there are better solutions (possibly free..) that i can use.

Posted: Oct 25 10 at 7:55

View 1 Replies!   View Related
VS 2005 GridView Read Second Column
i have a Gridview and i want to read its second column's value from begining to end i wrote this code but i dont know how i can call this SUB i want this code to be in a SUB if the code is wrong pls make this code correct

Private Sub ReadStudentName(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs)
End Sub

Posted: Jun 20th, 2009, 11:39 AM

View 2 Replies!   View Related
Forms Data Controls :: Variable Column Name In GridView Edit Mode?
I haveimplemented globalization in my website by using Global Resources. I thought of implementing it not onlyon controls but in database fields. So for somecolumns which would be single columns in normal conditions, I considered multiplecolumns for different culture. For example if therewas a[Title] column, I replaced it with [Title-en-US], [Title-en-GB], [Title-es-ES] and etc.I have a web page with a GridView control that displays the content of that table. Ina normal case (without globalizing), I would have a TemplateField in the GridView like this:


I have columns for each culture defined in the system so that based on the user's choice, I display that corresponding column content.My question is I have no idea what I should set the Text and SelectedValue properties in HTML code above.Something like this: Text='<%# Bind("myTable.[Title-" &#43; TheSelectedCulture &#43; "]") %>' !!!!!

Posted: Oct 23, 2010 02:47 PM

View 3 Replies!   View Related
Can Make A Textbox To Not Editable
In asp is it possible to set a property that disables it from being editable? for example i want to do something like

txtBox1.text = constant1
txtBox1.editable = false

Posted: Apr 22, 2009 07:00 PM

View 8 Replies!   View Related
Copyright 2005-08, All rights reserved