This is a migrated thread and some comments may be shown as answers.

delete child table row +radgridview+hierarchy

13 Answers 183 Views
GridView
This is a migrated thread and some comments may be shown as answers.
venkateshwarreddy
Top achievements
Rank 1
venkateshwarreddy asked on 10 Oct 2008, 05:09 AM
Hi Team,

1)I want to delete child row based on parent row in radgridview ( hierarchy example).

2)to retrieve child and parent field's data when a child row is selected in radgridview(hierarchy ).

I will be thankfull if anybody helps me.

13 Answers, 1 is accepted

Sort by
0
Dimitar Dobrev
Telerik team
answered on 10 Oct 2008, 02:38 PM
Hello Venkateshwarreddy,

1) we were able to answer this question yesterday, but we had a little delay before we created a post in the forum, for which we appologize. You can find our reply here: http://www.telerik.com/community/forums/thread/b311D-bggehh.aspx

2) if you have the selected child record (from GridViewDataControl.SelectedRecord), you can use the Record.RecordManager.MasterRecord property to get the parent record of the selected record; if you need to reach the child record from top, you need to use RadGridView.SelectedRecord, which you need to cast to ExpandableDataRecord. From there you can iterate through the ExpandableDataRecord.ChildRecordManagers property and examine RecordManager.Selection.SelectedRecord; if this property is not null, it represents the selected child record (if any).

Best regards,
Dimitar Dobrev,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
venkateshwarreddy
Top achievements
Rank 1
answered on 10 Oct 2008, 05:34 PM
Hi team,

please as soon as possible send me code for both  questions with sample example.

I will be thankfull  to all.
0
Dimitar Dobrev
Telerik team
answered on 13 Oct 2008, 01:19 PM
Hello Venkateshwarreddy,

In the attached sample you can find answers to both of your questions. We made the example so that you can select rows and delete them by pressing the Delete key. In the method of Row_KeyDown, the line:

DataRecord record = (DataRecord) ((RadRowItem) sender).Record; 

retrieves the selected child record (which represents an order). The next line:

Customer customer = (Customer) ((DataRecord) record.RecordManager.MasterRecord).Data; 

gets the parent record and its data (the customer, to which the selected order belongs). The deletion itself happens when you simply remove the order from its collection:

customer.Orders.Remove((Order) record.Data); 

You are welcome to send us any other questions you may have.

Best wishes,
Dimitar Dobrev,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
venkateshwarreddy
Top achievements
Rank 1
answered on 13 Oct 2008, 03:13 PM
Hi Dimitar,

Thank you verymuch,

1)how to get edit mode for fields or cells when pressing on tab
i.e we are moving from one   cell to another cell through pressing tab(tab navigation) but at that time we can see only a dim focus but the cell is not edit mode. i want cell in edit mode when i am navigating through tab for each cell.


I am waiting for your response.please as soon as possible send me with an example.

Thankyou.
0
Dimitar Dobrev
Telerik team
answered on 13 Oct 2008, 04:33 PM
Hello Venkateshwarreddy,

We recently had a similar question, and you can find the answer here. Of course, feel free to open a separate support ticket if you are interested in testing the pre-release build we offer there.

Greetings,
Dimitar Dobrev,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
venkateshwarreddy
Top achievements
Rank 1
answered on 15 Oct 2008, 06:51 AM
Hi team,

I want to delete a selected record from parent when i click on button

in property hierarchy example.


As soon as possible send me answer please.
waiting for reply bye.
0
venkateshwarreddy
Top achievements
Rank 1
answered on 15 Oct 2008, 12:21 PM
Hi team

How to Change font size for Header column's in hierarchy Radgridview


Please reply as soon as possible.

0
venkateshwarreddy
Top achievements
Rank 1
answered on 15 Oct 2008, 04:42 PM
Hi team,

Please help me to move forward with my tasks i will be thankful if you give
response as soon as possible.

1)Showgroup panel should be appear for child table and for parent table it should be deleted(rad gridview hierarchy)
2)I want only header text of gridview in different fontsize and fontfamily
for child table as well as for parent table(gridview hierarchy)
for child as well as parent
3)With tab navigation i want to edit child table cell(gridview hierarchy)


waiting for your reply---------------

Thanking you

yours's faithfully

venkateshwarreddy
0
Dimitar Dobrev
Telerik team
answered on 17 Oct 2008, 12:26 PM
Hi Venkateshwarreddy,

Please refer to this thread.

Kind regards,
Dimitar Dobrev,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
venkateshwarreddy
Top achievements
Rank 1
answered on 23 Oct 2008, 02:07 PM
Hi Team,

How can i check edit cell using tab navigation with the given thread

Did u read my question correctly .
0
Atanas
Telerik team
answered on 24 Oct 2008, 07:30 AM
Hello venkateshwarreddy,

All you need to do is write a simple style for GridViewCell:

<Style TargetType="{x:Type telerik:GridViewCell}"
                <Setter Property="IsInEditMode" Value="{Binding IsCurrent, RelativeSource={RelativeSource Self}, Mode=TwoWay}" /> 
            </Style> 

I am attaching a sample project.

Regards,
Atanas
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
venkateshwarreddy
Top achievements
Rank 1
answered on 24 Oct 2008, 09:54 AM
Hi Atanas,

Thankyou for your reply,
But i need for property hierarchy where when  press  on tab the cell should be in edit mode first for parent row and then for child rows and now to second parent row and then it child---------------.till last and once it comes to last child cell of last parent row ,again first cell of first parent row should me in edit mode.

This is similar to that of tab navigation which is happening for  (hierarchy radgridview). I am using RadControls  for WPF Q2 2008.
0
Atanas
Telerik team
answered on 24 Oct 2008, 04:15 PM
Hello venkateshwarreddy,

Currently our GridViewExpandableRow does not support cells in edit mode. We will consider this issue and may fix it in some of our next releases. Unfortunately the functionality of your scenario cannot be achieved at the moment.

Thank you for your understanding and patience.

Best wishes,
Atanas
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
venkateshwarreddy
Top achievements
Rank 1
Answers by
Dimitar Dobrev
Telerik team
venkateshwarreddy
Top achievements
Rank 1
Atanas
Telerik team
Share this question
or