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

Top 5 Contributors of the Month
Post New Web Links

How to have all rows of a datagrid editable (ASP.NET 1.1)

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
HelloI have a datagrid and I would like to know if there is a way to make all rows editable, currently now I have the user selecting a checkbox on the leftmost column that makes the row editable (using the EditItemIndex property). Thanks, 

View Complete Post

More Related Resource Links

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Cutting Edge: Moving DataGrid Rows Up and Down


Imagine opening your Inbox one morning and finding a message that reads "Dear Mr. DataGrid, I urgently need an ASP.NET DataGrid that lets my users move rows on the client. You're my last hope. Will you please help me?"

Dino Esposito

MSDN Magazine March 2005

DataGrid editable

Basically the idea is to have the excel spreadsheet effect. How do we make a datagrid editable?

fully editable datagrid in asp.net

I need to create 50*4 matrix of text boxes to accept values from user in an asp.net page. its very difficult to mannualy add each text box and write code to handle them.Please suggest me some thing. can it be done using fully editable datagrid, please suggest me some linksthanks

Editable Header for DataGrid

Hi I want to have  wpf datagrid header   editable.   How can i add textblock or input field in datagrid header  

ASP.NET Events and Pageload not firing when Datagrid containing large number of rows of data

Hi All, I have a datagrid in aspx page.Inside of datagrid i am using around 15 controls such as Button,dropdownlist and text box controls.Once the datagrid binds then the events in the aspx page not firing.Issue occured when the number of rowsgreater than 500.The number of rows less then its works fine.If anybody knows the solution please let me know."Platform i am working on ASP.NET1.1"Regards Hareesh

How to sum a column in a datagrid for just the multiselected rows?

I have a WPF4 datagrid, populated via linq to sql, which has some numeric fields. How do I sum the value of one of these fields for just the selected rows? (multiselect is turned on)  

Showing thousands of rows in datagrid, need cursor to wait while loading rows

I´m creating DataGrid columns dynamicly in C# and loading data into a list at the same time. Cursor is waiting at the same time. Now, after columns are created and data is loaded into a list. I set the myDataGrid.Itemssouce = mylist; Cursor=Curosrs.Arrow; Andafter that, I set the Cursor to arrow again as you can see. But when the list contains thousands of rows it takes about 5-10 seconds for the datagrid to show the rows. Its ok but I need the cursor to be in waiting stage allso while data is not shown but the cursor is not waiting, its arrow. Any suggestions, please?

Adding new rows to Datagrid with a Combobox column generate "two-way binding requires path or xpath"



    I have datagrid control with a template combobox column like:

 <DataGridTemplateColumn Header="Fault code" Width="75">
                                    <TextBlock Text="{Binding FaultCode1}" />

WPF Datagrid SelectionChanged event is triggering Multiple times while loading the rows.



When i use DataGridComboBoxColumn in my WPF DataGrid, the DataGrid SelectionChanged event is triggering multiple times based on the number of rows while loading the rows in the WPF DataGrid.

How can i stop this? Because of this I am facing Performance issue.



Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This will help other members to find the solution easily.

iterate throw rows of Template Column in Datagrid



I am using WPF DataGrid (VS 2008). i am using Template column with a button in it i want to change the content of the button(Caption) when it is clicked .i am doing it in its click event ,but it  changes the content of only the button clicked(only one row). i want to change the content of button in all rows.

how can access the button instance of all rows in this template column.



Iterate the rows in the datagrid and compare it with the systemclock



How would I iterate the rows in the datagrid? The 4th column contains the time, I would like to compare it with the systemclock and enter "ACTIVE" in the 5th column if the time value in the 4th column is equal to the system clock?

I tried FOR EACH.. but I can't get it right.. Please help.

WinForms: Filling Rows in DataGrid Using Threading and yet gridcontrol should be responsive.


WinForms Application. C#, .NET 3.5.


I have a function with searchs data into a non RDBMS Source, collects data and Inserts each found records into DataSet and finally it returns DataSet to main module.  The main module binds returned Dataset to WinForms Grid Control.  When user click on any row, it should display details of selected row.

The search takes quite long time and hence i want to use threading such that as the function find the data it returns the data to main module and main module adds the data into a DataSet object which will be already binded to Grid Control. The Grid control should automatically refresh itself as he finds new data in its underlying databset.  While search is going on the Grid control should remain responseive so that when user clicks on any row, I can call anothr function to retrieve details of the selected row.

I tried using BackgroundWorker still the UI freezes. I observe the grid control does not refresh itself and is non-responsive.

Please guide on how to achieve this and I would really like if there is any sample on similar lines with GridControl.







Datagrid Read Only Rows


Hi All, I wonder if I could pick your brains.

I have a wpf datagrid and want to make ROWS disabled/read only if a certain value is in the row. i.e. Date Approved present therefore row cannot be edited.

Is that possible? Many thanks Scott

programmatically add/edit datagrid rows



I'm new to WPF, and I'd like to add rows with data at runtime, and edit data manually in a DataGrid, just as it was possible to do with the WinForms DataGridView.

WPF DataGrid control is really awesome, but lacks some simplicity and generality of WinForms, like unbound data...

Can someone please give me a hint?



WPF: Binding Dictionary to DataGrid and making it editable.



Basically, I would like to make  "Property Editor" using Dictionary and DataGrid by storeing "properties" (key&value pairs) into Dictionary and DataGrid to display and edit. 

I was able to successfully bind using below code.

It displays Key&Value pairs fine in the DataGrid but it won't allow me to edit the Value.

It says, "EditItem is not allowed for this view"

How can I do this using DataGrid and Dictionary?

Is there better way to make property editor with FLEXIBLE number of properties?

I emphasized "flexible" because the property entries/definition can frequently change and I thought Dictionary was perfect for this.

Thanks a lot!


 <DataGrid Name="PropertyGrid"
      				<DataGridTextColumn Header="Name"
 Binding="{Binding Path=Key}"
      				<DataGridTextColumn Header="Valu

Drag & Drop expander group / rows in datagrid



I am wondering how I can find some help, sample about reordering datagrid rows by using drag & drop feature.

In my case, I have a grid (.NET 3.5 gridview in a listview or WPF Toolkit Datagrid) bound to a CollectionViewSource with 2 propertyGroupDescriptions (Category/Sub category)

I need to be able to reorder rows either by using drag & drop on rows or on group descriptions (represented by expanders)

I've past my day with my friend google to find some info, but without any success...:(

Someone have already done this ?

By advance, thank you for your help


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