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 179767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:27:56+00:00 2026-05-11T14:27:56+00:00

I have a list of string array as input. The array dimension are static

  • 0

I have a list of string array as input. The array dimension are static for all the list but I can’t know the array size until the list is retrieved. I need to bind the list in a datagrid in Silverlight.

I tried to create columns at runtime, binding each column to a particular array position but cannot find a way.

Have you any idea how to do it?

I could eventually ‘convert’ my list of array in anything else that could be binded in a datagrid?

The idea is to have a sort of 2d Matrix showed inside the datagrid in Silverlight (I think that the problem is similar).

List

 column_1      column_2       column_3   ..   column_m  string[1,1]   string[1,2]    string[1,3] ..  string[1,m] string[2,1]   string[2,2]    string[2,3] ..  string[2,m] string[3,1]   string[3,2]    string[3,3] ..  string[3,m] .... string[n,1]   string[n,2]    string[n,3] ..  string[n,m] 

n is list lenght, m is list column max number.

Any idea is appreciated

  • 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. 2026-05-11T14:27:57+00:00Added an answer on May 11, 2026 at 2:27 pm

    Unfortunately that’s not gonna be easy.

    Do you have any valid constraints, like the maximum number of columns that is allowed or anything like that? If you do (let’s say you have N column maximum), you might be able to do something by

    1. Having a class that exposes N properties (named Col1…ColN for example) that map the content of the array for one line at column X
    2. Generating a list of that class, one instance for each line
    3. Generating the correct number of column on the fly, binding each column to property ColX
    4. Binding your DataGrid to that list

    That’s kind of ugly, but it would work.

    If you do not have to rely on the DataGrid, there is a possibility using a UniformGrid. A UniformGrid is a panel that layouts its children in a regular grid (every item has the same width, every item has the same height). You can indicate the number of columns at runtime, and the panel will fit children one after the other up to the number of columns and then continue on another line. You could bind an ItemsControl to your array, indicating it should use a UniformGrid as its layout panel and indicating a suitable ItemTemplate to render each string.

    The second option is much easier, but you will not have the capabilities of the DataGrid like sorting, moving columns, row selection, edition events per row etc.

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

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Option 1: c:...>dumpbin /summary whatever.exe Look for a ".textbss" section.… May 11, 2026 at 11:49 pm
  • Editorial Team
    Editorial Team added an answer If you (or, specifically, the user the application runs as)… May 11, 2026 at 11:49 pm
  • Editorial Team
    Editorial Team added an answer After reading this (also with more information on this topic):… May 11, 2026 at 11:49 pm

Related Questions

I've got some library code that works on a range of .NET runtimes (regular,
I Have following in my struts.xml file <action name=ProductVerification class=com.frontend.ProductVerification> <result name=success>/jsp/product_verification.jsp</result> <result name=input>/jsp/product_verification.jsp</result>
Put simply a Soundex Algorithm changes a series of characters into a code. Characters
I have a function that receives three different people objects and generates a new

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.