Click here to Skip to main content
15,891,253 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to add a checkbox in a datagrid using datagrid Pin
Imran Khan Pathan12-Dec-06 0:56
Imran Khan Pathan12-Dec-06 0:56 
AnswerRe: How to add a checkbox in a datagrid using datagrid Pin
postmaster@programmingknowledge.com12-Dec-06 16:17
postmaster@programmingknowledge.com12-Dec-06 16:17 
QuestionDeployment of Asp.net 2.0 Application. Pin
Kamal.Afridi11-Dec-06 23:59
Kamal.Afridi11-Dec-06 23:59 
AnswerRe: Deployment of Asp.net 2.0 Application. Pin
karam chandrabose12-Dec-06 0:42
karam chandrabose12-Dec-06 0:42 
GeneralRe: Deployment of Asp.net 2.0 Application. [modified] Pin
Kamal.Afridi12-Dec-06 1:03
Kamal.Afridi12-Dec-06 1:03 
QuestionDataSet bulk update problem Pin
Dinuraj11-Dec-06 23:28
Dinuraj11-Dec-06 23:28 
QuestionValidation Controls in ASP.Net Pin
kulile11-Dec-06 23:25
kulile11-Dec-06 23:25 
QuestionAsp Tree with "Intelligent Sorting" Pin
bazpaul11-Dec-06 23:09
bazpaul11-Dec-06 23:09 
Hey everyone,

Im pretty much a n00b to asp but have a bit of programming experience. Im currently workin on a little project for work which is driving me insane! I didnt want it to come to this (asking experts for help) but i feel the project needs some fresh eyes to guide me to a better solution. So let me just outline what im trying to do;


First, we have a large list of customers on our server, approx 1316 customers. Now on our intranet webpage i wish to create a fast way of finding customers using an ASP tree. So consider a list of customer names returned from an SQL query into a large array. I then wish to check the first couple of letters of each customer, and group customers with similiar names together under one branch in the tree.

The Result would look something like this;

Customers
|
|-A
___|-ar
______-arson, pat
______-arson, mick
______-arsen, jon
______...
______...
___|-as
______-asnot, mark
______...
______...
___|-Other A's
______...
______...
|-B
___|-ba
______|-bai
__________-bailey, john
__________-bailey, mark
__________...
__________...
______|-bar
__________-barker, paul
__________-barton, mike
__________...
__________...
___|-br
______-bromich, dave
______-brockurst, mick
______...
______...
___|-Other B's
______...
______...
|-C
___-charles, john
___-chaplin, pat
______-chan, johnny
|-D
___|-da
.
.
.
....


just to explain anything with a | beside it represents a branch which has leaves while anythin with just - represents a leaf which will hold a customer name

One main important thing about this code is that i want it to be very dynamic and one important feature is groups of similar names, being grouped in their own branch. For example the code should read like;

if there are less than X names beginning with 'ar' then group these names under a branch called 'ar'
But if there are more than X names beginning with 'ar' then search again through this group and compare the first 3 letters for similarity.

This idea is shown in the B section, here the code found more than X names with -ba as the first two letters, and so and the code ran again comparing the first three letters, these groups of three letters had less hits than X and so are plotted in their own trees -bai and -bar.

I hope you can follow me now as you read this and it makes some sort of sense!

I want it to be so dynamic that lets say, we enter many customers with names starting with -bai, the program will then scan the first four letters of the name and if this is over X, it will scan the first five letters of each name, if again theres more than X it will move onto scanning 6 letters.

Thats is why i call it 'intelligent sorting' i want it to be so streamlined that you could have 200 -bai customers sorted into 5 or 6 branches, while you may have only 5 -D customers which will only fall under the -D branch!

I've been trying to do this with a simple checkltr = left(myarray(1,k),3) command and lots of array sorting, which works. but when i move onto checking 4 letters and 5 letters the code gets way too big and eventually just becomes inefficient, there has to be a way of doing this with not much code.


Please, please, please if anyone can help it would be great!
AnswerRe: Asp Tree with "Intelligent Sorting" Pin
bazpaul12-Dec-06 4:18
bazpaul12-Dec-06 4:18 
GeneralRe: Asp Tree with "Intelligent Sorting" Pin
bazpaul13-Dec-06 22:24
bazpaul13-Dec-06 22:24 
QuestionASP.NET 2.0 Menu Control Pin
rico cheah11-Dec-06 21:13
rico cheah11-Dec-06 21:13 
QuestionPaging in dynamic built DataGrid control Pin
Samah Helal11-Dec-06 20:48
Samah Helal11-Dec-06 20:48 
QuestionHelp Pin
Hari Prasad S.M11-Dec-06 20:47
Hari Prasad S.M11-Dec-06 20:47 
AnswerRe: Help Pin
karam chandrabose12-Dec-06 0:44
karam chandrabose12-Dec-06 0:44 
QuestionCreate Crystal Report at Runtime by ReportDocument Class Pin
Mahdi.Jabbari11-Dec-06 20:36
Mahdi.Jabbari11-Dec-06 20:36 
Questionhow can i use Bin folder at my asp.net application... Pin
vijayDaivam11-Dec-06 20:23
vijayDaivam11-Dec-06 20:23 
Questioncookies in asp.net Pin
Ravi Shankar4311-Dec-06 20:12
Ravi Shankar4311-Dec-06 20:12 
AnswerRe: cookies in asp.net Pin
Guffa11-Dec-06 20:16
Guffa11-Dec-06 20:16 
AnswerRe: cookies in asp.net Pin
Britney S. Morales12-Dec-06 9:35
Britney S. Morales12-Dec-06 9:35 
Questioncreateuserwizard problem Pin
jabbarsb11-Dec-06 19:49
jabbarsb11-Dec-06 19:49 
QuestionListBox and TextBox Pin
Preeti Mathur11-Dec-06 19:49
Preeti Mathur11-Dec-06 19:49 
AnswerRe: ListBox and TextBox Pin
Parwej Ahamad11-Dec-06 22:20
professionalParwej Ahamad11-Dec-06 22:20 
QuestionInserting data based on multi select list [modified] Pin
mohd imran abdul aziz11-Dec-06 19:46
mohd imran abdul aziz11-Dec-06 19:46 
QuestionIs it possible to use datalist inside a datarepeater??? Pin
nisha261211-Dec-06 19:26
nisha261211-Dec-06 19:26 
AnswerRe: Is it possible to use datalist inside a datarepeater??? Pin
saravanan0512-Dec-06 9:14
saravanan0512-Dec-06 9:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.