15,907,910 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 seliya hilal (Top 4 by date)
seliya hilal
20-Apr-12 0:54am
View
when i m trying to do without designing report it returns error as report don't have any table.
Problem is that every time i use different user id,password and server(in Online And Local Area Network)
seliya hilal
19-Apr-12 8:08am
View
Is it compulsory to design crystal Report In Asp.Net...
Can We Use Dataset Or DataTable Directly Without Designing Crystal Report???
When i m Trying it returns Error.
Any Idea Please Help
seliya hilal
22-Mar-12 6:15am
View
For filtering filter using session which will hold value after postback
You have to write textbox value in session
write code where you using sql expression..
Eg..
String sql="Select * From Table_Name ";
If(!String.IsNullOrEmpty(txtFirstname.text))
{
sql+= txtFirstname.text;
}
seliya hilal
22-Mar-12 6:08am
View
===============
The code below works when columns are created explicitly as declerative >><asp:BoundField DataField="ID" HeaderText="ID" SortExpression="" />
===============
AllowSorting
="True"
OnSorting
="GvEvent_Sorting"
<
asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="MyDate" SortExpression
="MyDate">
#region GV_sort event and Sort Direction
protected void GvEvent_Sorting(object sender, GridViewSortEventArgs e)
{
//Retrieve the table from the session object.
DataTable dt = Session["MyDS"] as DataTable;
if (dt != null)
{
//Sort the data.
dt.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression);
GridView Gv = (GridView)sender;
Gv.DataSource = Session["MyDS"];
Gv.DataBind();
}
}
private string GetSortDirection(string column)
{
// By default, set the sort direction to ascending.
string sortDirection = "ASC";
// Retrieve the last column that was sorted.
string sortExpression = ViewState["SortExpression"] as string;
if (sortExpression != null)
{
// Check if the same column is being sorted.
// Otherwise, the default value can be returned.
if (sortExpression == column)
{
string lastDirection = ViewState["SortDirection"] as string;
if ((lastDirection != null) && (lastDirection == "ASC"))
{
sortDirection = "DESC";
}
}
}
// Save new values in ViewState.
ViewState["SortDirection"] = sortDirection;
ViewState["SortExpression"] = column;
return sortDirection;
}
#endregion