|
Thanks A Lot Brother!!!
Cheers
|
|
|
|
|
HI...
I did DataGridView Search ... As When i type a Text box , the on key up call back Event will filter a Data Grid View Data's ... When i was type the string in fast... Filter for each char So The Searching is very slow and Also Sometimes the Application will hang... How can i Handle this... Or have any other best idea can u share with me
Anish S
|
|
|
|
|
You Can Use Threading to Cope up this problum////
|
|
|
|
|
How are you doing the search, what is the underlying datasource, table, bindingsource or collection or List<>.
Depending on the size of your data set and the underlying collection and the method you are using to filter the data it all impacts on the speed. We need some further info to help.
As stated by Sachin you could use a thread to do the filtering but I doubt it will be a satisfactory solution, I think you may have a problem with your design.
|
|
|
|
|
Thanks for reply
I am using List<>... Now i m using List of class object , which have data member , Each member have want to display...
I am searching Code mentioned below...
foreach (SongProfile songPro in songList_)
{
if (searchField_.Equals("File Name"))
{
if (songPro.fileName_.ToLower().Contains(search))
{
tempSongPro = new SongProfile(songPro);
listOfSongPro.Add(tempSongPro);
}
}else if (searchField_.Equals("Song Name"))
{
if (songPro.songName_.ToLower().Contains(search))
{
tempSongPro = new SongProfile(songPro);
listOfSongPro.Add(tempSongPro);
}
}
}
Here after new SongPRofile obj List is Loaded in DataGridView...
|
|
|
|
|
Hi, i have a webbrowser control and i have a button which takes the html from the webbrowser and puts it into a text box. Here is the code:
status.Text = webBrowser1.DocumentText;
However this only seems to work half the time, and when it does not work, i get the error of "File not found".
Or, sometimes it will work once and not a second time.
How can i fix this or how can i do this another easy way?
Must be through the webbrowser control as the client is logged in though it.
Thanks.
|
|
|
|
|
discreetz wrote: However this only seems to work half the time, and when it does not work, i get the error of "File not found".
This sounds strange. Why would you get "File not found" when accessing a piece of text? I would suggest using the debugger to trap your program at the point of error and examine the stack trace and variables to identify exactly which statement is failing and why.
|
|
|
|
|
how to search for a specific file in current directory?
|
|
|
|
|
You have to do the search yourself, by retrieving all the files (System.IO.Directory.GetFiles(folderName) ) in a folder and comparing them to your search criterias - for instance the file name.
You can check out this link[^] if you want to know how to do a recursive search.
|
|
|
|
|
Calla is right, but there is an easier method: DirectoryInfo.GetFiles[^] which allows a search string to limit to just matching filenames.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Cool.. Never used it but good to know!
|
|
|
|
|
You can recursively get the files in a Directory and using string comparision you can compare whether a particular file contains the search string.
What about the performance when the number of files and their size is large, say in GBs? How google and other search engines are handling this issue (Tera bytes of data)?
One simple technique is indexing and searching. Just like an index in a book, so that you can quickly go to the page where the word is present.
Using .Net and c# how will you do? You can use Lucene.Net, an Open Source Indexing and Searching library. Look at this code project article Introducing Lucene.Net[^].
|
|
|
|
|
How to create a folder in any drive by C# .Net Command
|
|
|
|
|
C# doesn't have commands; only command lines have commands.
Perhaps something in the System.IO.Path class might be of use.
|
|
|
|
|
Look into the System.Io namespace. In there, you'll find the Directory and DirectoryInfo classes. You'll be amazed how easy it is.
|
|
|
|
|
Hi,
I have to develop a project that I need to download an exam timetable from a website (HTML) and I need a
HTML-to-xml library so that I can filter the information and send out the timetable in an SMS (cell phone) format.
I'm using Chilkat HTML-To-XML but it expires every 30 days.
Do you guys know any Free html-to-xml library that I can use?
or do you guys know how I can send filter the information into single SMS?
Thank you.
|
|
|
|
|
HTML is essential XML. It has a hierarchical structure defined by tags and attributes. You can construct your own XSLT to filter the data appropriately.
only two letters away from being an asset
|
|
|
|
|
Well, it CAN be XML, but it usually isn't. I assume this library turns <BR> into <br/>, etc.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I said essenttially, but true there are exceptions to a well formed document
only two letters away from being an asset
|
|
|
|
|
How can I create a function that can return in different data types.
example
private int GetValue()
{
return intValue;
}
private string GetValue()
{
reutn strValue;
}
|
|
|
|
|
You can't have an ordinary method that returns different types using exactly the same input parameters. The best way to achieve this is to use a generic method:
private <T> GetValue<T>()
{
return value;
}
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
murktinez wrote: How can I create a function that can return in different data types.
You could box the output in an object;
object GetValue(bool test)
{
if (test)
return 1;
else
return "2";
}
The factory-pattern[^] might also be interesting
I are Troll
|
|
|
|
|
Does anyone know how to make a .NET app so that the files it generates cause previews of the file to show up in Windows Explorer instead of static icons? Even simply telling me what that concept is called would be helpful as the searches I'm trying aren't working. Thank you!
|
|
|
|
|
It's called Preview Handler[^] but it is not recommended to develop them in .Net
|
|
|
|
|
Thank you! The article you linked to appears to be related to the preview pane. I'm wondering how to create an add-in that causes a little preview to appear instead of the icon itself using traditional techniques that will also work in XP. I've seen some other apps do this so I know it's possible.
Coding it in C++ won't be an issue.
|
|
|
|