|
ListView.Items.Count;
Are you sure you searched?
|
|
|
|
|
i did searched but i got results that were irrelevant. thanks anyway
|
|
|
|
|
how to give printing view ,to form in word formatting
|
|
|
|
|
Hi,
if you just want to print the form, have a look here:
http://msdn.microsoft.com/en-us/library/6he9hz8c.aspx[^]
But if you want a more sophisticated view (like Word) you should try sth called "report generator". There are several products like Crystal Reports, List Label (german) etc... Also some free generators are available.
Regards
Sebastian
|
|
|
|
|
Oh just an addition. There is a control called Report Viewer. This one can take files with the extension rdlc. If you open such a file in VS2008, then you can create a report. This means that VS has its own report generator out of the box.
Regards
Sebastian
|
|
|
|
|
Hi,
Where will i find caspol.exe for 64 bit?
Thanks in advance,
Regards, Subramanyeswari
|
|
|
|
|
|
|
Hi,
Do we need to make any changes or settings to use Signed DLLs in Windows Service? It is not working for me where as un-signed DLL is working fine.
Thanks in advance
|
|
|
|
|
try a simple test: ensure that there is no copy of your dll in the GAC, copy the fully signed dll and the exe into a new directory, then try to run the application.
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|
|
public class clsRequestService
{
private static object _objArrayList =new object();
string _strUser;
string _strServiceRequested;
public object _ReqAL
{
get
{
return _objArrayList;
}
set
{
_objArrayList = value;
}
}
public string _User
{
get
{
return _strUser;
}
set
{
_strUser = value;
}
}
public string _ServiceRequested
{
get
{
return _strServiceRequested;
}
set
{
_strServiceRequested = value;
}
}
}
public static Collection<clsRequestService> ocRequestService = new Collection<clsRequestService>();
while (some thing)
{
oReqSer = new clsRequestService();
.....
oReqSer._ReqAL=ReqAL;
oReqSer._ServiceRequested = strReqServ;
oReqSer._User= strUser;
AppGlobalData.ocRequestService.Add(oReqSer);
}
Every thing works fine except the Array list, Latest array list values are duped in to
all the arraylist values in the collection.
How to make deep copy of array list
|
|
|
|
|
Hi,
what kind of object to you store within the arraylist? If it is a class of your own you have to implement the interface ICloneable. This will mark objects of this class as cloneable.
Then you have to implement sth to make a deep copy of your arraylist (Clone on ArrayList is not working since it only copies the reference of the contained objects). There you could have a look at this link
http://www.thomashapp.com/node/106[^]
Does this help you?
Regards
Sebastian
|
|
|
|
|
ptr_Electron wrote:
Every thing works fine except the Array list, Latest array list values are duped in to
all the arraylist values in the collection.
That's because clsRequestService is a reference type, so changing some values inside this class will be reflected in the second list. If you need a deep copy, then you must also provide a mechanism to clone objects of the clsRequestService type. There are various methods how to do this in .NET, you should take a look at this link[^] and some links inside this article.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
I have created a Windows Application that use Client Application Services for login purposes. Can someone please tell me how to deploy this service to a "Live" environment?
I have successfully packaged and deployed the Windows Application but obviously I cannot login as the web service is unavailable.
Thank you!
Illegal Operation
|
|
|
|
|
Hello,
I have 2 treeviews and one button. Ofter selecting a node in the first treeview and clicking the button, the selected node most be copied into the second treeview.
Bud how can i check first whether the second treeview already contains the selected node in treeview1?
Thanks,
Priya
|
|
|
|
|
Do you have a key or some kind of identifier that you're checking? Are you just checking the node text?
Generally speaking, you can use recursion to check each tree node with a boolean value for whether the node exists.
|
|
|
|
|
Just checking the node text
|
|
|
|
|
something like this
bool ContainsNode(string nodeText, Node treeNode){
if(treeNode.Text.Equals(nodeText){
return true;
}
bool contained = false;
foreach(Node node in treeNode.Children){
contained |= ContainsNode(nodeText, node);
}
return contained;
}
|
|
|
|
|
Create a List of the node text for second treeview. On button click, check if the list contains the text. If yes do not add. If no add the text to list and a node in treeview.
This will avoid looping through nodes for each and every time. However you will have to loop through for once to create the list.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
|
I have a table that is being dynamically generated based on selected fields from my form. However, after I have modified the table, I can't get it to display on the web page. What am I doing wrong or what else do I need to do to get the page to display correctly?
ASP place holder:
<asp:table id="tblBrowserOSTable" runat="server" enableviewstate="false" bordercolor="black" borderwidth="1" gridlines="Both" xmlns:asp="#unknown">
</asp:table>
(I have tried EnableViewState="false" too.)
C# code:
protected void MakeBrowserOSTable(DataTable dtContents)
{
int numRows = dtContents.Rows.Count;
int numCells = dtContents.Columns.Count;
Table newTable = new Table();
if ((numCells <= 0) || (numRows <= 0))
{
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell.Controls.Add(new LiteralControl("Please choose a platform"));
row.Cells.Add(cell);
newTable.Rows.Add(row);
}
else
{
foreach (DataRow r in dtContents.Rows)
{
TableRow row = new TableRow();
for (int c = 0; c < numCells; c++)
{
TableCell cell = new TableCell();
if (c == 0)
{
Label lbl = new Label();
lbl.Text = (string)r[c];
lbl.Text = lbl.Text.Trim();
cell.Controls.Add(lbl);
}
else
{
}
row.Cells.Add(cell);
}
newTable.Rows.Add(row);
}
}
tblBrowserOSTable = newTable;
}
|
|
|
|
|
What happens if you enable viewstate? let's start there.
|
|
|
|
|
I don't see any difference between the EnableViewState being set to "true" or "false". From reading the MSDN site, I think this needs to be "false" to update the view dynamically.
|
|
|
|
|
I finally figured this out. I wasn't approaching the problem correctly.
I had to change my ASP code to be an ASP:Placeholder:
<asp:placeholder id="tblBrowserOSTable" runat="server" xmlns:asp="#unknown" />
Then at the end of my code, instead of assigning the new table to the existing table (which is now gone), I replaced the placeholder control with the new table:
tblBrowserOSTable.Controls.Clear();
tblBrowserOSTable.Controls.Add(newTable);
|
|
|
|
|
Hi, Ive been trying to figure out how to go about doing this for a few hours, Was wondering if someone could offer some advice.
What i have is "List<string> Files = new .." containing a number of file paths in order of last opened. The list is LIMITED to only holding 10 items.
When a new file is opened, i want to shift all of the items in the list by +1 place.
So Files[1] goes to Files[2] ... and Files[2] goes to Files[3]
and so on.
So then i can keep adding new files, they will go to Files[1] and all of the others move up a position.
Anyone any advice? If what i said even makes the slightest of sense?
Thanks for reading my confusing stuff
|
|
|
|