Questions tagged [gridview]

A Gridview is a control for displaying and manipulating data from a variety of data sources.

A Gridview is a control for displaying and manipulating data from different data sources. It shows data from a variety of data sources in a tabular format.

26809 questions
35
votes
6 answers

Get Row Index on Asp.net Rowcommand event

I have an asp.net GridView:
Shahin
  • 12,543
  • 39
  • 127
  • 205
35
votes
4 answers

Why are there extra pixels around my Android GridView?

I have a GridView in my Android application that has a number of ImageViews in it. The space on my screen is limited and I want the images to take up as much of the available space as they can. Unfortunately, the GridView always leaves 5 pixels of…
A.J.
  • 1,550
  • 2
  • 14
  • 18
35
votes
5 answers

Grid layout with CollectionView in Swift

I would like to achieve this result: Searching around I found out that probably the way to do it is using UICollectionView, so no problem with that since there are many tutorials and questions on Stack Overflow. I have 3 questions: I cannot find…
Mat
  • 6,236
  • 9
  • 42
  • 55
35
votes
12 answers

How to hide columns in an ASP.NET GridView with auto-generated columns?

GridView1.Columns.Count is always zero even SqlDataSource1.DataBind(); But Grid is ok I can do for (int i = 0; i < GridView1.HeaderRow.Cells.Count;i++) I rename request headers here but GridView1.Columns[i].Visible = false; I can't use it because…
cnd
  • 32,616
  • 62
  • 183
  • 313
35
votes
4 answers

android gridview row dividers / separators

Is there a way to show (horizontal) dividers between rows in a gridview? I tried putting a small divider-image below every grid item, but this is not a solution, because it won't span the whole row when a row is not completely filled with items. Is…
Frank
  • 12,010
  • 8
  • 61
  • 78
35
votes
2 answers

GridView bound with Properties of nested class

I have an object map similar to what's listed below. When I try to bind the properties of NestedClass in a GridView I get the error: "A field or property with the name 'NestedClass.Name' was not found on the selected data source." The GridView is…
Ant Swift
  • 20,089
  • 10
  • 38
  • 55
34
votes
3 answers

GridView auto fit images

im trying to get images displayed in a GridView and get the columns automatically set, so far I've had to manually set the number of columns which is not what i want to do as this will affect how big the images are on different sized screens. I ahve…
Tom O
  • 1,780
  • 2
  • 20
  • 43
34
votes
4 answers

Best Technique for Multiple Eval Fields in Gridview ItemTemplate?

What is the best way to use multiple EVAL fields in a GridView ItemTemplate? Looking to have some control over formatting for appearance as well as setting up hyperlinks/javascript etc.
Dhaust
  • 5,470
  • 9
  • 54
  • 80
34
votes
7 answers

Passing multiple argument through CommandArgument of Button in Asp.net

I have a gridview with multiple rows, each has a Update button and I need to pass 2 values when someone clicks on Update button. Aside from packing the arguments inside CommandArgument separated by commas (archaic and not elegant), how would I pass…
sarsnake
  • 26,667
  • 58
  • 180
  • 286
34
votes
10 answers

Add a Header to a GridView (Android)

I'm aware that the GridView does NOT support a header or footer. I'm extensively using GridViews and I would like to have headers that scroll with it. What is the best way to approach the problem? Extending the GridView? Extending the ScrollView or…
robsf
  • 1,713
  • 3
  • 14
  • 26
33
votes
4 answers

Android GridView with categories?

Is it possible to use categories or some sort of headers with a GridView in Android? I put together a quick illustration of what I was thinking about: Thanks a lot.
Michell Bak
  • 13,182
  • 11
  • 64
  • 121
33
votes
5 answers

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…
dangerisgo
  • 1,261
  • 3
  • 16
  • 28
33
votes
7 answers

ASP.NET GridView second header row to span main header row

I have an ASP.NET GridView which has columns that look like this: | Foo | Bar | Total1 | Total2 | Total3 | Is it possible to create a header on two rows that looks like this? | | Totals | | Foo | Bar | 1 | 2 | 3 | The data in each…
Dana Robinson
  • 4,304
  • 8
  • 33
  • 41
33
votes
6 answers

How to force GridView to generate square cells in Android

How can I force an android GridView to generate square cells (Cell's height equal to cell's width) GridView has 10*9 cells and the app must support multiple screens ! I used a Linear Layout: row_grid.xml
Jessica
  • 685
  • 1
  • 9
  • 23
33
votes
5 answers

Customise grid view in yii2

How to remove summary and sorter for a particular grid view in Yii2. In Yii1.1 we can do that by setting the template property. In yii2 how to achieve this?
Dency G B
  • 8,096
  • 9
  • 47
  • 78