We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Namespace for Table, Element and CustomersDataRow

Thread ID:

Created:

Updated:

Platform:

Replies:

18094 Aug 24,2004 05:12 AM Aug 24,2004 05:39 AM Windows Forms 1
loading
Tags: GridControl
Raja
Asked On August 24, 2004 05:12 AM

Q10475 - Info: How do I get the position of a row in the datasource from CurrentCell''s rowIndex? Table table = e.TableControl.Table; Element el = table.DisplayElements[e.rowIndex]; Record r = el.ParentRecord; int dataRowPos = table.UnsortedRecords.IndexOf(r); CustomersDataRow row = dataSoure.Rows[dataRowPos]; string id = row.CustomerId; when i run this code, i got the following errors. Please help to solve this problem The type or namespace name ''Element'' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name ''Record'' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name ''row'' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name ''Table'' could not be found (are you missing a using directive or an assembly reference?)

Administrator [Syncfusion]
Replied On August 24, 2004 05:39 AM

Here are the two namespaces you need to use the GridGrouping support in our libraries. using Syncfusion.Grouping; using Syncfusion.Windows.Forms.Grid.Grouping; >>CustomersDataRow row = dataSoure.Rows[dataRowPos]; This code should be replaced with whatever strongly typed dataset you are using, something similar to: DataRow dr = this.dataSet1.Tables["MyTable"].Rows[dataRowPosition]; But there is a simpler way to do it if you datasource is a DataTable (or DataView). Once you have the Record. you can use DataRowView drv = r.GetData() as DataRowView; Console.WriteLine(drv[0].ToString() + " " + drv[1].ToString());

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;