views:

133

answers:

1

hi,

I want to create a collapsible grid in Silverlight 4. once user clicks on row of the datagrid if that row has any child row it should be shown. if again user clicks the same row should hide the child row what was shown eariler.

right now i am able to show data in datagrid once the user clicks any row i am able get the id of the row what i have clicked and go to DB and get the result. but how will i again bind the new datatable to datagrid agin. below the row what i have clciked

private void dgData2_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (dgData2.SelectedIndex >= 0)
            {

     //Get Selected Row
 var element = (TextBlock)dgData2.Columns[0].GetCellContent(dgData2.SelectedItem);
}
}

i am new to silverlight please let me know any code that can help e out

Thanks in advance for any help

prince

A: 

the url that helped me to solve the issue

link text

prince23