|
Hello!
When using a virtual listview, is it possible get new items added to the top of the listview instead of the bottom?
|
|
|
|
|
Hi!
Of course it is. With a virtual LV you handle the collection of items yourself.
If you insert new items into your element collection at the beginning, then these elements should appear at the top of the LV as well (if you create the ListViewItems according to the order of your element collection, which usually is the case).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
But then I guess you mean I have to store all elements in some list (with the newest items first) and clear the listview every time I want to update it.
|
|
|
|
|
You don't have to clear the LV on every update. When the LV is in virtual mode, you're getting notified every time the LV needs to show a ListViewItem.
In this event handler you create a ListViewItem and return it to the LV.
In order to be able to know which element to create a ListViewItem for, you get an index into the list of elements. If you insert elements at the beginning of your list (and set the VirtualListSize accordingly), you'll be able to see the results immediately.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi
I have spent the last few days surfing the net on WCF and on how to configure it, but I can't seem to find the correct solution.
I have made an application, that is used on internal lan (Client/Server). I would like to use the existing windows logon, and integrate with the local domain controller.
Additional I would like to have the option to enter an other windows logon, than the one the user is currently logged on with.
Security is not that big a concern, because all traffic is internal and the information is not very sensitive - but of cause it should not be ignored.
I would like to avoid having to setup SSL and manage certificates - It makes it harder to deploy, and if I have to purchase a certificate for every customer, it raises the price of the product.
How would you recommend setting up WCF in this scenario?
|
|
|
|
|
For a start, as it is internal, I would use NetTcpBinding. I'm not sure what else you want to know, but it's easy enough for you to get the windows user.
When it comes to using the user information, you can retrieve the users identity back like this:
WindowsIdentity id = ServiceSecurityContext.Current.WindowsIdentity; If you want to perform some impersionation with this value, you would just use:
using (id.Impersonate())
{
}
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi Pete
Thank you for the speedy reply!
Is it really that simple? - I looked at message security configurations, that seemed far more complex.
E.g http://msdn2.microsoft.com/en-us/library/ms789011.aspx
Do you know how to specify the credentials on the client side, if entered manually?
|
|
|
|
|
Hi,
My code is
string connectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Documents and Settings\\venki\\My Documents\\Visual Studio 2005\\Projects\\CallCenterProject\\CallCenterProject\\new.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";
SqlConnection conn = new SqlConnection();
conn.ConnectionString = connectionString;
SqlCommand cmd1 = new SqlCommand();
cmd1.Connection = conn;
cmd1.CommandText = "SELECT * FROM CustomerDetails WHERE OwnerId='" + label4.Text + "'";
cmd1.CommandType = CommandType.Text;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd1;
DataSet DataSet2 = new DataSet();
da.Fill(DataSet2, "CustomerDetails");
ReportDocument rpt = new ReportDocument();
rpt.SetDataSource(DataSet2); crystalReportViewer2.ReportSource = rpt;
*****************************************************************************
I am getting an error at the above bolded statement.
Please Help Immediately..........
Priya
|
|
|
|
|
iet2000 wrote: Please Help Immediately..........
This is a volunteer only forum. We'll help when we can.
What error are you getting? Without this small but absolutely vital piece of information, there's absolutely nothing that we can do to help.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: This is a volunteer only forum. We'll help when we can.
We expressed our urgency. Thats it....Persons who can understand the situation may give the reply immediately.... capabilties is not the issue here....We just want the solution to our problem...
No hard feelings
the error is " invalid report filepath".... at
ReportDocument rpt = new ReportDocument();
rpt.SetDataSource(DataSet2);
Regards
Priya
|
|
|
|
|
You have got to be freaking kidding me.
If you can't figure out what the problem is from that error message, you shouldn't be programming in the first place.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Your attitude stinks and it doesn't surprise me you received little help.
Plenty of hard feelings.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Malcolm Smart wrote: Your attitude stinks and it doesn't surprise me you received little help.
Whatever it is.... We got plenty of help from most of the subscribers of this site......Because its not our attitude but the perception is stinking...
Dont get surprised....By the way its better if you get to know that this is not the platform to demoralise others....
If you want to respond to for any messages just see whats the problem regarding the subject not the way it is portrayed.
We least bothered about the replies for this message!!!!!!
Priya
|
|
|
|
|
I have created service using WCF named pipe binding. I want to check whether any of my end point for the service with particular address is in use or not? How I can do it?
e.g. I have configured the endpoint using address "net.pipe//localhost/Test/ABC". Now if client tries to connect to the same end point again I want to catch this situation.
Can any one suggest the idea or direct me towards some documentation on it.
Thanks
Krunal C
|
|
|
|
|
Hello there
I have a Listview on a form that gets data when a user types in a barcode and it checks the database and loads the productname,sellingprice in the listview
I have 2 similar questions:
How would I send the listviews sellingprices to a total variable using a loop ofcos and
how do i send the data from the listview to any other location like textbox,listbox etc
|
|
|
|
|
All data in items of ListView is contained in ListView.Items collection.
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 100; i++) {
listView1.Items.Add(new ListViewItem(new string[] { "Product " + i.ToString(), i.ToString()}));
}
}
private void label1_Click(object sender, EventArgs e)
{
int sum = 0;
listBox1.Items.Clear();
foreach (ListViewItem item in listView1.Items) {
sum += int.Parse(item.SubItems[1].Text);
listBox1.Items.Add(item.Text + ": " + item.SubItems[1].Text);
}
label1.Text = "Sum: " + sum.ToString();
}
This code assumess that you have a listBox1, listView1, label1 and the listView1 has two columns : "Product Name" and "Price"
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Thanks a Million
This code is perfect
I tweaked it with what i currently have and so far it seems to work perfect
I must still add a qty field but i will keep u posted
Thanks
|
|
|
|
|
I'm glad I could help.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
hi all,
I am trying to display a xml file in a datagridview.
i am using windows application with C#.
say for example, i have a xml file like this,
<xml version="1.0" encoding="UTF-8">
<maincategory>
<cat1>
<title>Category1</title>
<link>http://www.w3schools.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepix/09_2007/flames_ramsetu90.jpg" >some description</description>
</cat1>
<cat2>
<title>Category2</title>
<link>http://www.ibnlive.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepix/09_2007/rahul_gandhi_white90.jpg"
>some description</description>
</cat2>
</maincategory>
in the description i have a img tag containing a image from any site.
i have columns to display title,description.
i need to display the image along with the text in the same column description.
Adding an image column will display the image as a separate column. how can i display the image in the same column
along with the text?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Hello...
I have a problem. I have a form, the form has 2 panels. Left and right. Left has 50% of form width, right also. I want to keep this 50% always. If someone resize the form, after resize, the size of left panel must be 50% of form and right 50% of form also. How to do that ?
Thanks...
|
|
|
|
|
Handle Resize event of a form
void Form_Resize(...)
{
panLeft.Width = this.Width / 2;
}
... assuming that:
panLeft.Dock = ...Left
panRight.Dock = ...Fill
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Drop a TableLayoutPanel on your form, make it have 1 row and 2 columns. Either dock it to the entire form or Anchor all four sides. Drop your Panel controls in the two cells in the TLP and dock them for Fill.
Done, and no code on your part to handle the resizing.
|
|
|
|
|
I need to Creat a report in C# Winform Application.The Report must contain a Guntt Chart.I want to use the CrystalReport to finish it.how should I do .I never do it before.
Is Anyone who Know it?Will please tell me!
Great thanks!
This is the first time I came this site!Wish everyone enjoy yourself everyday!
By the way, I am in BeiJing,China.Welcome all of you come to Beijing next year for Olympic Games.I can provide abode for you.hehe!wish to be close friends with you!
Thanks again!
My MSN is : uranus1225@hotmail.com
wish you to add it!
|
|
|
|
|
I was going to take you up on your kind offer of an abode, but as I am English, and not American, you haven't made me feel welcome!! Good luck with hosting the games, and get that smog cleared!
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Bobby Moore!
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|