gridview

Discovering row height of autosized GridView row in ASP.NET

Hi, I have a number of GridView controls that I need to position side-by-side on a page. For example a GridView containing a list of items in a shopping basket, and a number of GridViews to the side showing pricing from a number of suppliers. The columns are fixed width in the first GridView - meaning that the row height is variable d...

ASP.Net GridView Sorting

I have a grid view with AllowSorting set to true. I get an event onsorting when a sortable header is clicked on. the handler has a parameter "GridViewSortEventArgs e" which has a SortDirection property on it. regardless of how many times you click on the same heading, the SortDirection is always Ascending. I think I'm missing something, ...

IListSource does not contain any data sources

So what does this exactly means? Some advised that to circumvent around this error, only bind a gridview to a dataset when the rows count of the datatable is greater than zero. but how about if for example your search yielded no record returned, so your datatable would have no rows, but still, you can still bind to the dataset? Aside ...

Using HyperLinkFields to display details

Hi, I have a web app (ASP.NET 2.0 C#)where I get data from an Oracle database into a gridview. I had asked in a previous question how I could turn that data into links that would, for example, take me to a details page. This was the answer I got: <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="DetailPa...

How to find the nested Asp:GridView within the following code?

I have the following structure in an aspx page: <asp:Panel ID="pnlCust" runat="server"> <asp:GridView ID="gvMaster" runat="server" OnRowCreated="gvMaster_RowCreated"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Panel ID="pnlMaster" runat="server"> ...

Bind GridView via jQuery ajax

I am new to jQuery, trying to populate a GridView or Telerik RadGrid using jQuery. Not sure how to go about it and unable to find any examples. Any help is appreciated. Thanks. Essentially I am trying to display a modal window with a textbox and button. The user enters a search criteria presses the button and a gridview in the same moda...

Dynamic gridview columns event problem

Hi, i have a GridView (selectable) in which I want to generate a dynamic GridView in a new row BELOW the selected row. I can add the row and gridview dynamically in the Gridview1 PreRender event. I need to use this event because: _OnDataBound is not called on every postback (same for _OnRowDataBound) _OnInit is not possible because ...

asp.net hidden field not setting new value, need disabled alternative

I have a hidden field on my page <input runat="server" type="hidden" id="selectedIndex" /> and it is being set by this bunch of code, an onclick event to a gridview's row: var gridViewCtlId = '<%=GridView.ClientID%>'; var selectedIndex = '#<%=selectedIndex.ClientID%>'; var itemVisible = '<%=ItemVisible.ClientID%>'; var gridViewCtl =...

using mouseover/mouseout in gridview with alternating rows

I currently have a gridview with alternating colors, Silver and White, with a blue header (not selectable, obviously). Initially, I had this onmouseover/onmouseout thing working but for some reason, yesterday morning it failed to work, and all day yesterday, I have been struggling, googling for answers and coming up short. Here is the ...

How do i get row keys / cell values & call a method when a row is selected in the standard .net 2.0 Gridview

I have standard .net 2.0 gridview control from which i want to get row keys or cell values from the grid when a row is selected. I also need to call a method each time a row is selected. Does anybody know How i can do this using ASP.net & VB? ...

Help designing a c# 'spreadsheet-style app'

I need to create an application that displays data from a number of different sources (real-time data feeds and static data from a database). Primarily the app needs to cover these requirements: Display the data in a grid, with realtime updates (to the existing data and to add new rows) Format data accoringly (if x is less than y then ...

sorting and paging with gridview asp.net

I'm trying to get a gridview to sort and page manually with no success. The problem is that when a user clicks the column they want to sort, it sorts that page, but doesn't sort the datasource (dataview) behind the gridview. So when they progress to a different page, their sort is lost. Pretty much I'm looking for a sort that will act...

GridView ButtonField postback not working in IE7?

I have an ASP.Net Web Site with GridView control that in turn contains a ButtonField column. It's supposed to do a postback when this ButtonField is clicked, but that doesn't happen if I click on the button from within the Internet Explorer window that Visual Studio opens while debugging. I can get it to successfully postback when I brin...

Code to create Sorting for a GridView in ASP.net in Code Behind?

Hi This is my code code for the Page_Load Event OdbcConnection myConnection; DataSet dataSet = new DataSet(); OdbcDataAdapter adapter; //making my connection myConnection = new OdbcConnection(ConfigurationManager.ConnectionStrings ["ODBC_ConnectionString"].ConnectionString);...

How do I maintain the data in my gridview beyond postback?

I'm writing an internal web application that is used to look up credit checks. I'm using ASP.NET for this website. I have a SQL Query that I have to query the credit check database and it returns a datatable of results. After the person clicks search, I run the query and bind the returned datatable to the Gridview every time the user ...

Custom Menu / Context Menu Mouse Over or Right Click

I currently have an ASP.NET GridView that displays a few columns to the user with one of them being a link to view the details for the specific record. From the details page, the user has the ability to access other pages for adding new records (for example from the contact record page, you can click a link to add a new vehicle purchase...

Asp.Net Gridview Buttonfield get Row Data

I have a Gridview which is binded to a datatable that I created. The data in the table is ever changing. I added a buttonfield to the Gridview. When clicked I want to send a specific columns value in that row through a link or sent through a function. How do you go about doing this? ...

Grid editing multiple records in ASP.NET

I've got to present a spreadsheet-style interface with a grid of textboxes for the user to fill in in an ASP.NET application. What's the most efficient way to construct this and to save the results? ...

How can I stop the time from displaying in a GridView when displaying a date?

I have a web application that I am working on(ASP.NET 2.0 & C#). In it, I have a gridview that gets data from an Oracle Database. Some of the data that I need to display is dates. But when the dates in my gridview show like this: 2009-04-02 00:00:00 I'd prefer they show without the time. I'm using the codebehind to get the data, s...

.net grid to display rows, and also have option to group by

Hi, Does the gridview have any 'group by' functionality? I need to display a table in the gridview, then allow for sorting on all the database table columns. I also need to be able to 'group by' on some columns. Any examples of this kind of functionality? ...