|
Good Morning onyang2
You have to be carefull with the names.
There is a GridView and a Datagrid.
is this a Windows App or a Web App ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
that is a gridview, you must asp such questions in the ASP.NET Forum next time.
here is a solution
http://www.dotnetfunda.com/articles/article131.aspx[^]
http://www.dotnetfunda.com/articles/article121.aspx[^]
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
listbox is having more than one value....
how to get those value to one string?
|
|
|
|
|
Hi,
well you could iterate through the listbox-items and concat their text-properties. Just something like this:
StringBuilder oBuilder = new StringBuilder();
foreach(object oCurItem in myListbox.Items) {
oBuilder.Append(oCurItem.ToString());
}
string sResult = oBuilder.ToString();
Let me know if this helps you.
Regards
Sebastian
|
|
|
|
|
StringBuilder sb = new StringBuilder();
foreach (string s in listBox1.Items)
sb.Append(s);
|
|
|
|
|
string s = "";
for (int i = 0; i < lstSelected.Items.Count; i++)
{
if (s != "")
{
s = s + "," + lstSelected.Items[i].ToString();
}
else
{
s = lstSelected.Items[i].ToString();
}
}
But S-->is getting "System.Data.DataRowView" value instead of listbox item.
|
|
|
|
|
Try to use
<br />
<br />
((System.Data.DataRowView) lstSelectedItems.Items[i]).Item[0].ToString()<br />
<br />
instead.
|
|
|
|
|
StringBuilder s = new StringBuilder();
for (int i = 0; i < lstSelected.Items.Count; i++)
{
s.Append(lstSelected.Items[i].Text);
}
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
foreach (DataRowView item in listBox.Items)
{
txtBox.Text += item.Row["RowNameYouWant"].ToString() + "\n";
}
|
|
|
|
|
i wanna know how to create random numbers in c#. in my application i need to provide a default password if the user forgets the password. i wanna give this default password in the form of random numbers. pls help...
|
|
|
|
|
|
Hello Givya,
Have you tried searching[^]?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi
Use Random class like
Random r = new Random();
givya wrote: in my application i need to provide a default password if the user forgets the password
IMO ,If possible try to provide forgot password functionality like [Hint Question or Alternate Email]...
himanshu
|
|
|
|
|
I gave the following code to generate the random string(searched it on internet).
private string RandomString(int size, bool lowerCase)
{
StringBuilder builder = new StringBuilder();
Random random = new Random();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
if (lowerCase)
return builder.ToString().ToLower();
return builder.ToString();
}
Bt its giving the following error:
A using namespace directive can only be applied to namespaces; 'System.Text.StringBuilder' is a type not a namespace
I hav used this also: "using System.Text.StringBuilder;"
Pls help
|
|
|
|
|
Hi.
i get system date in this format "mm/dd/yyyy" like "07/15/2009" now i want to change date format like this "15-JUL-2009"
how can i do??
thanks in Advance
jawad khatri
|
|
|
|
|
|
Try this
DateTime dt = DateTime.Now;
MessageBox.Show(dt.ToString("dd/MMM/yyyy"));
<pre>
<div class="ForumSig">Regards,
Karthik K...</div>
|
|
|
|
|
|
see this use this namespace
System.Globalization;
DateTimeFormatInfo DTFI = new CultureInfo("hi-IN", false).DateTimeFormat;
//here 'hi-EN' represent the Hindi-INDIA Indian culture here georgian
//calender formate ie dd/MM/yy
DTFI.DateSeparator = ":";
Label1.Text = DTFI.Calendar.ToString();
//we will ge the calender in formation
Label1.Text = DTFI.FullDateTimePattern.ToString();
//give the Date/time/year formate of that culture
Label1.Text = DTFI.LongDatePattern;
Label1.Text = DTFI.ShortDatePattern;
|
|
|
|
|
please help me
I want fill color between two curves in the zedgraph control.please help me.
|
|
|
|
|
I want to save jpg image 100 X 150 size in color format of 256color to reduce its size ..........
suggest me any c# function
|
|
|
|
|
|
btw, there's no such thing as a 256 color jpeg
|
|
|
|
|
this can help you
Image img=new Bitmap("filepath.jpg");
Bitmap bmp=null;
for(int i=0;i<img.Width;i++)
{
for(int j=0;j<img.Height;j++)
{
Color col=img.GetPixel(i,j);
int avg=((col.R+col.G+col.B)/3);
img.SetPixel(i,j,Color.FromArgb(avg,avg,avg));
}
}
MemoryStream mem=new MemoryStream();
img.Save(mem,ImageFormat.Gif);
bmp=new Bitmap(mem);
this.pictureBox1.Image=bmp;
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|