|
Now in that you're totally right. Simple mistake. Well spotted.
|
|
|
|
|
(Psst... I never use Environment.Newline either.)
|
|
|
|
|
Hey..
I'm lokking after one exampel to show me how can i make a Logon Script in C# to map network drive or to install a priner.
Can any body help me to refer to a site with exampel or can any body show me how i can do it.
Thansk very mutch..
SOry my english..
|
|
|
|
|
|
hi
when i am installing setup project i got sqlncli.dll
pls anybody give solution how i can i overcome that probalm
|
|
|
|
|
sekhar2008 wrote: when i am installing setup project i got sqlncli.dll
pls anybody give solution how i can i overcome that probalm
This does not describe a problem.
sekhar2008 wrote: when i am installing setup project i got sqlncli.dll
This describes possesion of a DLL file when you are installing your application. Typically that is not a problem.
|
|
|
|
|
when i am installing setup (project) i got error like
error:this application has failed to start because sqlncli.dll was not found.re-installing the application may fix this probalm.
pls idea how can i over come that problam
|
|
|
|
|
Remove the reference to sqlncli and then if it's needed re-add it.
|
|
|
|
|
Hi all,
After updating my Listview I wish that the first visible line will remain the same as before.
Iv'e tried setting the TopItem property to the correct item, and well - sometimes it works and sometimes it doesn't.
For example:
lvwMyListview.TopItem = lvwMyListview.Items[myItemIdx];
and after that call the result is that myItemIdx != lvwMyListview.TopItem.Index (for example: myItemIdx == 47 while lvwMyListview.TopItem.Index == 44).
I could understand this behaviour if this is the case (taken from MSDN):
"If you set the TopItem property to an item in the last page of the ListView, the item will automatically be scrolled into view; however, TopItem will be set to the actual top item of the last page."
However - this is not the case! even if the visible part of my listview contains only one line (index 47 for example), the new top item index if different (44 for example, meaning I need to scroll 3 lines down to get the desired line visible).
Does anyone has any explenations\solutions for this behaviour?
Thanks a lot!
Eyal.
|
|
|
|
|
Maybe the index of the choosen item (your first visible line) changes in the updating process.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
No, the index remains the same
As I've demonstrated:
lvwMyListview.TopItem = lvwMyListview.Items[myItemIdx];
right after this line:
myItemIdx == 47;
lvwMyListview.TopItem.Index == 44;
Thanks!
|
|
|
|
|
No, you haven't demonstrated it: you showed that myItemIdx remains the same, as it must be, not that it still corrensponds to your preferred list item, or am I wrong?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
I'll write whe flow - things should become more clear:
1. current situation: lvwMyListview.TopItem.Index == 0.
2. assigning: "lvwMyListview.TopItem = lvwMyListview.Items[myItemIdx];", where myItemIdx == 47;
3. current situation: lvwMyListview.TopItem.Index == 44, despite the fact that it's not at the last visible page.
Is it clearer now?
Thanks a lot!
|
|
|
|
|
eyalbi007 wrote: Is it clearer now?
Yes.
Well, actually I made a similar test and it works fine on my system.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
eyalbi007 wrote: current situation: lvwMyListview.TopItem.Index == 44,
lvwMyListview.Items[47]==lvwMyListview.Items[44] would be sufficient to get such result...
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Working with automatically assigned indexes can be unreliable if controls are being updated as the index will change on each update.
The solution is: as each item is created, give them a unique id of your own and put it in the tag property. Make sure that the item's id will ALWAYS be the same. Before updating the list view, store the required item's tag value - (int)Tag (the Tag holds an object so will need casting).
When updating the list view, as each item is added, check if its id is the same and store the index that is auto-assigned to it. Then, after the update is finished, use the EnsureVisible method on that item's index.
|
|
|
|
|
Thank for the quick reply,
As I've mentioned - I'm not mistaken while indexing - the indices are correct and as you suggested, if there's a chance of order mix up I determine them using other properties.
Thanks.
|
|
|
|
|
I have binded a textbox control with database column, I want to remove that binding in runtime. How to write the code for remove function?
|
|
|
|
|
Try this
textBox1.DataBindings.Remove(textBox1.DataBindings["Text"]);
(I am not pretty sure about this...)
or you can clear all the databindings like this
this.textBox1.DataBindings.Clear();
*jaans
|
|
|
|
|
but these two are not working.......
|
|
|
|
|
Hi friends how can i upload my files to net.
Server Error in '/test' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Source File: F:\hshome\atslserv\mssql.atsl.in\test\Default.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
this is the error what i receive during uploading process.
Hi,Im Razana
|
|
|
|
|
Compile the application before you try to run it.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I want to change the system date style formate not by regional setting in control panel.
Help me out.
|
|
|
|
|
Why would you want to do this? There's normally a reason that these are set to the value they are, and it's bad practice to come along at a later stage and change the settings that somebody or something else has set in the first place. If it's purely to support a different date style in your application, you can always use one of the various DateTime converters.
|
|
|
|
|
Yeah, what he said; it's user hostile.
|
|
|
|