User Profile & Activity

Luciano Sitzia Member
Page
of 2
Posted: October 23, 2009 3:41 AM

Hi Glenn, I followed your advice but it still doesn't work, see the attachment. Is this feature supported in WG 6.0 2008 SP2? Because at this point I don't know what to think. If you can, please send me a database containing two tables parent and child, both having a composite key, plus the page when you retrieve the selected child row row by RetrieveClientLastSelectedObject KeyValues property.

Thank you, regards.

 

Luciano

Posted: October 22, 2009 5:20 AM

Hi Glenn, my composite keys have the following fields:

Composite ParentKey = FirstKeyField is String -  SecondKeyField is numeric

Composite ChidKey  = FirstKeyField is Numeric - SecondKF Is string - ThirdKF is String

What format shuld have ChildKey  to pass it  as  parameter in the following code (String, or what else)?

WebGrid1.GetTableByName("childTableName").Rows.GetRowByKeyValue(ChildKey)

If you don't mind please send me a sample about how to retrieve a row parent or child using a composite Key

Thank you, regards.

Luciano

Posted: October 22, 2009 2:55 AM

Hi Glenn, I have attached the code from my test page and it doesn't work. I can retrieve correctly the child and the parent composite key  but, how you can see it doesn't work. Would you be so kind to tell me what is wrong. Thank you, regards. Luciano

Posted: October 21, 2009 6:52 AM

Hi Glenn, with the code below I can retrieve the composite key from the child selected row without any temporary column. What I'd like to know is: HOW TO RETRIEVE THE DATA FROM THIS CHILD ROW! I can't get over how it can be  so complicate. Thank you, regards. Luciano

Dim KeyList As ArrayList = WebGrid1.RetrieveClientLastSelectedObject().KeyValues
Dim SelInd As String = KeyList(0).ToString

Posted: October 20, 2009 9:16 AM

Hi Gelenn, I kept on trying and the problem is that "lastclientselectedobject" doesn't return the key or keys value for the parent or child row. I got the same problem with checked rows and it came from the IsDataSource I had to change to ObjectDataSouce to populate the arraylist. When you will send a sample you must consider that 99% of my tables have a composite key.

I wasted a lot of time trying to find the solution, please help me otherwise it will drive me banas.

Thank you, regards.

 

Luciano

 

Posted: October 19, 2009 6:03 AM

Hi Glenn, may be we are near to find the solution. As I wrote above the button is inside the chid row what I have to retrieve is a cell value, not the parent key,  from the selected child row. If I wil assing to the button the chid's key value will I get it server side? Moreover, afterwards how will I be able to retrieve values from child row cells?

Thank you, regards.

 

Luciano

Posted: October 19, 2009 4:24 AM

Hi Glenn, I changed the code under WebGrid1_ButtonClick to bring it in mi scenario but it doesn't work. It doesn't return any key with:

Dim SelKey As String = WebGrid1.RetrieveClientLastSelectedObject().KeyValue

even forcing the key the following instruction doesn't work and I can't retrieve the child row's values:

Dim Protoco = WebGrid1.GetTableByName("Pratiche").Rows.GetRowByKeyValue(SelKey).Cells.GetNamedItem("NUMERO_PROTOCOLLO").Value

I connect Datasets  using IsDataSource I didn't use all the other code because all keys and relations are declared inside the dataset. I'd like to clarify that the button is in the child rows so the rows are already expanded, the user selects  a child row. Moreover if I try to retrieve the IndexRow it returns the right value.

Thank you, regards.

Luciano

Posted: September 25, 2009 10:05 AM

Hello This is the error.

Regards, Luciano

Posted: September 25, 2009 9:56 AM

Hello, before writing my question I had already tried the code above, but it returns null value for the object. The scenario is the following: When I delete a WG row I need to retrieve the value from the selected row cell(2) of the WCombo.

Thank you, my best regards.

Luciano

All times are GMT -5. The time now is 12:46 PM.
Previous Next