Skip to main content

Posts

ajax call using jquery in asp.net

Event: <a class="btnTwo btnTwoOrange btnSelectSend" href="JavaScript:" id="btnSelectSend" onclick="SendEmail();">Gönder</a> Javascript: <script type="text/javascript"> function SendEmail() { var bookId = document.getElementById("BookID").value; var name = document.getElementById("sendername").value; var email = document.getElementById("senderEmail").value; $.ajax({ type: "POST", url: "Forbes.aspx/SendEmail", data: "{ bookId: '" + bookId + "',name: '" + name + "',email: '" + email + "'}", contentType: "application/json; charset=utf-8", dataType: "json", async: "true", cache: "false", success: function (...

kendo ui grid hide toolbar button

If you want to hide or show any toolbar button (Add, Edit & delete) of kendo UI grid you can use this script . $(document).ready(function () { // Your Grid // menu enable & disable var MenuEdit = '@ViewData["MenuEdit"].ToString()'; alert(MenuEdit); if (MenuEdit == 0) { $(".k-grid-add", "#DefaultGrid").hide(); $(".k-grid-edit", "#DefaultGrid").hide(); $(".k-grid-delete", "#DefaultGrid").hide(); } else { $(".k-grid-add", "#DefaultGrid").show(); $(".k-grid-edit", "#DefaultGrid").show(); $(".k-grid-delete", "#DefaultGrid").show(); } }); Note: Define the script after your Ke...

Kendo UI Grid show no data text in to grid

if you want to show no data in to the grid when the grid datasource will be empty use this in to grid script  //No data in the grid show message function gridDataBound(e) { var grid = e.sender; if (grid.dataSource.total() == 0) { var colCount = grid.columns.length; $(e.sender.wrapper) .find('tbody') .append('<tr class="kendo-data-row"><td colspan="' + colCount + '" class="no-data EmptyGrid">There is no data to show in the grid.</td></tr>'); } };

WPF datagrid cell textbox change event

Entity/Class: public class FeesDetails : INotifyPropertyChanged { public int Id { get; set; } public string FeesName { get; set;} public string FeesDetailsName { get; set; } public int? PaidAmount { get; set; } public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(System.String info) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(info)); } } public int feesAmount { get; set; } public int FeesAmount { get { return this.feesAmount; } set { if (value != this.feesAmount) { this.feesAmount = value; NotifyPropertyChanged("FeesAmount"); } } } } XAML: <DataGrid AutoGenerateColumns="False" Height="21...