gridview

How to get total row count and why is the GridView's DataSource property null in the DataBound event handler?

I wanted to get the total row count in a GridView's databound event handler, so I tried the following: protected void grid_DataBound(object sender, EventArgs e) { GridView grid = (GridView)sender; DataSet data = grid.DataSource as DataSet; if (data == null) return; int totalRows = data.Tables[0...

Gridview with Ajax Toolkit CalendarExtender not displaying in Edit Template

I have the folling Gridview column <asp:TemplateField HeaderText="Installed Date" SortExpression="install_date"> <EditItemTemplate> <asp:TextBox ID="gvtxtInstalledDate" runat="server" Text='<%# Bind("install_date") %>'></asp:TextBox> <asp:CalendarExtender ID="gvtxtInstalledDate_CalendarExtender" runat="s...

GridView, ObjectDataSource, and Custom Pagination with MySQL

I am trying to hook up custom pagination with an ObjectDataSource to my GridView. However, this thing renders no data, but does render the column headers. The debugger clearly indicates a populated DataTable being returned: <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" AllowPaging="True" /> <asp:ObjectDat...

How to add a checkmark to a selected image in a GridView in Android?

I created a GridView which is populated using images from the SDCard. I want the same functionality as that of the selection in Android's Media Gallery. There, we can select images, upon which a green checkmark appears on the image. I created the Grid using this guide: Displaying Images from SD Card In Android - Part 2 How can I go abo...

ods_Selected Row Count

Hello all. I have the following bit of code that gives me the number of rows in a gridview bound to an object data source. protected void odsProduct_Selected(object sender, ObjectDataSourceStatusEventArgs e) { lblHowManyRows.Text = ((List<tblProduct>)e.ReturnValue).Count.ToString(); Lovely. However, how would I g...

How to disable the users abilities for the Devexpress GridView

I am using the DevExpress.XtraGrid.Views.Grid.GridView within my Visual Studio 2008 application and thought I limited the abilities of the user but I was mistaken. I am programming in VB.NET but I can easily translate from C#. I went into the properties of the gridview and set ShowGroupPanel, AllowAddRows, AddNewColumns, AllowDeleteRows...

Paging in Gridview, can't access another page

I have a web app where everytime I upload an Excel file, its contents appears in Gridview, which is binded with a DataTable. Using the properties, I have set paging and sorting to true. When I input a file using fileupload and a submit button, the web app has page numbers at the bottom appear. It also correctly sorts it, (my page size ...

GridView getting height and width of columns/rows

I am trying to set the top gridview's column's width to the body's column width and then the left columns height to the body's coloumns height. Here is my code: <form id="form1" runat="server"> <div> <asp:Table ID="Table1" runat="server"> <asp:TableRow> <asp:TableCell> </asp:TableCell><asp:TableCell> ...

how to add checkbox column to Extjs Grid

i have EXTjs grid. i want to know how to add the checkbox to the Extjs grid column... pls help... in my datatable i ll get the value for the column 'Status'. it may br either true/false. so based on that it should show the checkbox column checked / unchecked. urgent.... ...

How to link GridView controls across <asp:Content> placeholders?

I am learning ASP.NET and I have a master-detail scenario using two GridViews in ASP.NET 3.5 and C#. GridView grdOrders lists a set of orders and the GridView grdOrderDetails lists a set of order details for an order. I have a master page which defines two content areas with this code: <div class="leftColumn"> <asp:ContentPlaceHolde...

Changing SqlDataSource.SelectCommand at runtime breaks pagination

I have a GridView bound to a SqlDataSource with a default SelectCommand defined as such: <asp:SqlDataSource ID="SqlDataSource1" runat="server" DataSourceMode="DataSet" ConnectionString="<%$ ConnectionStrings:MyConn %>" ProviderName="MySql.Data.MySqlClient" SelectCommand="select * from blah blah" /> There are cases ...

Problem with GridView link button field

I want to show the following data on a Gridview. Request ID Email Date User Type Status Status can be Active or Inactive according to the database value.if its Inactive user must be able to change the status to Active so that the database value will be updated.I couldn't implement this Status field as a linkbutton field.following is ...

Getting Xml Columns from LinqDataSource to appear in a GridView

I have a LinqDataSource and a GridView displaying a table. Columns of type xml don't show up. I'd like them to show up something like they do in Sql Server query outputs, with a link to display the clickable xml, though there may be another approach i'm not considering (maybe a styled display of the xml data, etc.). Two things i'd like t...

To change gridview cell font size in WPF

Hi I have a gridview in Listview.View in a WPF application. I am using sorting of each grid view column so I need to set display member binding. When I searched in net I got a method using cell template to increase the font size of elements in the grid view. But I cannot use that since I need DisplayMemberBinding property of gridview f...

Filter a gridview ignoring accents

Hello. I am trying to filter a gridview with a filter expression like this "SurName like '%surname%' AND FirstName like '%firstname%'" So far it works fine except in one edge case: Some name's have an accent in them. We want to display these names with an accent but when searching I would like to use an accent insentive search. How d...

Android, GridView and onTouchListener

Hello, My application have three pages (three tabs) and I want to switch beetween two gridviews by moving finger horizontaly. The touch code works fine but I can't click anymore on the grid items! I use the method onItemClickListener (onClickListener don't works on Gridview) but the grid item is not clicked. Thanks for your help! The co...

Gridview Custom control event handling problem.

Hi, In my web application, i have created one page as a custom control. Inside that control, there are various controls like text box, button , data grid ext.Then i have include that control in the test.aspx page. All the events and other codes are inside the form control only. So that there is no single code in the code behind file (te...

Gridview binding with combobox's in header

Hi all, Could anyone please enlighten me about how one might go about binding to a gridview in ASP.Net 4 in a scenario where the first row of my gridview should be the headers, the second should be a combobox for each column and the third is the beginning of my actual datasource. If you can imagine what I am trying to achieve is an abi...

Sorting in GridView

Could any one let me know how to implement sorting on GridView? ...

how can i uncheck DevExpress Gridview 's checkbox ?

how can i uncheck DevExpress Gridview 's checkbox ? i have a gridview with checkboxes. i need to uncheck all gridview Checkbox. How can i do that? ...