gridview

Out of Memory using after 5 times of change orientation

泪湿孤枕 提交于 2019-12-13 05:09:21
问题 I am handling larges images with 900 x 900 dimension. The images are displayed by a gridview implementation. There are 5 gridviews inside ViewPager's pages. The problem after 4 times of screen orientation change, I am getting out of memory error and the images starts not displaying. The grow heap increases up to 43 mb. I posted the log cat errors. I am using Universal-image-loader . File cacheDir = new File(getActivity().getExternalCacheDir(), "CachedImages"); if (!cacheDir.exists()) cacheDir

Gridview - Loop through multiple header rows

痞子三分冷 提交于 2019-12-13 05:07:46
问题 In a console app, a gridview is created dynamically. GridView gv = new GridView(); gv.AutoGenerateColumns = false; for (int i = 0; i < dt.Columns.Count; i++) { BoundField boundfield = new BoundField(); boundfield.DataField = dt.Columns[i].ColumnName.ToString(); boundfield.HeaderText = arr[i].ToString();// dt.Columns[i].ColumnName.ToString(); gv.Columns.Add(boundfield); } Then, two more header rows are added. Here is a partial of one row: GridViewRow HeaderGridRow = new GridViewRow(0, 0,

Get Data from MS Excel in asp.net

筅森魡賤 提交于 2019-12-13 05:03:18
问题 I can retrieve the data from excel to GridView. Below is the code : If Extension = "xls" Then connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FileUploadPath & sender.text & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=2""" ElseIf Extension = "xlsx" Then connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & FileUploadPath & sender.text & ";Extended Properties=""Excel 12.0;HDR=Yes;IMEX=2""" End If Dim query As String = "SELECT * FROM [Sheet1$]" Dim conn As New

GridView Sorting Tutorial

穿精又带淫゛_ 提交于 2019-12-13 04:59:30
问题 I want to sort the columns of the grid view. Can anyone explain me the process. What methods I need and how to do it. I looked on the internet found some but they seem not to work. I finally went with http://msdn.microsoft.com/en-us/librar/system.web.ui.webcontrols.gridview.sortexpression%28v=vs.110%29.aspx and when I click on the arrow it doesn't do anything. When I click on the column name I get: System.Web.HttpException: The GridView 'GridView1' fired event Sorting which wasn't handled. An

Getting information from parent GridView to a nested GridView

徘徊边缘 提交于 2019-12-13 04:46:42
问题 I'm hoping someone can help me get data from a GridView into another GridView I made inside it. I'm trying to get the wo_id field from the first GridView into the second GridView's datasource (created inside the first). Right now, in the code below, I have "tasks = tasks" in the WHERE clause of the "partsused" SqlDataSource, and I want it to use the wo_id field from the parent GridView instead (thus showing the correct list of parts for the specific work order). <%@ Page Language="VB"

How do I add in an save dialogue function in my export to excel codes?

孤街浪徒 提交于 2019-12-13 04:46:01
问题 I will be saving my excel file upon export using 2 methods, 1st to save as directly in server, 2nd to come up with a save dialogue to let user choose their own location thus in this case 2 files will be saved in total in each export which I am able to save directly into the server but How do I add in a save function with save dialogue in my export to excel codes? protected void EXPORT_BUTTON_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Excel._Application app = new Microsoft

Loop through the second column of WPF ListView and retrieve value of ComboBox in each row

馋奶兔 提交于 2019-12-13 04:45:10
问题 I have a two-column ListView with CheckBoxes in the first column and ComboBoxes in the second column. I need to loop through the ComoboBoxes in the second column and retrieve the selected values (or indexes) from each ComboBox, along with some index or identifier of the ComboBox, and put the values in an array. For example, the layout looks like this: COLUMN 1 COLUMN 2 ======== ======== ChBx 1 Combo1 ChBx 2 Combo2 I need to grab the SelectedValue or SelectedIndex of each ComboBox in the

Adding image to gridview row dynamically

倾然丶 夕夏残阳落幕 提交于 2019-12-13 04:44:10
问题 In gridview we have 4 columns Asset Type , Asset Name , Asset Description , Icon Now We want to add image in Icon column,but will be different depending upon the type of the document. Eg. If asset type is doc then we will display Doc icon;if asset type is jpg then we will display Jpg icon How to bind different images in each row depending upon the asset type... Need Help !!! Thanks 回答1: I would look into the GridView RowDataBound method. Access the row DataItem , check for the type, and then

How to remove HTML tags from the gridview Row

醉酒当歌 提交于 2019-12-13 04:43:58
问题 I have a textbox which uses the CKeditor functionality. The issue is that, when I add the text and links in the textboxes and submit it. I can the see the HTML tags also in the gridview like this What I want it that, whenever the data is added, it should hide/ make invisible the HTML tags. Also see the HTML code for the textbox. <ckeditor:ckeditorcontrol id="txtreportdescription" basepath="/ckeditor/" runat="server"> 回答1: Disable the HTML render in the wanted column, Try : <asp:BoundField

How to set a gridView column's text depending on other columns which are binded?

穿精又带淫゛_ 提交于 2019-12-13 04:41:09
问题 I have a GridView in ASP which I use for displaying products in a shopping cart. I set the source of GridView the ShopDataSet and the columns Name, Price and Quantity are filled automatically. What I want to achieve is a new column, added by me, which displays the cost of each row i.e. Cost = price * quantity; How can I do this programatically, without executing a new query on the database? I have to say that on Price and Quantity I set format like "${0}" for Price and "{0} piece(s)" for