Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
Questionchart axis offset when reflesh data Pin
smallkubi26-Oct-15 1:29
smallkubi26-Oct-15 1:29 
AnswerRe: chart axis offset when reflesh data Pin
John Torjo26-Oct-15 6:06
professionalJohn Torjo26-Oct-15 6:06 
QuestionI have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:05
Member 1208599525-Oct-15 9:05 
AnswerRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
BillWoodruff25-Oct-15 9:13
professionalBillWoodruff25-Oct-15 9:13 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:24
Member 1208599525-Oct-15 9:24 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
BillWoodruff25-Oct-15 11:25
professionalBillWoodruff25-Oct-15 11:25 
AnswerRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:18
Member 1208599525-Oct-15 9:18 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 9:23
Member 1208599525-Oct-15 9:23 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Pete O'Hanlon25-Oct-15 12:06
mvePete O'Hanlon25-Oct-15 12:06 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 12:16
Member 1208599525-Oct-15 12:16 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Pete O'Hanlon25-Oct-15 12:48
mvePete O'Hanlon25-Oct-15 12:48 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 13:04
Member 1208599525-Oct-15 13:04 
GeneralRe: I have this code in C # more people basic_info returns 0!? Can someone help me? Pin
Member 1208599525-Oct-15 12:24
Member 1208599525-Oct-15 12:24 
QuestionFiles importation library design problem Pin
jonatan_55624-Oct-15 8:49
jonatan_55624-Oct-15 8:49 
AnswerRe: Files importation library design problem Pin
BillWoodruff24-Oct-15 20:25
professionalBillWoodruff24-Oct-15 20:25 
GeneralRe: Files importation library design problem Pin
jonatan_55625-Oct-15 8:06
jonatan_55625-Oct-15 8:06 
GeneralString was not recognized as a valid DateTime in local works fine but not in server Pin
yemen_mansour24-Oct-15 2:15
yemen_mansour24-Oct-15 2:15 
GeneralRe: String was not recognized as a valid DateTime in local works fine but not in server Pin
Eddy Vluggen24-Oct-15 5:50
professionalEddy Vluggen24-Oct-15 5:50 
QuestionJSON to DataGrid View Pin
seipekm23-Oct-15 23:08
seipekm23-Oct-15 23:08 
AnswerRe: JSON to DataGrid View Pin
OriginalGriff23-Oct-15 23:14
mveOriginalGriff23-Oct-15 23:14 
GeneralRe: JSON to DataGrid View Pin
seipekm23-Oct-15 23:21
seipekm23-Oct-15 23:21 
GeneralRe: JSON to DataGrid View Pin
OriginalGriff23-Oct-15 23:31
mveOriginalGriff23-Oct-15 23:31 
GeneralRe: JSON to DataGrid View Pin
seipekm23-Oct-15 23:38
seipekm23-Oct-15 23:38 
this i tried
files.cs
C#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataGridJsonTest
{   
    class DataFiles
    {
        public file[] files { get; set; }
    }

    public class file
    {
        public string name { get; set; }
    }
}

Form1.cs
C#
 using MetroFramework.Forms;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DataGridJsonTest
{
    public partial class Form1 : MetroForm
    {
        public Form1()
        {
            InitializeComponent();

            WebClient client = new WebClient();
            var json = client.DownloadString("http://192.168.1.182/api/files/local?apikey=A6C6603BB2F743D6B084D7F52E568011");

            List<DataFiles> DataFiles = JsonConvert.DeserializeObject<List<DataFiles>>(json); 

            gvData.DataSource = DataFiles;
        }
    }
}


i will all names in a GridView
GeneralRe: JSON to DataGrid View Pin
OriginalGriff23-Oct-15 23:42
mveOriginalGriff23-Oct-15 23:42 
GeneralRe: JSON to DataGrid View Pin
seipekm23-Oct-15 23:52
seipekm23-Oct-15 23:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.