Click here to Skip to main content
15,892,809 members

Comments by sampath55 (Top 8 by date)

sampath55 12-Oct-10 2:53am View    
WHEN I CLICK THE THAT SMS BUTTON THIS IS ERROR IS COMING
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
sampath55 9-Aug-10 15:47pm View    
ya done
sampath55 5-Aug-10 15:26pm View    
i Want solution in silver light
sampath55 5-Aug-10 15:25pm View    
i try it but the browser is notshowing the data grid
sampath55 5-Aug-10 15:24pm View    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Data;


namespace silverlightgridview
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
List<employee> employeelist = new List<employee>();
employeelist.Add(new Employee { FirstName = "John", LastName = "Smith", Salary = 55000, StartDate = new DateTime(2003, 10, 13), IsVested = true });
employeelist.Add(new Employee { FirstName = "Jim", LastName = "Smith", Salary = 55000, StartDate = new DateTime(2006, 1, 13), IsVested = true });
employeelist.Add(new Employee { FirstName = "Brady", LastName = "Johnson", Salary = 70000, StartDate = new DateTime(1999, 4, 20), IsVested = false });
employeelist.Add(new Employee { FirstName = "Brenda", LastName = "Smith", Salary = 65000, StartDate = new DateTime(2000, 12, 1), IsVested = false });
employeelist.Add(new Employee { FirstName = "Bob", LastName = "Richards", Salary = 50000, StartDate = new DateTime(2004, 11, 13), IsVested = false });
employeelist.Add(new Employee { FirstName = "Sue", LastName = "Doe", Salary = 85000, StartDate = new DateTime(1990, 3, 2), IsVested = true });

CreateColumns();

grdDisplay.ItemsSource = employeelist;
}
private void CreateColumns()
{
//text columns
DataGridTextColumn textColumn1 = new DataGridTextColumn();
textColumn1.Header = "First Name";
textColumn1.Binding = new Binding("FirstName");
textColumn1.Width = new DataGridLength(100);
grdDisplay.Columns.Add(textColumn1);

DataGridTextColumn textColumn2 = new DataGridTextColumn();
textColumn2.Header = "Last Name";
textColumn2.Binding = new Binding("LastName");
grdDisplay.Columns.Add(textColumn2);

DataGridTextColumn textColumn4 = new DataGridTextColumn();
textColumn4.Header = "Salary";
textColumn4.Binding = new Binding("Salary");
grdDisplay.Columns.Add(textColumn4);

DataGridCheckBoxColumn checkBoxColumn = new DataGridCheckBoxColumn();
checkBoxColumn.Header = "Is Vested";
checkBoxColumn.Binding = new Binding("IsVested");
checkBoxColumn.Width = new DataGridLength(75);
grdDisplay.Columns.Add(checkBoxColumn);

DataGridTemplateColumn templateColumn = new DataGridTemplateColumn();
templateColumn.Header = "Start Date";
templateColumn.CellTemplate = (DataTemplate)Resources["datetemplate"];
templateColumn.Width = new DataGridLength(100);
grdDisplay.Columns.Add(templateColumn);
}
public class Employee
{
public string FirstName { get; set; }
public string LastName { get; set; }
public decimal Salary { get; set; }
public DateTime StartDate { get; set; }
public bool IsVested { get; set; }
}
}
}