gridview

android gridview header solution with adapter recycling cells

被刻印的时光 ゝ 提交于 2019-12-21 05:57:15
问题 I've seen many solutions about how to implement a gridview header that scrolls along with the rest of the grid. Most of them consist in creating a listlayout or relativelayout with a header view and a gridview all inside a scrollview. This solution has the problem that the scrollview doesn't know the size of the grid so to overcome that you need to extend grid view like here: https://stackoverflow.com/a/4536955/751180 But the problem is that but doing so you are forcing the gridview to render

Getting DataKeyNames for row on button click

◇◆丶佛笑我妖孽 提交于 2019-12-21 05:54:44
问题 I have a gridview with buttons in each row: The buttons are in a templatefield: <asp:GridView ID="storyGridView" runat="server" AllowSorting="True" AutoGenerateColumns="False" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" DataKeyNames="PK_NonScrumStory" DataSourceID="SqlDataSource1"> ... <asp:TemplateField HeaderText="Actions"> <ItemTemplate> <asp:Button ID="viewHoursButton" runat="server" Text="View Hours" OnClick=

Filter gridview

被刻印的时光 ゝ 提交于 2019-12-21 05:47:09
问题 I have a gridview which I am binding through code behind, I want to filter the gridview based on the value given by the user in textbox. It would be great if I'll be able to filter the gridview without any postback. PLease help! Thanks in advance 回答1: you could run a filter expression <asp:sqldatasource id="articles" runat="server" connectionstring="<%$ ConnectionStrings:aspa %>" selectcommand="SELECT title, url, added, updated FROM aspx_articles ORDER BY title" filterexpression="title LIKE '

Select multiple items in GridView

别来无恙 提交于 2019-12-21 05:21:44
问题 I am developing a gallery-like Activity. Everything runs fine but there is a key functionality which is missing and I couldn't find a decent answer or explanation. What I need is to give the user the ability to select multiple items by long clicking on them. Here is the desired result: You can clearly see the selected pics and the options in the ActionBar. My setup is this: 1.I have a GridView in my XML: <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id

Get Cell Value in C# Gridview when Button clicked on row

假如想象 提交于 2019-12-21 05:21:26
问题 I have a gridviewMain. Whenever I click the CLOSE linkbutton for row 1 I want to get the value aa. Click Close on row 2 get the value of bb. Any ideas. A B C aa xx 3 CLOSE bb yy 4 CLOSE cc zz 5 CLOSE aspx <asp:BoundField DataField="afield" HeaderText="A" SortExpression="afield" > <ItemStyle HorizontalAlign="Center" /> </asp:BoundField> <asp:BoundField DataField="bfield" HeaderText="B" SortExpression="cfield" > <ItemStyle HorizontalAlign="Center" /> </asp:BoundField> <asp:BoundField DataField=

How to create column of type password in gridview?

萝らか妹 提交于 2019-12-21 05:17:10
问题 I am creating an application in which user selects files and provides credentials to open that file. For that I have created three columns in a gridview. User enters password in password column. I want to display * in place of characters like we can create a textbox of password type. I have tried this code on GridView_CellClick event : if (GridView.Columns[e.ColumnIndex].HeaderText == "Password") { txtPassword[e.RowIndex] = new TextBox(); txtPassword[e.RowIndex].Name = "txtPassword"+e

yii2 change controller action in gridview

a 夏天 提交于 2019-12-21 04:46:20
问题 I have ItemController and in actionView I put gridview of my Itempicture, and I want when I click on icon view, update and delete then go to ItempictureController. so How to change controller action in gridview with different controller? 回答1: You need to set $controller property of yii\grid\ActionColumn. In your case, try this: [ 'class' => 'yii\grid\ActionColumn', 'controller' => 'itempicture' ] http://www.yiiframework.com/doc-2.0/yii-grid-actioncolumn.html#$controller-detail If you are

How to refresh Gridview after pressed a button in asp.net

帅比萌擦擦* 提交于 2019-12-21 04:27:18
问题 I am trying to make a simple library database. I list the search results in a gridview, then i have a textbox and a button, user enters the isbn and clicks loan button. Then, if there is enough number of items (itemNumber>0) it is loaned by user. Here is the screenshot of user interface: My question is, when user clicks loan button the loan may or may not be succesful. In both cases, i print a message indicating whether loan is succesful or not, and i also want the updated gridview to be

Add row to grid view

∥☆過路亽.° 提交于 2019-12-21 03:57:08
问题 Is it possible to programmatically add a row to a GridView in C# ASP? If yes, how ? I want to add static data directly from the code, not from an array nor an datasource 回答1: DataTable dt = new DataTable(); DataRow dr = dt.NewRow(); dr["Column1"] = string.Empty; dt.Rows.Add(dr); You can then bind your GridView to the DataTable ... gv.DataSource = dt; gv.DataBind(); 回答2: dataGridView1.Columns[0].Name = "column1"; dataGridView1.Columns[1].Name = "column2"; string[] row1 = new string[] {

Different height for each item in GridView [closed]

拜拜、爱过 提交于 2019-12-21 03:55:21
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . My client has developed a iPhone app that has a photo gallery with photos that have different heights, so the gallery looks something like this: I'm asked to do the same on Android so I have been trying to do