TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rathi rathi
NA
19
0
sortcode for DataGrid control
May 31 2006 7:49 AM
protected void Sortdg_SortCommand(object source, DataGridSortCommandEventArgs e) { if (!Page.IsPostBack) { SqlConnection BindConnection = new SqlConnection("Data Source=AB2\\SQLEXPRESS;Initial Catalog=Tiger;Integrated Security=True"); SqlCommand comBindData = new SqlCommand("select * from stock", BindConnection); comBindData.CommandType = CommandType.Text; SqlDataAdapter myAdapter = new SqlDataAdapter(comBindData); DataSet ds = new DataSet(); myAdapter.Fill(ds); DataView dvSort = new DataView(ds.Tables[0]); Sortdg.DataSource = dvSort; Sortdg.DataBind(); dvSort.Sort = e.SortExpression; } } This above code I am using to sort my datagrid but its not working out give me a solution with the same code or a different one. Regards, Rathi
Reply
Answers (
0
)
Problems using graphic object to display text on tabPage
datagridviewcomboboxcolumn