gridview

Getting a button to scroll into view at the bottom of a GridView on Android

Deadly 提交于 2020-01-15 03:42:08
问题 I am trying to port an existing iPhone application to android. I wish to have a button scroll into view at the bottom of a GridView to enable the user to load more data from the server. Presently, my solution simply fixes a button at the bottom of the screen instead of having it scroll into view. Here is my layout code: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"

GridView template Column conditionally set to readonly

落爺英雄遲暮 提交于 2020-01-15 03:39:08
问题 Is there a way to set a Template Column on a GridView to readonly from code behind. Like if test for Admin=true make readonly= false else readonly = true ? 回答1: There is no direct way to set the GridView column to readonly. But You can set the controls to readonly that are in that column in the RowDataBound event of your GridView . e.g. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowState == DataControlRowState.Edit || e.Row.RowState ==

Flutter 可滚动组件:GridView

拥有回忆 提交于 2020-01-14 21:56:32
前言 GridView可以构建一个二维网格列表。需要关注的是gridDelegate参数,类型是SliverGridDelegate,它的作用是控制GridView子组件如何排列(layout)。SliverGridDelegate是一个抽象类,定义了GridView Layout相关接口,子类需要通过实现它们来实现具体的布局算法。Flutter中提供了两个SliverGridDelegate的子类SliverGridDelegateWithFixedCrossAxisCount和SliverGridDelegateWithMaxCrossAxisExtent。 接口描述 GridView({ Key key, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller, bool primary, ScrollPhysics physics, bool shrinkWrap = false, EdgeInsetsGeometry padding, @required this.gridDelegate, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool

Updating one element of a bound Observable collection

柔情痞子 提交于 2020-01-14 14:12:09
问题 I have an observable collection with a custom class called songInfo inside. It is bound to a ListView . Here is the code for the binding: C# : var songData = new ObservableCollection<songInfo>(); public ObservableCollection<songInfo> _songData { get { return songData; } } public class songInfo { public string Title { get; set; } public string Artist { get; set; } public string Album { get; set; } public string Location { get; set; } public string Ext { get; set; } public bool isSongPlaying {

Updating one element of a bound Observable collection

大兔子大兔子 提交于 2020-01-14 14:11:55
问题 I have an observable collection with a custom class called songInfo inside. It is bound to a ListView . Here is the code for the binding: C# : var songData = new ObservableCollection<songInfo>(); public ObservableCollection<songInfo> _songData { get { return songData; } } public class songInfo { public string Title { get; set; } public string Artist { get; set; } public string Album { get; set; } public string Location { get; set; } public string Ext { get; set; } public bool isSongPlaying {

GridView导出到Excel或Word文件

落爺英雄遲暮 提交于 2020-01-14 13:33:44
在项目中我们经常会遇到要求将一些数据导出成Excel或者Word表格的情况 前台页面: <% @ Page Language = " C# " AutoEventWireup = " true " CodeFile = " ExportDemo.aspx.cs " Inherits = " ExportDemo " %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns ="http://www.w3.org/1999/xhtml" > < head runat ="server" > < title > GridView导出到Excel或Word文件——周公的博客:http://blog.csdn.net </ title > </ head > < body > < form id ="form1" runat ="server" > < div > < asp:GridView ID ="gvPersonList" runat ="server" AutoGenerateColumns ="False" > < Columns > < asp

Get all photos from Android device android programming

China☆狼群 提交于 2020-01-14 11:53:06
问题 I am trying to fetch all the photos of my android device. I have an onCreate function: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageAdapter adapter= new ImageAdapter(this); final String[] columns = { MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID }; final String orderBy = MediaStore.Images.Media._ID; Uri rr= MediaStore.Images.Media.INTERNAL_CONTENT_URI; Cursor imagecursor = getContentResolver()

Gridview EditItemTemplate DropDownList Get SelectedValue

夙愿已清 提交于 2020-01-14 09:41:28
问题 In my Gridview I have the following template field: <asp:TemplateField HeaderText="Dept Code" SortExpression="DeptCode"> <ItemTemplate> <%# Eval("DeptCode") %> </ItemTemplate> <EditItemTemplate> <asp:DropDownList ID="ddlDeptCode" runat="server" SelectedValue='<%# Eval("DeptCode") %>' DataSource='<%# GetAllDepartments() %>' DataTextField="DeptCode" DataValueField="DeptCode" /> </EditItemTemplate> </asp:TemplateField> This works great when I click Edit on a row it populates the DropDownList

ASP.NET : Hiding columns in gridview

感情迁移 提交于 2020-01-14 08:26:08
问题 Is there a way I can control columns from code. I had a drop drop box with select : Daily and weekend and the gridview column with Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,sunday. If the user selects Daily i want to show columns only from Monday to Friday. It is possible to control from the code. Oh i am using this griview in my webpage and coding in done using C#. help! 回答1: Use Columns property: GridView1.Columns[5].Visible = false GridView1.Columns[6].Visible = false 回答2: All

Why did my Grid View disappear after I put search function, select,insert,delete,insert gridview

孤街醉人 提交于 2020-01-14 06:57:27
问题 I am learning Gridview .net and C# I could edit,delete and also insert. I added search function, search function is working but when the page open, I do not see the gridview on the page, but only textbox of search and button. After I types some, the search function is completely working. I would like to see the gridview also when the page opens, plus search box <asp:TextBox ID="txtSearch" runat="server" CssClass="txt"></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="Search"