0

I know this was asked for several times but solutions didn't solve my problem. I want to set a gridview which I want to fill it with string data. I'm getting values from web service call and the column numbers may get high so it must be horizontally scrollable. I should set my values dynamically because I'm not using database to get the gridview source.

Here's a little XML sample for my values:

<Results>
<Row>

<IHUID>47</IHUID>
<IHUKID>36083</IHUKID>
<IHURRF>15755</IHURRF>
<IHDSC1>D 1307221717</IHDSC1>

</Row>

<Row>

<IHUID>51</IHUID>
<IHUKID>36086</IHUKID>
<IHURRF>15758</IHURRF>
<IHDSC1>A 925756</IHDSC1>

</Row>
</Results>

I can parse XML values from web service but can't set them to gridview. Below a picture of dataGridView example in C# which I want the same in Android.

enter image description here

Please give me your ideas on how to do it. Thanks.

tanzer
  • 303
  • 1
  • 5
  • 11
  • Use `HorizontalScrollView` and put your grid into it. Then dynamically determine the number of columns as needed. Although for your image, you might be better off using TableLayout inside your HorizontalScrollView. – Aleks G Sep 20 '13 at 14:11
  • 1
    I recently had a similar issue and I found a TableView with fixed (header) columns and rows: https://github.com/InQBarna/TableFixHeaders – 323go Sep 20 '13 at 14:19
  • That looks good. I hope I can adopt it. Thanks. – tanzer Sep 20 '13 at 14:36
  • That solution solved my problem: http://stackoverflow.com/questions/1399605/how-can-i-make-my-layout-scroll-both-horizontally-and-vertically – tanzer Sep 23 '13 at 13:55

0 Answers0