15,892,809 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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; }
}
}
}
sampath55
5-Aug-10 15:24pm
View
Deleted
<usercontrol xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
="" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:class="silverlightgridview.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d" d:designwidth="640" d:designheight="480">
<grid x:name="LayoutRoot" background="White">
<textblock text="the silverlight 2 datagrid columns">
<data:datagrid x:name="grdDisplay" isreadonly="False"
="" autogeneratecolumns="False" rowbackground="Beige" alternatingrowbackground="BlanchedAlmond" columnwidth="50" gridlinesvisibility="Horizontal" horizontalgridlinesbrush="Blue" headersvisibility="Column" selectionmode="Single">
<data:datagrid.columns>
<data:datagridtextcolumn header="FirstName" width="100" binding="{Binding FirstName}">
<data:datagridtextcolumn header="LastName" width="100" binding="{Binding LastName}">
<data:datagridtextcolumn header="salary" width="100" binding="{Binding salary}">
<data:datagridcheckboxcolumn header="Is Vested" isreadonly="True" binding="{Binding IsVested}">
<data:datagridtemplatecolumn header="StartDate">
<data:datagridtemplatecolumn.celltemplate>
<datatemplate>
<textblock text="{Binding Path=StartDate}">
<data:datagridtemplatecolumn.celleditingtemplate>
<datatemplate>
<controls:datepicker selecteddate="{Binding StartDate,Mode=Twoway}">
sampath55
29-Jul-10 10:27am
View
which control can i use to develop this application
sampath55
4-Jun-10 14:30pm
View
here you adding one row only i want add no of rows using database this way how to do
Show More