Reputation: 1136
I want to show a table/data grid as shown below, this is for mobile devices like iPhone and Andriod phones. Are there any examples for this? (using plain HTML/CSS/JavaScript)
Upvotes: 0
Views: 1718
Reputation: 15853
I had to do something like this when developing using jQTouch. I simply created an Edge-to-edge list with one item, and place a table inside it:
<ul class="edgetoedge">
<li>
<table sytle="width:100%; text-align: center; padding: 5px">
<tr><td>Row 1-1</td><td>Row 1-2</td><td>Row 1-3</td></tr>
<tr><td>Row 2-1</td><td>Row 2-2</td><td>Row 2-3</td></tr>
</table>
</li>
</ul>
Then style the table (i.e. <table>
, <tr>
, and <td>
) to your heart's content.
Upvotes: 0
Reputation: 2764
If you have the HTML, CSS, etc. ready and working, you can use UIWebView class on iOS/iPhone to view your HTML file.
NSString *htmlString = @"<html>.......</html>";
NSURL *baseURL = [NSURL URLWithString:@""];
[myWebView loadHTMLString:htmlString baseURL:baseURL];
Upvotes: 1