gridview

Panel DefaultButton and GridView Control with EditItemTemplate

I have a GridView control on a page with a Panel that has a DefaultButton. I am trying to get the "Update" button to work with the Enter key when a user edits a row. It works fine with the mouse. When I click on "Update", the row reverts back to View mode and the updated value is shown. When the GridView is in the Panel, the Panel's def...

making certain cells of an ExtJS GridPanel un-editable

I currently have a GridPanel with the Ext.ux.RowEditor plugin. Four fields exist in the row editor: port, ip address, subnet and DHCP. If the DHCP field (checkbox) of the selected row is checked, I need to make the other three fields un-editable. I've been trying to perform this code when the beforeedit event is triggered, but to no av...

I want to build Href using onclick Event. Add parameters from hidden fields on the page to Href

I am looking for the best solution for my problem. I am currently using a asp.net gridview with a link in the first column and the id to the item it relates too. Details href=.../page.aspx?ID=25 I have 3 hidden fields that I would like to bring with me to the next page. I want the url to look something like this. Details href=.../page...

how to get click event from a button in gridview

Hi, I am working on a app where i need to get the click event of a button in gridview. I am not getting it in row command may be because i am adding it dynamically as follows: protected void gviewTemplate_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Ro...

how to update gridview when changing date in CalendarExtender without having a button ?

Hello. Is it possible to update a gridview when you change a date in a textbox, using CalendarExtender, without having a button ?? I'm not shure what I can use. I use C# in VisualStudio 2008, 3.5 ...

Using a GridView (XtraGridView) to display contents of a Hashtable

I have many kinds of objects - the design is such that is not practical to create a subclass for every conceivable combination of attributes. Instead, I have a Hashtable called Attributes that holds the data for each one. I'm trying to display the contents of Attributes in an XtraGridView/GridView. I'd like each of the key/value pairs t...

Gridview height issue

Hello all. This is a simple one but it is defeating me. Ok, I have a gridview, lovely stuff. I have attempted to set the height of the headers so that the height is maintained regaardless of the content of the gridview. However, if a data row requires a bit more height itself (to include the data), the height of the heading also incre...

Columns of two related database tables in one ASP.NET GridView with EntityDataSource

I have two SQL Server tables with Primary Keys (PK) and a Foreign Key (FK) linking the two tables: 1) Table "Order" OrderID, int, PK AddressID, int, FK ... 2) Table "Address" AddressID, int, PK City, nvarchar(50) ... Then I've created an (ADO.NET) Entity Data Model out of those two tables. Now on my (ASP.NET) webpage I put a Gri...

asp.net-3.5 c# gridview databound

I have a query which return rows with specific fields SELECT First_Name, Midle_Name, Last_Name, Phone_home, Cell_home, ZipCode_Work, Phone_Work, Cell_Work FROM contact_info WHERE (Last_Name = @Last_Name) and here is my code to bind this query to datagridview control. protected void btnSearch_Click(object sende...

Possible to bind an anonymous list<> to a gridview?

I'm creating an anonymous List<> here: var pip = new { MCP = "", Measure = "", Year = "", url1 = "", url2 = "", url3 = "" }; var PipList = (new[] { pip }).ToList(); The I loop through my code and load that list with items and bind it to my gridview: PipList.RemoveAt(0); gvReport.DataSource = PipList; gvReport.DataBind(); When I de...

GridView styling (CSS classes) disappears

I'm migrating a large number of stand-alone pages into content pages. Most of this involves little more than copying and pasting a GridView from one page into the new page. However, I find that styling disappears in the new project, i.e. the styles (as classes) are still present in the stylesheet, but these classes are no longer applie...

binding values to gridview from text box

how to bind values from a text box to a gridview on a button click in asp.net & c#.net for an web application? ...

row data bound problem

hi, i am usin rowdatabound event of gridview to do some formating in gridview column. But when i execute the code and debug it using immediate window i do not get anything in e.Row.Cells[1].Text. I am populating the gridview from a datatable. It is displaying the records but i dont know why is it not getting in rowdatabound. foll...

How to save values in editable gridview?

I have an editable gridview with blank cells. User enters some numeric data in cells and also user can clicks a button to add new row to gridview. My problem is that, as soon as button click event is fired, the page refreshes & the gridview becomes empty. Can anybody tell me, how can I save values in gridview until the user saves all cha...

Dynamic Column that contains a Repeater

How would I go about doing this programatically? I can do this just fine declaratively, using a template column and then using something like this: ... <TemplateGridColumn> <ItemTemplate> <div> <asp:Image ID="groupImg" CssClass="groupImg" runat="server"/> <asp:Repeater ID="groupItemRpt" runat="server"...

rowupdating not giving new values.

Hi, I am working on a application where i am using rowupdating event of the gridview. I am using templatefield in my columns so i am not able to get the new values from the textboxws that i am having in the gridview. How can i get the new values from the textboxes. Following is my code in rowupdating: protected void gviewTemplate_...

Problem with GridView, Bind() and DropDownList

I am updating an existing ASP .NET site. This site has a custom grid control class that extends the GridView control to add a few features. Many pages in the site use the built in declarative two-way binding feature that is built into the base GridView, i.e. column templates make calls to Bind() so that data can be shown and updated auto...

How do I target a GridViewRow with an AJAX.Net Toolkit PopupExtender?

Hi all, I have a lot of data to display in a GridView. Because there's so much information per row, I'd like to be able to display additional information when a user clicks on the row, so I thought a PopupExtender from the AJAX Toolkit would be perfect. Ideally, I want the popup to display whenever any of the controls within the row a...

How to perform server-side pagination by using a GridView and a DataPager in Asp.net 3.5?

Hi I have a webform which uses a gridview control to show result of a search operation. I wanna to take advantage of using pagination in the webform. But as you all know, gridview pagination is a client-side pagination and it transfers all records have been selected to the client. What I mean by client-side pagination is the client (pa...

How can I keep separation of concerns when using a grid in the presentation layer (esp. .NET)?

In a three-tier model (presentation-business-data access layers), I can consistently keep my lower layers agnostic of the upper layers. For example my data access layer never knows how it is presented or what busines rules are operated on it. My business rules are agnostic of how they're presented. But I must pray to Demeter for forgiv...