15,992,880 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 .NET 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 niki_nilu (Top 9 by date)
niki_nilu
22-Aug-12 8:38am
View
not understand
if viewstate is automaticaly save
then why use code.
niki_nilu
22-Aug-12 2:31am
View
i don't know about viewstate code.
niki_nilu
10-Aug-12 6:37am
View
i think no one know about the Enterprise library
niki_nilu
9-Aug-12 5:49am
View
pls tell me how to use
executescalr(cmd)
when i used query.
niki_nilu
6-Aug-12 3:31am
View
hello
i want to use microsoft enterprise tool.
pls give me a sol
niki_nilu
28-Jun-12 7:30am
View
what happened no one answered my question?
niki_nilu
28-Jun-12 7:30am
View
what happened no one answered my question?
niki_nilu
28-Jun-12 6:40am
View
pls tell me solution.
niki_nilu
28-Jun-12 6:23am
View
My code---on Done btn--
listLeave.SelectionMode = ListSelectionMode.Multiple;
for (int i = 1; i < listLeave.Items.Count; i++)
{
if (listLeave.Items[i].Selected)
{
j = "";
j = listLeave.Items[i].Value;
if (j == "(select)")
{
iDeptFlag = 1;
}
}
}
if (iDeptFlag == 1)
{
lblResultMessage.Text = "";
lblResultMessage.Text = "Please select proper value.";
lblResultMessage.ForeColor = System.Drawing.Color.Red;
return;
}
else
{
int i;
txtTypeOfLeave.Text = "" + " ";
for (i = 0; i < listLeave.Items.Count; i++)
{
if (listLeave.Items[i].Selected)
{
txtTypeOfLeave.Text = txtTypeOfLeave.Text + listLeave.Items[i].Value + "" + ",";
}
}
if (txtTypeOfLeave.Text.Length > 0)
{
txtTypeOfLeave.Text = txtTypeOfLeave.Text.Remove(txtTypeOfLeave.Text.LastIndexOf(","), 1);
}
}
}
and on gridview_rowediting event
int index = e.NewEditIndex;
txtTypeOfLeave.Text = grdvEarningHead.Rows[index].Cells[6].Text;
string[] ar = txtTypeOfLeave.Text.Split(',');
string[] text = new string[10];
int v = 0;
for (int j = 0; j < ar.Length; j++)
{
for(int k = 0 ; k < listLeave.Items.Count ; k++)
{
if (ar[j] == listLeave.Items[k].Value)
{
text[v] = listLeave.Items[k].Text;
v++;
//listLeave.Items[k].Selected = true;
}
}
}
int count = 0;
foreach (string value in text)
if (value !=null ) ++count;
for (int i = 0; i < count; i++)
{
for (int k = 0; k < listLeave.Items.Count; k++)
{
if (text[i].ToString () == listLeave.Items[k].Text.ToString () )
{
listLeave.SelectedItem.Text = text[i];
}
}
}
this is my code pls help me its not run.
thanks
Show More