gridview

SQL “SELECT IN (Value1, Value2…)” with passing variable of values into GridView

血红的双手。 提交于 2019-12-21 17:51:48
问题 I have a strange encounter when creating a GridView using SELECT..WHERE..<field> IN (value1, val2...) . In the "Configure datasource" tab, if i hard code the values SELECT .... WHERE field1 in ('AAA', 'BBB', 'CCC') , the system works well. However, if I define a new parameter and pass in a concatenated string of values using a variable; be it a @session, Control or querystring; e.g. SELECT .... WHERE field1 in @SESSION the result is always empty. I did another experiment by reducing the

android gridviews row height max of item

主宰稳场 提交于 2019-12-21 17:51:44
问题 i have simple gridview. it's elements have different height. for example in row there are one small element and one bigger, next row will align to smaller element and a part of bigger element is under the second row. how can i set the height of each row of gridview to be the height of the biggest element in row?? my gridview <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/new_small_list" android:layout_width="fill_parent" android:layout_height="wrap

How to: gridview inside a fragment?

∥☆過路亽.° 提交于 2019-12-21 16:58:37
问题 I want to create a gridview like android market, I want to populate this with images from a database on internet. it need to work with androidv4.support, since I want to run 2.2 until 4.0. Someone said, that isnt possible to create a gridview in pre-4.0, is it true? However It only works when I put use setListAdapter() , but it shows only one image per line, like a listview, when I change to gridview.setAdapter() , it doenst work anymore. Here is my try: This is the ListFragment class: public

Invert WPF GridView to bind items to columns instead of rows

女生的网名这么多〃 提交于 2019-12-21 12:49:11
问题 Is there a simple way to invert a WPF GridView so that items are bound to columns instead of rows? Or would it be necessary to write a custom view mode? 回答1: If you would like to show 3 columns with simple values, and then a last column with collection of data as itemssource, then you can put a grid within the last cell and trasform it 90 degrees. This is the way, and also gives a performance improvement as adding and rendering columns is much slower than adding rows to a grid. 来源: https:/

setting gridview header color

不打扰是莪最后的温柔 提交于 2019-12-21 12:09:13
问题 i am working in asp.net and c# i have a grid view. i have 10 columns in that grid view. I have some problems with grid view header text color. some of the columns header have link (for sorting). the color of such header text is a light blue.after clicking the blue color change to another color. some of columns header does not have link. the color of such header text is gray. i want to make the color of entire header text to single color like gray. after clicking the link it must be in same

DevExpress控件使用经验总结

半世苍凉 提交于 2019-12-21 11:27:00
DevExpress控件使用经验总结 DevExpress是一个比较有名的界面控件套件,提供了一系列的界面控件套件的DotNet界面控件。本文主要介绍我在使用DevExpress控件过程中,遇到或者发现的一些问题解决方案,或者也可以所示一些小的经验总结。总体来讲,使用DevExpress控件,可以获得更高效的界面设计以及更美观的效果。本文主要通过给出相应的例子以及相关界面效果来说明问题,希望大家能够从中获得好的知识和思路。 1、 应用Office2007和Office2010的界面主题 开始使用DevExpress的时候,发现程序界面效果好像没有出现Office的样式,只是有几种可怜的内置效果。经过查找发现需要在入口函数里面添加几行代码,如下所示。 DevExpress.UserSkins.OfficeSkins.Register(); DevExpress.UserSkins.BonusSkins.Register(); DevExpress.Skins.SkinManager.EnableFormSkins(); 指定界面主题效果,可以通过代码设置,指定主题的名称即可。 UserLookAndFeel.Default.SetSkinStyle( " Office 2010 Blue " ); 或者在界面中添加一个控件 DefaultLookAndFeel

XtraGrid使用方法

元气小坏坏 提交于 2019-12-21 11:21:24
XtraGrid的关键类就是:GridControl和GridView。GridControl本身不显示数据,数据都是显示在GridView/CardView/XXXXView中。GridControl是各种View的容器。所以要控制显示,要从GridView这些类入手。关于GridControl与GridView的关系,我不说了。下面给出一段代码。实际使用中常用到。 public Form2() { InitializeComponent(); //不显示内置的导航条。 gc1.UseEmbeddedNavigator = false; //不显示分组的面板 gv1.OptionsView.ShowGroupPanel = false; gv2.OptionsView.ShowGroupPanel = false; //自动改变行高适应内容 gv1.OptionsView.RowAutoHeight = true; gv2.OptionsView.RowAutoHeight = true; //允许自动合并单元格 gv1.OptionsView.AllowCellMerge = true; //如果主从表中,没有找到从表内容也要显示(默认是不显示的) gv1.OptionsDetail.AllowExpandEmptyDetails = true; //显示自动筛选行

玩转DevExpress.XtraGrid.view.gridview

拟墨画扇 提交于 2019-12-21 11:20:09
(一)双击展开,收缩字表 Private Sub ExpandedChild(ByVal sender As DevExpress.XtraGrid.Views.Grid.GridView) '找出焦点行 Dim VIntPage As Integer = sender.FocusedRowHandle If sender.GetMasterRowExpanded(VIntPage) Then sender.CollapseMasterRow(VIntPage) Else sender.ExpandMasterRow(VIntPage) End If End Sub (二)单击选中某行的checkbox Private Sub GridChecked(ByVal sender As DevExpress.XtraGrid.Views.Grid.GridView, ByVal TableIndex As Integer) Try '找出焦点行做在的内存表中所在的行 Dim rowPlace As DataRow = CType(sender, GridView).GetDataRow(CType(sender, GridView).FocusedRowHandle) 'SELECTED为checkbox的字段名(1:选中,0:不选中) If rowPlace("SELECTED")

GridView规则显示图片

为君一笑 提交于 2019-12-21 11:19:36
首先是自定义的GridVIew,ListView嵌套GridVIew时必须自定义GridVIew,不嵌套时可以不用。这里的GridView会根据图片多少自动调节大小 //自定义的GridView ,以后可以直接把这个类粘过去用public class GridViewEx extends GridView { private OnTouchInvalidPositionListener onTouchInvalidPositionListener; public GridViewEx(Context context) { super(context); } public GridViewEx(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, expandSpec); } @Override

gridview 显示图片

萝らか妹 提交于 2019-12-21 11:19:15
与图片的二进制数据库存储和显示 1.将图片以二进制存入数据库 2.读取二进制图片在页面显示 3.设置Image控件显示从数据库中读出的二进制图片 4.GridView中ImageField以URL方式显示图片 5.GridView显示读出的二进制图片 ==================== 1.将图片以二进制存入数据库 //保存图片到数据库 protected void Button1_Click(object sender, EventArgs e) { //图片路径 string strPath = "~/photo/03.JPG"; string strPhotoPath = Server.MapPath(strPath); //读取图片 FileStream fs = new System.IO.FileStream(strPhotoPath, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); byte[] photo = br.ReadBytes((int)fs.Length); br.Close(); fs.Close(); //存入 SqlConnection myConn = new SqlConnection("Data Source=127.0.0.1