w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Editable DataGrid is disappearing. Why is this happening?
In your EditCommand event handler, call your Show_Data method in lieu of just calling Databind on the grid. DataGrid_Roster.EditItemIndex = e.Item.ItemIndex; Show_Data(); The data isn't cached between postbacks so it needs to be fetched each time or you need to set up someother caching mechanism.

Categories : C#

Editable list of items GridView or DataGrid
Both the DataGrid and GridView controls are derived from the WebControl class. Although it has a similar object model to that of the DataGrid control, the GridView control also has a number of new features and advantages over the DataGrid control, which include: Richer design-time capabilities. Improved data source binding capabilities. Automatic handling of sorting, paging, updates, and deletes. Additional column types and design-time column operations. A Customized pager user interface (UI) with the PagerTemplate property. Differences between the GridView control and the DataGrid control include: Different custom-paging support. Different event models. Try this link - http://msdn.microsoft.com/en-us/library/05yye6k9(v=vs.100).aspx

Categories : C#

Wpf datagrid changing state from readonly to editable at runtime
you can change the Type of Id from int to string if Id column is Unique you have to make it ReadOnly Or you can Handle it By IvalueConverter Follow this Create a class and Implement IValueConverter public class IntConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null || value.ToString()=="") return 0; return value; } } then Add the Coverter as a resource to your Window xmlns:local="clr-namespace:WpfApplication1" and <Window.Resources> <local:IntConverter x:Key="con

Categories : C#

textarea not editable in Chrome or Webkit nightly, editable in Safari, Firefox and Opera
This is a Webkit bug. It has been fixed in Chromium but as of this writing is still open in Webkit.

Categories : Google Chrome

Can you set certain cells to read only in an editable column for DataTables Editable?
I use the row callback for a similar problem. Something like this: "fnRowCallback": function( nRow, aData, iDisplayIndex ) { /* Append the read_only class to Completed rows */ if ( aData["status"] == "Completed" ) { nRow.className = "read_only"; } }, http://datatables.net/usage/callbacks

Categories : Jquery

DataTables & X-Editable making out of focus items editable
First, move your x-editable setup into its own function: function setupXedit() { $.fn.editable.defaults.mode = 'inline'; $('.LocatorID').editable(); $('.Title').editable(); ... } Then set so that you call the function on every draw: $('#example').dataTable({ "fnDrawCallback": function( oSettings ) { setupXedit(); } });

Categories : Javascript

