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
Nirmal KumarC
1.4k
327
78.6k
How to Dropdown Value distict particular one column distinct
Nov 6 2014 3:58 AM
iMy Source Wise Gridview Dropdown More Time Display How to Solve this Problem,
My Source is:
private void LoadAdjustLeave()
{
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da;
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
try
{
//string sql = " select USER_ID as UserID, LateDays,Leave,Remainingminutes,Month,Year from Accounts_LateEntry_Salary_Deduct where User_ID='" + gvStaffDetails.SelectedRow.Cells[2].Text.ToString().Trim() + "'";
string sql = "select convert(VARCHAR(12),LeaveDate) as leavedate, InformType, TotalDays, Leave,Applyhrs from deletetable where UserID='" + gvStaffDetails.SelectedRow.Cells[2].Text.ToString().Trim() + "' and Month='" + Session["paymonth"] + "' and Year='" + Session["payyear"] + "'";
da = new SqlDataAdapter(sql, con);
//DataSet ds = new DataSet();
DataTable dt = new DataTable();
da.Fill(dt);
con.Open();
gvadjustleave.DataSource = dt;
Session["AdjustLeave"] = dt;
gvadjustleave.DataBind();
con.Close();
}
catch (Exception Ex1)
{
LblErr.Text = Ex1.Message.ToString();
return;
}
}
I want Dropdown Data(Distinct) Load This Result
Prior
Late informed
Not Informed
Attachment:
dropdownloaddatamoretime.rar
Reply
Answers (
0
)
Preprocessor directives
How to get dynamic data from the database and display chart