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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

MVC: Any sample how to do handle an editable grid with textboxes?

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net
 

Hi,

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.

Thank you,

Max




View Complete Post


More Related Resource Links

Add TextBoxes and Grid in Single WebForm.

  
Hi All,   Actually i want to create Invoice Web Form Using C#, Asp.Net.But I have no idea about how to add grid view and text boxes in single form. As Text Boxes of Form will store in Invoice header Table and Item Which i have added in that should store in Item Table. (if you have any other suggestion for db structure please suggest me.)  This Form will have 8 Textboxes beside gridview and one gridview. TextBoxes are as below:- 1)Invoice Number(AutoNumber). 2)Invoice Date(will be filled Manually). 3)Customer Name(DropDown or AutoComplate TextBox). 4)Customer Address (Will  be filled as i select Customer). 5)Customer Representative(Will be Dropdown list or Auto Complete TextBox and will be filtered on Customer Name). 6)"Create" Button (It will fill the above TextBoxes Data In InvoiceHeader Table and Reserve Invoice Number and Catch ID of Invoice Number to use for Grid View.)   When I click Create Button System Will also Show me the Hidden GridView and Attached TextBoxes to Fill data in Grid. There will be  textboxes.   1) Item Code (Will be AutoComplete TextBox and Data Will be retrived from ItemTable and Only Pick Items Which are in Stock.) 2) Item Name (Will be autofilled when i select Item Code.) 3) Item Qty(Will be autofilled when i select Item Code.) 4) Item Stock Date (Will be autofilled when i select Item Co

how to make an editable grid view

  

hi all

i have created an application which shows records from the database

i have to make my grid view editable so that it will reflect into the data base 

can any one suggest me how

Regards

Roma


Textbox Editable GridView in ASP.NET

  
This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

  
In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel

  
I've posted an update to this post to apply on demand loading of Details data using ASP.NET AJAX PageMethods. I'm demonstrating the usage if CollapsiblePanelExtender client events on the new post. Check it out.

I admit, Matt Berseth is really inspiring me! Few days ago I pass through 2 of his great posts:

.Surrounding your Data Table and Dialog Controls with ComponentArt Styled Panels
.Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls
The first one is pure design tips one which I used for making good presentation of my demo here. The 2nd post is actually the idea.

add columns with textboxes in gridview using C#

  
'm working on a shopping cart in a website and I have my items(which have been added to the cart) in an arraylist. And using these values I've read the rest of the values from the db and and have populated on the gridview successfully.

Adding Dynamic Rows in GridView with TextBoxes

  
I decided to write this article because this has been asked so many times before at the forums(http://forums.asp.net) . Basically, this example shows on how to generate a Row in GridView with TextBoxes when clicking a Button that is residing inside a GridView Footer.

Abstract Factory Design Pattern (Sample in C# and VB .NET)

  
An abstract factory provides an interface for creating families of related objects without specifying their concrete classes. Sometimes one wants to construct an instance of one of a suite of classes, deciding between the classes at the time of instantiation. In order to avoid duplicating the decision making everywhere an instance is created, we need a mechanism for creating instances of related classes without necessarily knowing which will be instantiated.

jQuery grid view plugin

  
jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css). jqGridView is not platform-depending plug-in, it can be used with different web -programming platforms like: ASP .NET/ASP, PHP, JAVA, CGI scripts etc. jqGridView has hight bowser compatibility.

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

  
This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

jQuery grid view plugin

  
jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css

How to take value of bound field of grid in a variable or in a textbox.

  

How to take value of bound field of grid in a variable or in a textbox.

 I m using this code in .aspx page for grid.

<asp:GridView ID="Grd_Mprocess" runat="server" AutoGenerateColumns="False"

                      Width="100%" AllowPaging="True"

                      onpageindexchanging="Grd_Mprocess_PageIndexChanging"

                      AllowSorting="True" PageSize="5"  >

                 <RowStyle CssClass="odd" />

                    <Columns> 

<asp:BoundField HeaderText="DOC_TYPE_PK" DataField="DOC_TYPE_PK"  Visible="true" >

</asp:BoundField>

  <asp:TemplateField HeaderText="DOC TYPE ID" Visible="true">  &nbs

Looking for ASP.Net JQuery Post Sample

  

Hi, iam looking for a JQuery Post Sample, without reload of the current Page. I want on a webform enter a search text, onclick on the submit button i want get (webservice?) back clean html code that will be shown in a div tag
i found something like

<form id="formsearch" onsubmit="jQuery.ajax({type:'POST',dataType:'html',data:jQuery(this).serialize(),success:
function(data, textStatus){jQuery('#ajaxcontent').html(data);},beforeSend:function(XMLHttpRequest){$('#indicatorSearch').
show();},complete:function(XMLHttpRequest, textStatus){$('#indicatorSearch').hide();},
url:'/Search'}); return false;" action="/Search" method="post">

but how is the source asp.net (or webservice) build up?

can you give me some samples, how i can realize that with asp.net

thanks


Pass a grid column value to a Modal

  

Hi, I have a requirement to hide a field called details on a gridview and show it in a jQuery modal dialog when users click on the Customer ID hyperlink. This grid is created programmatically. I will be hiding the details column via the CSS display:none property. Does some one know how can I pass the grid's selected hidden column value to the modal? Here is some of the code I started:

            GridView mygrid = new GridView();
            //.....................................More columns code for the grid

            //Here is where I need to pass the Details column value associated with the customer ID field selected to the Modal and open the Modal dialog.            
            HyperLinkField linkField = new HyperLinkField();
            string[] dataNavigateUrlFields = { "CustomerID" };
            linkField.DataTextField = "CustomerID";
            linkFi

UI Frontiers: Thinking Outside the Grid

  

In Windows Presentation Foundation and Silverlight, using a Canvas or a single-cell Grid seems very similar. The difference is in how the container appears to the rest of the layout system. Canvas doesn't participate in layout, so you can use it whenever you need to transcend layout.

Charles Petzold

MSDN Magazine May 2010


Transactions: Build Scalable Systems That Handle Failure Without Losing Data

  

Systems that handle failure without losing data are elusive. Learn how to achieve systems that are both scalable and robust.

Udi Dahan

MSDN Magazine July 2008


Toolbox: Updated grid controls, open-source comparison tools, and more

  

This time: Windows Forms grids, professional-looking date textboxes, file merging, and more.

Scott Mitchell

MSDN Magazine November 2007


Categories: 
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