X - editable input editable on click on other element
It has a function called enable you can use that to enable edit $('.edit').click(function(e){ e.stopPropagation(); $('#publicname-change').editable('toggle'); }); This won't work if you don't add the first line because default behaviour is to disable edit on click of any other element. Edit: To enable editing only on the click of edit button and not the text, set toggle property to manual. $('#publicname-change').editable({ type: 'text', url: '/post', pk: 1, placement: 'top', title: 'Enter public name', toggle:'manual' } JSFiddle

Categories : Javascript

Whole row editable on click of a row in GWT editable grid
I think you could do the job with some things in the "databinding" part of GWT : com.google.gwt.editor.client.Editor

Categories : Gwt

DataGrid edition 'EditItem' is not allowed for this view` when bound to a WPF DataGrid
I tried this and the problem is that you have initialized your Level2 collection as Hashset<>. IEditableCollectionView.EditItem() throws this error while trying to update item in Hashset<>. I initialized the collection as List<> and it was working fine. I am not sure why it is not able to update item in hashset, need to look deeper into it. But changing the Hashset<> to List<> will fix this error. Hope it helps Thanks

Categories : C#

Silverlight Datagrid scrolling, DataGrid fires RowLoading event
The RowLoading event is fired because rows are virtualized. With virtualization, rows are created (and loaded) only when they are visible on screen. So every time you scroll down or up a new row is created, loaded and the RowLoading event fired. To disable the virtualization you can try to set this property: VirtualizingStackPanel.VirtualizationMode="Standard" Be aware that this can slow down the performance of your grid if you have a lot of rows.

Categories : Database

Binding ComboBoxColumn to collection from DataGrid's ItemsSource in WPF DataGrid
MSDN: DataGridComboboxColumns says: To populate the drop-down list, first set the ItemsSource property for the ComboBox by using one of the following options: A static resource. For more information, see StaticResource Markup Extension. An x:Static code entity. For more information, see x:Static Markup Extension. An inline collection of ComboBoxItem types. So basically to just bind to data object`s collection property it`s better to use DataGridTemplateColumn: <DataGridTemplateColumn Header="Log"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding log}" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> This type of c

Categories : Wpf

Copy selected row from datagrid at the end of datagrid
For Datagridview Databound you have to commit additional record to datasource (table) So, you have to do "INSERT INTO mytable ( fields here ... ) VALUES ( values here ..)" then to refresh your datagridview .. dt2.datasource = mytable ADDED : For your code ... try change like this insert_cmd.Parameters.AddWithValue("@Name", .item("Name")) insert_cmd.Parameters.AddWithValue("@Age", .item("Age"))

Categories : Sql Server

Validating A WPF Datagrid Against Data From Another Datagrid
From Microsoft official WPF course materials: ValidationRules are only to be used as simple validations (For instance Required fields, numeric formats, etc). If you need advanced / complex Business Rules validation, you should either implement IDataErrorInfo or create your own validation mechanism (that's what I did and it works like a charm)

Categories : C#

Master-Detail: On row click in master (DataGrid), display details (DataGrid)
If you searched online, you would have found a number of answers. For example, please take a look at the following articles: WPF Master Details MVVM Application Implementing a simple Master-Detail scenario for WPF in MVVM MVVM - Master Detail

Categories : Wpf

Copying data from a datagrid view to a new form with a new datagrid view VB
"Error 1 Reference to a non-shared member requires an object reference." As this message says: You need a instance of form2 - object of type form2created with New sub, which you created inside of BTN_Next_Click. But local variable frm_PI_01 can be used only inside of that function. With name of class form2 you can used only Shared member or functions/subs MSDN Shared members in VB My opinion if you need transfer some information/variables from form to another then in your case(when you transfer data only once when creating form) use a parameters in form constructors. Add another parameter to you form3 constructor. For example reference of your datagridview(this is may be not good practice referenced controls to another form, better create some variable with needed data and reference th

Categories : Vb.Net

Binding datagrid in datagrid
You have problem with DataContext here. In RowDetailsTemplate you trying to binding to a property in main view model, but DataContext of RowDetailsTemplate is the row item. If you want to binding to property in your main view model you should use RelativeSource binding. Try this: <DataGrid ItemsSource="{Binding Path=Files}" SelectedItem="{Binding Path=DataContext.CurentFile, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" AutoGenerateColumns="False" > ...

Categories : Wpf

How to add a new row in sql from datagrid and update sql row from same datagrid?
This article on codeproject does a nice (thorough) job of demonstrating what you are asking. It also comes with some demo code. http://www.codeproject.com/Articles/37430/Datagrid-Editing-Updating-Cancel-Selecting-Rows

Categories : SQL

How can embed datagrid in datagrid
I don't think it's possible. You can indeed manually replace a cell with the HTML of another grid (your "child" grid), but Dojo maintains its data in a store. Your store won't be "aware" of any changes you make in the DOM nodes of your grid, and inserting a DataGrid in a store isn't possible either since the DataGrid maps its columns to properties of the data objects.

Categories : Database

Non editable box with tcl tk and R
This is plain Tcl, not R syntax, but you want to set the widget's state to readonly. That will forbid the user from modifying the value, but it still respects changes to the text variable. You don't need to bind anything, the user cannot focus on the widget. set value 0 entry .e -textvariable value -state readonly button .b -text incr -command {incr value} pack .e .b

Categories : R

Editable GridView
There are several thing you need to do to enable editing Assuming that your data source is an SQLDataSource 1) Add a command field to your girdview columns <asp:CommandField ButtonType="Button" EditText="Edit" ShowEditButton="true"/> 2) Add an update command to your data source <asp:SqlDataSource ID="SqlDataSourceWS" runat="server" ConnectionString="<%$ Connection String %>" SelectCommand=" SELECT COMMAND HERE " UpdateCommand=" UPDATE COMMAND HERE "> <UpdateParameters> <asp:Parameter Name="" /> <asp:Parameter Name="" /> </UpdateParameters> </asp:SqlDataSource> For more information on the command field and how to use it you can look at the Microsoft Developer Network Documentation EDIT Here

Categories : C#

C# Editable TreeViewItem
1) You require 2 events to handle the edit and save part .... you have written the code for saving in the edit part . use OnTreeViewSelectedItemChanged to capture the part when the item is changed. Please check this link Create Event Handler for TreeViewItem in WPF 2) What do you mean by root , only the topmost node or node which has children?

Categories : C#

PHP - Non editable input
Encrypt the value and save the encrypted value in a hidden field in the form. When the form is submitted run the same algorithm on the value of the text field and compare it to the encrypted value. They should match otherwise it has been fiddled with...

Categories : PHP

$(this) not working x-editable
this refers to the options object, and not the jQuery object. If you have the one-off field from which you want to extract the primary key to send to the server, then I would simply do: var $task = $("#task"); $task.editable({ type: 'text', pk: $task.attr("id"), url: '/update_task/' + pk + '/', title: 'Enter task', }); If you are using a more generic selector, such as .someDiv and want the pk for each individual one, you can use the params option with a callback, which allows you to append/overwrite the data to be sent, depending on whether you pass an object or a function (function overwrites, see the docs): $(".someDiv").editable({ type: 'text', pk: 0, // hooray, params takes a callback so // we can get the right context params: function (param

Categories : Jquery

C# editable listview
Listview has a LabelEdit property; when you set it "true", then in an event handler you can call Listview.Items[x].BeginEdit(), and edit an item. As an example, you can handle ListView.DoubleClick event and call BeginEdit right there: private void Form1_Load(object sender, System.EventArgs e) { listView1.LabelEdit = true; } private void listView1_DoubleClick(object sender, System.EventArgs e) { if(this.listView1.SelectedItems.Count==1) { this.listView1.SelectedItems[0].BeginEdit(); } }

Categories : C#

Is this possible? From PDF to Editable Forms
Why would you need to use PHP at all? You can make editable pdf forms. I've downloaded the attached form and, unfortunately, this is not already editable but reconverting them to editable PDF is easy. The most common solution to convert standard pdf to editable pdf forms is acrobat: the guide to do so is here. However, you may find some free or ad-supported services which allow you to do the same thing on the internet. With some googling I've found pdfescape.com. Try to create a new document in pdfescape.com and, under the "insert" menu, choose "Form Field". That's it: you've just added an editable field to your page. Now click the "Save and Download" icon. Once you've done with converting your pdf document from static to editable, you can distribute the pdfs to the agents and they can co

Categories : PHP

X-Editable javascript
Here you go. http://jsfiddle.net/8vTPL/1/ This should at least get you going in the right direction. This example uses basic jQuery concepts to loop through collections. In your case, you want to loop through all of your table rows (line 7): $('#tbl_values tbody tr').each(function(ix,obj... get the id of each row/record (line 8): $(obj).attr('id') then loop through each table-data and x-editable element per that row (line 9): $(obj).children('td').children('.editable').each(function(e_ix,e_obj... get the id of each column/field (line 10): $(e_obj).attr('id') and get the value of each x-editable element in the row (line 11): $(e_obj).editable('getValue')[$(e_obj).attr('id')] Alternatively, you could just get the object that X-editable stores as the value: $(e_obj).editable

Categories : Javascript

UITableView certain rows not editable
Try to add this to class, when you implement eatable view delegate: - (void)setEditing:(BOOL)editing animated:(BOOL)animated { automaticEditControlsDidShow = NO; [super setEditing:editing animated:animated]; if (editing) { automaticEditControlsDidShow = YES; [self.tableView insertRowsAtIndexPaths:addRow withRowAnimation:UITableViewRowAnimationLeft]; } else { [self.tableView deleteRowsAtIndexPaths:addRow withRowAnimation:UITableViewRowAnimationLeft]; } } Or try to implement your editingStyleForRowAtIndexPath method. For Example: - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete; }

Categories : Iphone

How to create editable Pdf form in php
What you are doing is just to print a form onto a PDF, but not to provide editable features. Your form is still non-editable. You have to use Acrobat SDK to make editable forms.

Categories : PHP

Put caret on end of editable div like twitter does
A couple of things before I have an attempt at this: Please do not add elements into the dom as strings - "return ..". You'll have a hard time performing other actions with this node. Instead I suggest, you use DOM APIs (create/remove/replace/append/etc) to perform these functions. My suggestion will be clear as you read through. You return a new string and you blindly set the HTML to that particular string - you are losing all the text before it. Example: Hello my name is @testuser1 becomes only @ - you lose "Hello my name is" Solution: To take care of carrot placements, you have to remember the selection of the user. Note - if you change the HTML, the browser will lose this selection; hence, you need to track this manually. Before you 'replace' the text, you can get the selection b

Categories : Javascript

Editable pages approach
If you want to use ASP.NET MVC I think the best solution is to look into Orchard. It's really easy to get up and running, has a rich set of existing modules and building a module from scratch is really easy. This was actually started by a couple of Microsoft guys and then spun out into it's own open source project. http://www.orchardproject.net/

Categories : Asp Net Mvc

Multiline questionaire editable
To cover unknown line-height one can use JavaScript to determine the line-height by adding a line of text and measure the height-difference. In a second step, when height contains the line-height inside the editable area you can dynamically generate a background-image: var svg = "<svg xmlns='http://www.w3.org/2000/svg' width='1' height='" + height + "'><line x1='0' y1='" + height + "' x2='1' y2='" + height + "' stroke='black' stroke-width='1px'/></svg>"; your_element.setAttribute('style','background-image: url("data:image/svg+xml;utf8,' + svg + '")}'); This creates an svg-image which may be a compatiblity issue. If you need wide cross-browser support, you could also: just store images with all possible heights create a gif/png on the fly and encode it using base64

Categories : Javascript

editable dynamic php table
You can use HTML5 Content Editable too. Here is a simple fiddle illustrating it. dom.contentEditable = true; Set that and any DOM object can be edited. You may probably use the click event to enable or disable content editable property.

Categories : PHP

Apply x-editable for new appended td's
The reason why x-editable or many other JQuery plugins do not act on newly rendered elements is because they apply only on the already rendered elements. The solution is to reload the function, and add new listeners. Please check this Fiddle function returnAccess() { // setup editable for new elements created in the DOM $('#users a').editable({ type: 'text', name: 'username', url: '/post', title: 'Enter username' }); //ajax emulation $.mockjax({url: '/post', responseTime: 200 }); } //button trigger $("button").click(function() { randomID = Math.floor(Math.random()*1000001); var col = "Mike" $( "#users" ).append(col); returnAccess(); }); // trigger function in the beginning returnAccess(); Here is the HTML

Categories : Jquery

Button value set in editable div when click on
Try the below code: (EDIT Modified as user has subsequently indicated that he will use this to create a calculator) We are doing the following: Assign an onclick function to the button. This will be called whenever the button is clicked. An ID is added to both the button tag and the div tag to access them using the getElementById method in JavaScript. this.value will pass the value of the button that is currently clicked to the function. Inside the JavaScript, we get the value of the button and set it to the innerHTML of the required div. Note: Since += is used, it would take the current contents of the div and append the button's value to it (like, if 1 is pressed followed by 2, the div would have 12 as its content). HTML <button value="1" id='btn1' onclick='setBtnValue(this.valu

Categories : Javascript

Make only one column editable
Using Template seems like the only option. I switched to Ajax binding so I'm using ClientTemplate column.Bound(x => x.IsActive) .ClientTemplate("<input type="checkbox" name="checkedRecords" value="<#= Id #>" <#= IsActive ? "checked='checked'" : '' #> />") .HeaderTemplate(@<text>@Html.CheckBox("checkAll")</text>); Now I just need to figure out how bind a checkbox click to a command.Update().

Categories : Misc

Only allow some rows to be editable in ng-grid
The workaround I came up with is to replace the cellEditTemplate in the $templateCache with an extra condition on the ng-edit-cell-if directive. For example, we want row 0 to be editable and row 1 to be read only: $templateCache.put("cellEditTemplate.html", "<div ng-cell-has-focus ng-dblclick="editCell()">" + " <div ng-edit-cell-if="!isFocused || row.rowIndex == 1"> " + " DISPLAY_CELL_TEMPLATE" + " </div>" + " <div ng-edit-cell-if="isFocused && row.rowIndex == 0">" + " EDITABLE_CELL_TEMPLATE" + " </div>" + "</div>" );

Categories : Javascript

Using X-Editable - Backend part
Looking in a project I worked on a few months back (sorry about the mysql_ stuff – not my choice!) Something like: <? include your/database/connection_stuff.php; // Can't remember if x-editable passes the table in as well or not $table = mysql_real_escape_string($_GET['table']); // If not, $table = 'name_of_table'; $value = mysql_real_escape_string($_POST['value']); $name = mysql_real_escape_string($_POST['name']); $pk = mysql_real_escape_string($_POST['pk']); $result = mysql_query("UPDATE `$table` SET `$name` = '$value' WHERE id = '$pk'"); ?> Will do the trick.

Categories : Ajax

Editable fields in Spring MVC
You can use a <a href tag as follows: <a href="<c:url value="/editpage"/>">${product.text}</a> Therefore, in your example above, you could use the following: <tr> <td>Name: </td> <td><a href="<c:url value="/editpageforname"/>">${product.name}</a></td> </tr> <tr> <td>Text: </td> <td><a href="<c:url value="/editpagefortext"/>">${product.text}</a></td> </tr> Your edit page link urls will have to be the correct link to that edit page. Alternative: However, another way to make the fields editable is to use the spring <form> tags as below: <form:input path="name" placeholder="${product.name}" /> <form:input path="text" placeholder="${produc

Categories : Spring

Editable DIV Add some text at cursor
I think I found a more appropriate solution for your problem. For demonstration see this Fiddle. See also the css property word-wrap. Java Script: var button = document.getElementById('insertText'); button.onclick = function() { var text = document.getElementById('textarea').value; document.getElementById('insertHere').innerText = document.getElementById('insertHere').textContent = text }; To achieve cross browser compatibility, you could also do this: var isIE = (window.navigator.userAgent.indexOf("MSIE") > 0); if (! isIE) { HTMLElement.prototype.__defineGetter__("innerText", function () { return(this.textContent); }); HTMLElement.prototype.__defineSetter__("innerText", function (txt) { this.textContent = txt; }); }

Categories : Javascript

Editable textbox in jQuery
Try to use contentEditable attribute $(".double").get(0).contentEditable = "true"; the contenteditable attribute is an enumerated attribute whose keywords are the empty string, true, and false. The empty string and the true keyword map to the true state. The false keyword maps to the false state. In addition, there is a third state, the inherit state, which is the missing value default (and the invalid value default). DEMO1 | DEMO2

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.