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
33
votes
6 answers

Change header text of columns in a GridView

I have a GridView which i programmatically bind using c# code. The problem is, the columns get their header texts directly from Database, which can look odd when presented on websites. So basically, i would like to modify the column header text, but…
Mana
  • 1,925
  • 6
  • 39
  • 55
32
votes
6 answers

OnItemClickListener Not Triggered on Android GridView

I have a Gridview filled by an Adapter which returns LinearLayouts each contains an ImageButton and TextView. In the adapter I am binding an onClick and onLongClick event to the ImageButton. I am trying to bind OnItemClickListener to the gridview…
Olgun Kaya
  • 2,519
  • 4
  • 32
  • 46
32
votes
7 answers

How to have a GridView that adapts its height when items are added

I am trying to display a dynamically-growing list of strings with a checkbox in a GridView, which is itself in a TableLayout. I can display these "checkboxed" strings fine in a row. My problem occurs when I let the user dynamically add new strings…
Timores
  • 14,439
  • 3
  • 46
  • 46
32
votes
9 answers

Center elements in GridView

I have GridView with 6 images in 2 columns. I want to display this 6 images in the middle of the screen. I set gravity properties to center but this center elements only horizontally. GridView takes whole screen.
bimbol
  • 341
  • 1
  • 3
  • 5
32
votes
12 answers

Getting value from a cell from a gridview on RowDataBound event

string percentage = e.Row.Cells[7].Text; I am trying to do some dynamic stuff with my GridView, so I have wired up some code to the RowDataBound event. I am trying to get the value from a particular cell, which is a TemplateField. But the code…
Chris James
  • 11,571
  • 11
  • 61
  • 89
32
votes
4 answers

ImageView ScaleType ignores padding

I have a Imageview set with a white background and 1dp padding, this creates a border-like effect, which is the wanted result. Now if I set the scaleType to centerCrop it ignores the padding on the top and bottom. So I still have my border on the…
TheLD
  • 2,211
  • 4
  • 21
  • 26
31
votes
3 answers

How to make flutter card auto adjust its height depend on content

In the project, I'm using images and text inside the flutter card, but the card returns a fixed height. and then I also tried just using a card with an empty value, but it still returns a fixed height. what should I do to make the height of the card…
Fatoni
  • 509
  • 1
  • 6
  • 10
31
votes
13 answers

Third party WPF controls: Devexpress vs Telerik

I would like to hear your opinion about the two control providers. To put it in a nutshell: I am building a classic LOB desktop application. The app will be created entirely in WPF. PRISM 4.0 will be used heavily. Whenever possible, I will try to…
Sebastjan
  • 142
  • 1
  • 5
  • 13
31
votes
9 answers

How to refresh a GridView?

I have a GridView which is pretty similar to the Google tutorial, except that I want to add the ImageViews on runtime (via a subactivity). The results are okay, but the layout of the View is messed up: The GridView doesn't fill the content of its…
Daniel
  • 1,422
  • 1
  • 13
  • 21
31
votes
1 answer

How to add a class to tags in a GridView

I need to add classes to td of a GridView. I've found renderTagAttributes(), but I can't find examples how to use it. Could you explain me this function or offer me other option? My gridview:
Kevin7
  • 631
  • 1
  • 7
  • 13
31
votes
10 answers

Conditionally hide CommandField or ButtonField in Gridview

I have a GridView displaying person records. I want to conditionally show a CommandField or ButtonField based on some property of the underlying record. The idea is to only allow a command to be performed on specific people. What is the best way to…
Larsenal
  • 49,878
  • 43
  • 152
  • 220
30
votes
8 answers

Android GridView reorder elements via Drag and Drop

I have a GridView in an application I am working on. I would like to be able to reorder the items in the GridView via drag-and-drop. I have found lots of help for ListViews but nothing on GridViews. I want to achieve behaviour like in this launcher…
Martin C.
  • 301
  • 1
  • 3
  • 4
30
votes
9 answers

How to render decoded HTML in a (i.e. a
) in GridView cell

I'm binding a GridView to an LINQ query. Some of the fields in the objects created by the LINQ statement are strings, and need to contain new lines. Apparently, GridView HTML-encodes everything in each cell, so I can't insert a
to create a…
core
  • 32,451
  • 45
  • 138
  • 193
29
votes
3 answers

Convert DBContext to ObjectContext for use with GridView

I have a webforms project using EF codefirst to persist data. I'd like to use a GridView and EntityDataSource, in order to save writing CRUD. Is this possible? Can I convert my DBContext to an ObjectContext that is expected by the…
Myster
  • 17,704
  • 13
  • 64
  • 93
29
votes
7 answers

How to find Control in TemplateField of GridView?

How does FindControl method works if I need to find any Control which is inside GridView Template, more specifically ItemTemplate? I have a hyperlink but it is not able to find the same. Question updated with code GridView Code is…
xorpower
  • 17,975
  • 51
  • 129
  • 180