BR
Badri Rajani Kanth
January 26, 2006 03:09 PM UTC
Any input plz..
-----------
>HI,
>
>FindString function seems to not work properly with GridListControl. For example if i have names
>
>Bernard, Shaw
>Berlin, bose
>Casi, Albert
>
>and when I give "be" or "Be" as input to GridListControl.FindString, it is returning me the position of Casi, Albert. Where as i am supposed to get position of Bernard, Shaw..
>
>Any input plz..
>
>Rgds
>Rajani Kanth
AD
Administrator
Syncfusion Team
January 27, 2006 03:23 AM UTC
Hi Bardi.
I checked it with the GridListControl sample but it looks ok.
I opened the csharp project and added these lines
int n = ListBox1.FindString("R");
Console.WriteLine(ListBox1.Items[n]);
at the end of the ListBoxSample3() ctor. It returns "Rhode Island" then.
I also tried adding
USStates.Add(new USState("Bernard, Shaw", "W0", 5));
USStates.Add(new USState("Berlin, bose", "W1", 5));
USStates.Add(new USState("Casi, Albert", "W2", 5));
and then select
int n = ListBox1.FindString("be");
Console.WriteLine(ListBox1.Items[n]);
Can you reproduce the problem also with that sample and should I do something different to see the problem?
Are you using VB or CSharp. With VB the Items collection might be one-based, and in CSharp the collection zero-based. The index returned from FindString is zero-based.
Stefan
>Any input plz..
>-----------
>>HI,
>>
>>FindString function seems to not work properly with GridListControl. For example if i have names
>>
>>Bernard, Shaw
>>Berlin, bose
>>Casi, Albert
>>
>>and when I give "be" or "Be" as input to GridListControl.FindString, it is returning me the position of Casi, Albert. Where as i am supposed to get position of Bernard, Shaw..
>>
>>Any input plz..
>>
>>Rgds
>>Rajani Kanth