Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 448697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:41:44+00:00 2026-05-12T21:41:44+00:00

I have a datagrid with 2 columns. One column contains role information, the other

  • 0

I have a datagrid with 2 columns. One column contains role information, the other column should have a combo box with a list of available users. The data in the combobox is unrelated to the data in the first column.

I’m thrown off by the fact that the combobox does not have a datacontext, only an itemsource and I can’t seem to use binding either.

What is the method that uses two different data sets for the data in a table and in the combo box?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:41:45+00:00Added an answer on May 12, 2026 at 9:41 pm

    the columns in the datagrid dont have a datacontext, as they are never added to the visual tree. sound a bit wierd but have a look at vinces blog, its got a good example of the visual layout. once the grid is drawn the cells have a data context and you can set the combo boxes items source in them using normal bindings (not static resources..)

    you can access the combo box items source as such

       <dg:DataGridComboBoxColumn>
          <dg:DataGridComboBoxColumn.EditingElementStyle>
            <Style TargetType="ComboBox">
                <Setter Property="ItemsSource" Value="{Binding Path=MyBindingPath}" />
            </Style>
          </dg:DataGridComboBoxColumn.EditingElementStyle>
       </dg:DataGridComboBoxColumn>
    

    have a look here and also here for some code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a datagrid which contains a lot of information in one column. I
I have a flex datagrid with 3 columns. The first column contains the image
I have a datagrid view with three columns and one button column. My aim
I have a DataGrid that two of its columns are ComboBoxes (one contains few
We have a Flex DataGrid with 3 columns of which one of them has
I have a DataGrid table with columns name , phone . In column name
I have a DataGrid in WPF app with several columns, including a Name column.
I have a dynamic DataGrid in which one of the columns is a CheckBox.
I have a WPF form that contains a DataGrid. This DataGrid is editable. One
Using .NET 1.1, I have a DataGrid that contains three columns for each row.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.