gridview

TextBox on GridView causing a button click event to fire

I've been chasing this one around for a couple of days and it's starting to drive me a bit batty. I have a text box on a Gridview which I'm allowing some data to be edited. When the enter key is hit, the TextChanged event happens, like I'd expect, but then it also fires the OnClick event of a button on the form. I tried removing the b...

Paging Problems With Standard .net 2.0 Gridview using VB.Net

I am using a standart .net 2.0 Gridview which uses an XMLDatasource to populate the Grid. The Data property of the XMLDatasource is set dynamically which allows the gridview to change based on input. All this works fine however I am having problems with paging... I have set the AllowPaging Property to "true" and set the PageSize Proper...

GridView with ITemplate fields export to Excel

I have a GridView wich has some programmatically Template fields added to it on Page_Load and on every PostBack (because, for some reason, these fields loose their value on PostBack). It worked fine, so I didn't thought anymore about the PostBack issue. Now I'm trying to export that GridView to Excel. I'm using the following code: pro...

SqlDataSource tag not picking up my selectparameter for some reason.

Hi, Here is my markup in my .aspx page, the sqldatasource is feeding my gridview: <asp:SqlDataSource ID="sds" runat="server" ConnectionString="server=blah;database=MyPortal;Integrated Security=FALSE;user=sa;pwd=123;" SelectCommand="GetUsers" > <SelectParameters> <asp:QueryStringParameter Name="PageIndex" Qu...

On Postback, how to get the Column that I am sorting by in my GridView?

On Postback, how to get the Column that I am sorting by (by clicking on the column) in my GridView? ...

Why doesn't my gridview's column click toggle the sort direction?

Why doesn't my gridview's column click toggle the sort direction? It seems to only sort the rows the first time I click on it, any other clicks just refreshes the page w/o any change in sort direction. btw I have a OnSorting method that I call to update the sql query to sort. My Code: <asp:GridView ID="gvReport" runat="server" AutoGe...

extJS - Can not get data to render in GridPanel

The below code uses Ext.data.Store to retrieve a JSON with table metadata (for the column headings) and the table's data. The backend PHP script is working correctly and the Ext.data.Store contains valid records for the data - I just can't get them to go "into" the Grid itself. The API Documentation makes it seem as if I just define a s...

Gridview Sorting With Images

Hi, I have a web app(ASP.NET 2.0 with C#), and in it I have a gridview that gets its data from an oracle database. I needed to implement the sort function for the gridview, so I added a dropdownmenu right above the gridview with 2 choices: Ascending and Descending. Then in the Gridview_Sorting method, I have a switch statement that ba...

Apply an ID to a GridView

Before you say it, I'm perfectly aware that a data repeater could do it, but I'm looking for the solution using a GridView. I'm implementing a jQuery feature and require unique ID's to be applied to individual rows in order to respond to click events in the correct manner. I can't see how you're supposed to apply values to an ID or a r...

Gridview Column Removing

Hi, I have a web application that I am working on(ASP.NET 2.0 C#). In it I have a GridView whose data source is an Oracle database. I get the data into the gridview in my codebehind, and don't set the datasource directly. I wanted to create a hyperlink field (NAME) that takes me to a details page about a specific record. What ends up...

Problem with updating the DOB value from Gridview

I have problem with updating the dateofbirth value from gridview. In my database table i have stored date of birth of person in a field like...Day, Month, Year. After storing i have displayed these values in gridview under a single field called DateOfBirth by using this query. SELECT Id, Name, Address, Day + '-' + Month + '-' + Year...

Error when setting the datasource for a gridview

I have a gridview. Its datasource is set as follows. dtTable is a datable in which the values for the table will be retrieved. But when setting dtTable as datasource I get an error "Object reference not set to an instance of an object". What may be the reason for this? gridview.Datasource = dtTable gridview.Databind() ...

grid selected row

Hi iam using infragistics ultrawebgrid in this how to get the selected row index in the button click event ...

C#: GridView, Row-By-Row Operations

I have a grid view displaying the messages a user has. Each message the user has is being marked whether it has been read or unread as a bit in my database table. Is there a way how I can change the style of certain rows in my grid view according to whether the messages are read or unread? I wish to display the whole row with an unread...

How do I group items into subheadings in an ASP.NET gridview control?

Hi guys, I'd like to take two tables and populate a gridview with the results: product category I'd like to have the gridview seperated into subheadings by category, rather than as a data field within the product gridview... Something like: (categories: food, clothing, shelter) FOOD Rice 10s Available <buy now> Beans 20s Availa...

Convert Gridview column from ID to String in ItemTemplate

I currently have a Gridview that displays TypeID , Name , Description. I would like to display the actual type name instead of the TypeID in the gridview. I created this function that takes in the ID and returns the Name but I am having trouble using it. There are 15-20 different types so How do I convert the TypeID to a Type Name so t...

Custom GridView Pagination

I started to work on a custom Gridview extension. I added some basic css stuff, looks ok, now I would like to move on. I never worked with custom control events. I currently have an error "event PageIndexChanging which wasn't handled." I have the MyGridview class in a something.aspx. I'd like to handle pagination in the MyGridview clas...

How to check for an Empty Gridview

Hi, I have an ASP.NET 2.0 (C#) web app, and in it I have a gridview that gets its data from an oracle database. I want to know how to check if the gridview is empty, and the do something. I have already tried: if(GridView.Rows.Count == 0) { // Do Something } but it doesn't work... Any ideas? Thank you. ...

Dissapearing data in a GridView

I have a page with a GridView bound to a custom ObjectDataSource. Grid has a selection ability which triggers FormView to retrieve selected index and use it as a parameter for a SELECT to get details about specific item. The problem is when I select a row in that grid on a page where there are less items than PageSize (Paging is enabled,...

GridView's Automatic paging doesn't work

Hello, According to my book all that is needed to start using automatic paging is to set GridView.AllowPaging to true. But when I try to navigate to another page, I get GridView fired event PageIndexChanging which wasn't handled exception. I then have to create event handler for PageIndexChanging event, but then when I navigate to nex...