collapsible grid in Silverlight 4

Posted by prince23 on Stack Overflow See other posts from Stack Overflow or by prince23
Published on 2010-05-10T06:44:36Z Indexed on 2010/05/11 10:54 UTC
Read the original article Hit count: 275

Filed under:

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

© Stack Overflow or respective owner

Related posts about silverlight-4.0