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.

info property

Thread ID:

Created:

Updated:

Platform:

Replies:

13483 Apr 29,2004 09:55 AM Apr 29,2004 12:58 PM Windows Forms 6
loading
Tags: Grouping
glenn
Asked On April 29, 2004 09:55 AM

How is the information provided by the Info property? Specifically, when the info states: "(GridAddNewRecord): Field1 = 109, Field2 = -1, Field3 = , Field4 = " how can I access these field values? Glenn

Ben
Replied On April 29, 2004 10:24 AM

Well that property is a string and is comma delimited. I''d recommend using the GetData method which returns an object. What are you using as a datasource? If you''re using a dataset GetData returns a DataRowView. Hope this helps. Ben

glenn
Replied On April 29, 2004 11:37 AM

Thats the problem, I have tried using the GetData but cannot seem to find a way to retrieve a field value for the AddNewRecord row in a child table in the QueryCellStyleInfo event. The info property in the local window shows the fields and the values if any. >Well that property is a string and is comma delimited. I''d recommend using the GetData method which returns an object. What are you using as a datasource? If you''re using a dataset GetData returns a DataRowView. Hope this helps. > >Ben

Ben
Replied On April 29, 2004 12:08 PM

This should work Engine engine = gridgroupcontrol.Engine; Table pTable = engine.Table; CurrentRecordManager crm = pTable.CurrentRecordManager; DataRowView dv =(DataRowView) crm.CurrentElement.ParentRecord.GetData();

Ben
Replied On April 29, 2004 12:10 PM

I''m not sure if my suggestion is the most efficient but it''s what I''m using, I have multiple child tables, other option is to look at this KB article http://www.syncfusion.com/Support/article.aspx?id=10466

Administrator [Syncfusion]
Replied On April 29, 2004 12:25 PM

For the AddNewRecord the GetData() method will return null since the data of that record have not been added to the underlying dataview. To get to any value of a Record or AddNewRecord you can use record.GetValue("FieldName"); That will return individual fields from the record. If changes have been made to the record and they have not been commited to the dataview (EndEdit was not called), then the modified value will be returned. Stefan

glenn
Replied On April 29, 2004 12:58 PM

Thanks Ben & Stefan - This helped!!! >For the AddNewRecord the GetData() method will return null since the data of that record have not been added to the underlying dataview. > >To get to any value of a Record or AddNewRecord you can use record.GetValue("FieldName"); > >That will return individual fields from the record. If changes have been made to the record and they have not been commited to the dataview (EndEdit was not called), then the modified value will be returned. > >Stefan >

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.

;