gridview

asp:Hyperlink in Gridview open PDF in new browser window

纵饮孤独 提交于 2019-12-25 00:12:35
问题 I currently have a gridview that dynamically creates asp:Hyperlinks to PDF files. Right now, the url just downloads the file to the local machine. What's the easiest way to get them to open in a new window so the user has the option to print or download. Chrome automatically downloads it. IE asks to open or save it. I just want it to open in a browser window. <asp:TemplateField HeaderText="Name"> <ItemTemplate> <asp:HyperLink ID="lblProductName" runat="server" Text='<%# Eval("name") %>'

Overfocus in GridView

爷,独闯天下 提交于 2019-12-24 23:39:28
问题 I'm trying to implement a GridView that Focuses the next Item and "Overscrolls at the End of a List. E.g. 1 2 3 4 5 6 7 8 9 I want to scroll 1 > 2 > 3 > 4 > 5 > 6 > ... just by pressing the right Key. Right now I can only Scroll 1 > 2 > 3 and then it stops and I have to scroll with the down Key. I already tried to set the focusViews in code (In the getView() method of my ArrayList Adapter, that fills the GridView) view.setId(position); view.setNextFocusLeftId(position-1); view

GridView doesn't contain all of adapter

ε祈祈猫儿з 提交于 2019-12-24 23:00:25
问题 I've made a GridView mGridView and an adapter mAdapter of 225 Views, and I set the adapter to the GridView. I also made a button so when I click on it does this: Log.d("mAdapter.getCount()","" + mAdapter.getCount()); Log.d("mGridView.getCount()",""+mGridView.getCount()); Log.d("mGridView.getChildCount()",""+mGridView.getChildCount()); and there results are: D/mAdapter.getCount()﹕ 225 D/mGridView.getCount()﹕ 225 D/mGridView.getChildCount()﹕ 180 This is a problem for me, because I need to use

Bind Links To GridView

血红的双手。 提交于 2019-12-24 22:32:32
问题 How can I render links in columns of WebForms GridView? I have the following code SqlCommand cmd = new SqlCommand("SELECT * FROM dbo.UsersContacts WHERE UserId='vika'", con); con.Open(); var list1 = new List<string>(); using (SqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { var node = reader[1]; list1.Add(node.ToString()); } } con.Close(); GridView1.DataSource = list1; GridView1.DataBind(); and I want to do something such as list1.Add("<a href='#'>"+node.ToString()+"<a>")

Custom adapter in GridView

≡放荡痞女 提交于 2019-12-24 22:16:35
问题 I try to do some calendar. I do it as GridView with custom adapter. How in adapter combine 2 TextView (date and text) and icons (red circle) ? (screen for example) 回答1: You must create a layout(with an ImageView for the icon and 2 TextViews ) for each item and inflate the layout into a view in the getView() method of your adapter . Something like View getView(int position, View convertView, ViewGroup parent) { if(convertView == null) { // recycled view is null so create it. convertView = View

get the corresponding row values for check box checked row in grid view using javacsript

只愿长相守 提交于 2019-12-24 21:42:40
问题 I have following grid with check boxes on each row, i want to get the corresponding selected row cells value when i checked the check box .. I am able to give the alert when the check box is checked but not sure how to get the selected row cells value .. this is my gridview <asp:GridView ID="gvPRCertInfo" runat="server" AutoGenerateColumns="False" GridLines="None" CellSpacing="1" CellPadding="1" Width="95%" BorderWidth="0" AllowSorting="True" PageSize="30" OnRowDataBound="gvPRCertInfo

VB.NET TO C# - Gridview Code behind for a search from a listbox w a stored procedure

折月煮酒 提交于 2019-12-24 21:33:33
问题 I am looking for the correct code behind syntax in C# for displaying Search Results from multiple parameters in Gridview. I just did something similar in VB.NET but I have to update a project in C#.NET and am unsure of: 1) the correct codebehind syntax in C#.NET (code in VB.NET) 2) how to specify multiple search paramaters in the case that a user selects multiple Insurance Plan parameters, Multiple Age parameters, and/or M from a Listbox 3) disable or enable the ability to select multiple

How to get value of textbox inside of gridview

佐手、 提交于 2019-12-24 21:25:14
问题 My GridView has a ContentTemplate containing ItemTemplate . ItemTemplate has textbox and button . Here is a fragment of the code: <asp:TemplateField HeaderText="Email"> <ItemTemplate> <asp:TextBox runat="server" ID="txtEmail" Text='<%#Eval("CustEmail") %>' /> <asp:Button id="btnUpdate" Text="Update Email" ButtonType="Button" CommandName="UpdateEmail" Visible="true" runat="server" OnClientClick="return ValidateEmail(this)" /> </ItemTemplate> </asp:TemplateField> What I'm doing is calling

C# Gridview: Want to create an extended gridview class that automatically hides rows with a specific value in DataKeyNames column

╄→гoц情女王★ 提交于 2019-12-24 20:57:09
问题 I'm trying to create an extended gridview class that will enable me to always have a footerrow that can be used to add data. That's the end goal. I've tried classes that were found elsewhere on stackoverflow, but the code I found is apparently buggy (it either works when the footerrow is the only row, or it works when the footerrow is not the only row, but never both. Possibly related to the fact that I have dropdownlists in my rows). This problem was explained here: Bizarre issue with

Opening a blank Excel file in asp.net and corresponding functionalities

我们两清 提交于 2019-12-24 20:42:36
问题 I have a gridview displaying data from a datasource. I was wanting to bring a functionality through which my asp.net page could open a blank excel document on the users computer.The blank excel sheet should have the names of the columns which the user is required to fill. Hence when the user is done filling the excel spread sheet,I want to somehow import all those entries and save it into the database. How can this be done? 来源: https://stackoverflow.com/questions/10183290/opening-a-blank