gridview

Gridview disable edit on 1 column asp.net

一笑奈何 提交于 2019-12-22 04:15:11
问题 I am using a gridview Edit to edit the values i have in my gridview, when i press edit, all columns can be edited, i would like that one of the columns is not allowed to be edited. Is there any way i can do this? Thiss is my aspx code: <asp:GridView ID="GridView1" runat="server" AllowSorting="True" OnRowCommand="GridView1_SelectedIndexChanged1" AutoGenerateEditButton="True" OnRowCancelingEdit="GridView1_RowCancelingEdit" CellSpacing="10" OnRowUpdating="GridView1_RowUpdating" ShowFooter="True"

WPF DataGrid Validation Bug?

↘锁芯ラ 提交于 2019-12-22 04:14:25
问题 This may be intended functionality, but it sure seems like a bug to me. I'm using the out-of-the-box WPF DataGrid, bound to an ObservableCollection and attempting to use some validation rules in order to provide nice user feedback. Needless to say there are more issues than I can count, but I'll stick with the immediate. Here is a summary of the problem: Bind ItemsSource property to an ObservableCollection<T> Populate the collection Edit an item in the grid in a way which will cause a

How to delegate telerik grid view common methods to be call from parent page from every child page?

喜欢而已 提交于 2019-12-22 02:02:43
问题 I am using Telerik Gridview for displaying list of records and i have more than 10 pages on which i am using this gridview with this following common events code copy pasted(with some minor changes) on all this pages: protected void Page_Load(object sender, EventArgs e) { DisplayRecords() } public void DisplayRecords() { //Grid view names are different on different pages. GridView1.DataSource=Fetching records from database. GridView1.DataBind(); } protected void GridView1_SortCommand(object

Gridview Footer row textbox in JavaScript

久未见 提交于 2019-12-22 01:32:25
问题 I have been accessing the rows of Gridview quite easily using javascript. But when I try to add a new row and then try to access, then the code is not working. Is there a way by which I can access the footer row text box? Below is my code which works well when edit mode text boxes are to be accessed. Please donot post any link. function OnSelectIndexChange() { var drpdwn = document.getElementById("ddlSelectUnderwriterCond"); var drpdwnValue = drpdwn.options[drpdwn.selectedIndex].text; var

Android Gridview is not refreshed while pressing back button

时间秒杀一切 提交于 2019-12-22 01:29:07
问题 I have one grid view in one activity.I have set Adapter using array-list. Gridview is displaying the list of the items stored in the database.Let say it is some products. When i click on any product in the grid-view it will navigate me to product detail screen. From product detail screen i can delete product.If i delete product and press back button it will navigate me to product list screen. Expected: Product list screen will come without deleted item. Actual: Product list screen is coming

Paging and sorting Entity Framework on a field from Partial Class

♀尐吖头ヾ 提交于 2019-12-22 01:21:11
问题 I have a GridView which needs to page and sort data which comes from a collection of Customer objects. Unfortunately my customer information is stored separately...the customer information is stored as a Customer ID in my database, and the Customer Name in a separate DLL. I retrieve the ID from the database using Entity Framework, and the name from the external DLL through a partial class. I am getting the ID from my database as follows: public class DAL { public IEnumberable<Customer>

How to get values from grid view

血红的双手。 提交于 2019-12-22 01:20:15
问题 I have a gridview with editTexts as the individual views in it. I want to save the values that are in each of the editTexts because they are dissapearing when I switch to another fragment or press the home button, so how do I do that? Would I need an array or arraylist that holds all of the views? How would I get the views if I did that? fragment_score_red.xml <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http:/

Add a Pinch zoom for GridView

妖精的绣舞 提交于 2019-12-21 22:37:59
问题 I need to add a pinch zoom for that gridview.I didn't find any samples regarding to add a pinch zoom in gridview.So far my layout looks like this.I need to add a pinch zoom to that gridview. activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativeLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <LinearLayout android:id="@+id

Jquery DataTable Sorting Numeric value column not working properly

半城伤御伤魂 提交于 2019-12-21 21:37:46
问题 In my Asp.net app, I have a Gridview Control and bind it on code behind. And on client side I use Jquery DataTable version 1.9.4 for better Sorting,Searching functionality, Here i got one problem Numeric value not sorting properly. I googled and come to knw by using sType": "numeric" will solved, but when i use this my whole working stoped my Column is at 9 position so i set aTragets 9 Here's the JS FIDDLE Javascript: $(document).ready(function () { $('#ctl00_ContentPlaceHolder1_GridView3')

将 GridView 中的内容导出到 Excel 中多个工作表(Sheet) 的方法

北城余情 提交于 2019-12-21 21:00:00
Excel 可以保存成 xml 格式,并且支持Sheet功能,因此,我们就可以利用这个功能将 Gridview 导出到多个 Sheet 中去。而且可以很好地控制导出的格式。下面就是完整的代码(注意:本站的代码都是可以直接复制、保存成aspx文件运行的。): ASPX 代码 1 <%@ Page Language= " C# " EnableViewState= " true " %> 2 3 <!DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " > 4 5 <script runat= " server " > 6 7 protected void Page_Load( object sender, EventArgs e) 8 { 9 if (!Page.IsPostBack) 10 { 11 System.Data.DataTable dt = new System.Data.DataTable(); 12 System.Data.DataRow dr; 13 dt.Columns.Add( new System.Data.DataColumn( " 学生班级 " , typeof