473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DataConnector.Find

Hello,

I have a DataConnector (.NET 2.0) bounded on a DataTable.
I'd like to set the current Item to the DataRow wich contains "XY" in the
column "Name". How can I do that?

I could use the method Find(PropertyDescriptor prop, object key), if I would
know, how to get the PropertyDescriptor for the column "Name".
But the DataConnector's GetItemProperties method is private.
Thanks,

Jaga
Nov 16 '05 #1
2 1625
using System.ComponentModel;

....

public NavigateById(int id)
{
PropertyDescriptor propDescriptor =

TypeDescriptor.GetProperties(myDataSet.MyDataTable .NewMyDataTableRow())["MyColumnName"];

myDataConnector.Position = myDataConnector.Find(propDescriptor, id);
}

HTH,
Juan
Jaga wrote:
Hello,

I have a DataConnector (.NET 2.0) bounded on a DataTable.
I'd like to set the current Item to the DataRow wich contains "XY" in the column "Name". How can I do that?

I could use the method Find(PropertyDescriptor prop, object key), if I would know, how to get the PropertyDescriptor for the column "Name".
But the DataConnector's GetItemProperties method is private.
Thanks,

Jaga


Nov 16 '05 #2
Hi Juan,

Thank you, it helps.
I have now an other one too:

PropertyDescriptorCollection pdc =
CurrencyManager.GetListItemProperties(myDataConnec tor.DataSource);
myDataConnector.Position = myDataConnector.Find(pdc["MyColumnName"], id);
Jaga

"Juan Ignacio Gelos" <ju*******@gmail.com> schrieb im Newsbeitrag
news:11**********************@z14g2000cwz.googlegr oups.com...
using System.ComponentModel;

...

public NavigateById(int id)
{
PropertyDescriptor propDescriptor =

TypeDescriptor.GetProperties(myDataSet.MyDataTable .NewMyDataTableRow())["MyC
olumnName"];
myDataConnector.Position = myDataConnector.Find(propDescriptor, id);
}

HTH,
Juan
Jaga wrote:
Hello,

I have a DataConnector (.NET 2.0) bounded on a DataTable.
I'd like to set the current Item to the DataRow wich contains "XY" in

the
column "Name". How can I do that?

I could use the method Find(PropertyDescriptor prop, object key), if

I would
know, how to get the PropertyDescriptor for the column "Name".
But the DataConnector's GetItemProperties method is private.
Thanks,

Jaga

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: amit | last post by:
I want to find out that if there is a mechanism to find a text inside a C# file and replace it with another string. I am using DTE to do it, the find proerty does it, the results are getting...
0
by: AMIT PUROHIT | last post by:
hi, this is a qry which I m stuck up with I want to find out that if there is a mechanism to find a text inside a C# file and replace it with another string. I am using DTE(EnvDTE) to do it,...
3
by: David T. Ashley | last post by:
Hi, Red Hat Enterprise Linux 4.X. I'm writing command-line PHP scripts for the first time. I get the messages below. What do they mean? Are these operating system library modules, or...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.