gridview

How to load image (icons) of apps faster in gridView?

帅比萌擦擦* 提交于 2019-12-13 12:43:05
问题 I am displaying all apps installed in a gridView. When loading a lot of apps, lets say 30 or more, the icons will display at the default Android icon and then several seconds later update to the correct icon. I am wondering about improvements I can make to my code to make the icon images display faster. Load the following with: new LoadIconsTask().execute(mApps.toArray(new AppsInstalled[]{})); Here is what I do. private class LoadIconsTask extends AsyncTask<AppsInstalled, Void, Void>{

Highlighting the Selected Row GridView

最后都变了- 提交于 2019-12-13 12:36:29
问题 when the user click on Edit from the gridview i want to highlight the row and here is what i have done but no effect. what else i am missing? .SelectedRowStyle { background-color: Yellow; } <asp:GridView runat="server" CssClass="DataWebControlStyle"> <AlternatingRowStyle CssClass="AlternatingRowStyle" /> <RowStyle CssClass="RowStyle" /> <HeaderStyle CssClass="HeaderStyle" /> <SelectedRowStyle CssClass="SelectedRowStyle" /> </asp:GridView> 回答1: here is how i able to fix: if ((e.Row.RowType ==

Export multiple gridviews to multiple excel tabs (sheets)

老子叫甜甜 提交于 2019-12-13 12:19:45
问题 I have 6 gridviews in my website that I need to export to excel, but each one in one different sheet. This link Export GridView to multiple Excel sheet uses something quite similar, but he is using datasets and I am not. I am new to C#, so I couldnt change it to fit my solution. My code exports all gridviews to the same sheet. I created a loop to run throught my gridviews, now I need to put a code to generate each one to each excel sheet. protected void btExcel_Click(object sender, EventArgs

delete multiple rows in gridview using checkboxes

时间秒杀一切 提交于 2019-12-13 11:55:02
问题 i have used following code to execute my query of deleting multiple values in gridview using checkboxes but when i execute the following it says checkbox1.checked is false but i check that . It doesnot delte my selected values here is my code and script part protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { grd_bnd(); } } private void grd_bnd() { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString); SqlCommand cmd =

Android GridView with Separator

风流意气都作罢 提交于 2019-12-13 11:34:59
问题 is possible to have a separator between elements of a GridView? Thanks 回答1: You'll probably have to play with padding and background colors. Set the background for the table to one color, and the background to each View in the table to another color. Set a 1 or 2 pixel padding around each View in the table, and you should have a border between. 回答2: from @FreewheelNat's comment, "In your xml for your GridView, use android:horizontalSpacing="1dp" and android:verticalSpacing="1dp" to set a 1

Oracle database table in gridview

跟風遠走 提交于 2019-12-13 11:34:47
问题 I want to get the result from a query in my oracle database and put it in a gridview. Now my problem is, I have no idea how to output it in the gridview. I am using the gridview from the toolbox and my oracle connection is working. I also have the right SELECT query and I can output that in a listbox. I just have no idea how to do this in a gridview. I looked for it and I came across this: How to populate gridview with mysql? Although this doesn't help me. How can I output it in a gridview so

get date from datetime in linq and show gridview [duplicate]

前提是你 提交于 2019-12-13 11:01:45
问题 This question already has answers here : How to convert date format to DD-MM-YYYY in C# (15 answers) Closed 3 years ago . I need to get date from datetime in linq like this: var items = db.Students.ToList().Select(u => new { bi = u.Birthday.Date }); but items in grid are displayed as follows: I've seen other questions: Question1: Linq - Select Date from DateTime but when I edit code Similarly, var items = (from xx in db.Students select new { EntityFunctions.TruncateTime(xx.Birthday) }).ToList

如何将GridViewEX升级到UWP(Universal Windows Platform)平台

青春壹個敷衍的年華 提交于 2019-12-13 10:31:26
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 引言 上一篇文章中,我们主要讲解了如何在保证GridView控件的用户体验基础上,扩展GridView生成GridViewEx控件,增加动态添加新分组功能等,本文在上文的基础上,介绍如何在Windows10中使用GridViewEx,开发UWP应用。 Demo 下载: GridViewLiveTiles.zip GridViewEx.zip GridViewDemo.zip 开发UWP应用程序 开发UWP应用程序最好是从创建empty项目开始,重用已开发的一些模块,这样可以提高开发效率。 本文为了创建UWP 应用程序,首先创建一些通用类如下,详细代码见附件: Common/VisibilityConverter.cs Common/LayoutAwarePage.cs Common/SuspensionManager.cs DataModel 和Sample 文件夹下的所有文件都可以重用。 修改布局和导航 VisibilityConverter 和 SuspensionsManager暂时不需要修改,可直接在UWP中使用。主要修改布局和导航逻辑文件。 由于微软支持的设备种类越来越多,导致ApplicationViewState不再适用。UWP平台提供了其他的解决方法如 AdaptiveTriggers

deleting record when it shouldn't

空扰寡人 提交于 2019-12-13 10:29:57
问题 I am trying to show a confirmation box, which works perfectly with Confirm but doesn't work with my custom message box, This works, protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton link = (LinkButton)e.Row.Cells[4].Controls[2]; if (link != null) { link.OnClientClick = "return confirm('Do you really want to delete?')"; } } } BUT when i put this instead link.OnClientClick = "ConfirmationBox()"; function

GridView 动态添加数据

六眼飞鱼酱① 提交于 2019-12-13 10:20:35
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我有一个列表页,是采用GridView来实现的,初始数据是10个。当用户滑动到底部时,在去加载新的数据。 我在查看API时发现GridView有个addView方法,可以把一个子View添加到GridView里面去。但是该方法需要重写onDraw方法。网上收集了一些资料,整理下。 其实,动态的添加数据并不困难。首先,GridView在添加数据时,会使用到adapter,这个adapter继承自BaseAdapter. 在这个adapter的getView方法里面实现数据的加载。当有新数据时,只需要往原先的数据容器中添加数据,然后用adapter的notifyDataSetChanged方法,来告知adapter数据已经更新了,此时,adapter会自动往GridView里面添加数据。这样,网adapter里面动态添加数据的功能就实现了。 GridView实现分页,原理基本如上。但是要实现底部点击查看更多的按钮,则还需要一些改装。代码说明网上有很多,但是使用网上的demo有些问题。 添加一个“查看更多”按钮,采用的是在数据容器List中添加一个null值在最后,用来盛放footerview,这样,在GridView回滚的过程中,会出现空指针异常的错误。原因是在position小于List.size()-1的时候