Silverlight / WPF - Silverlight Datagrid itemsource is not been displayed

Asked By Sreenath G V on 09-May-11 03:23 AM

I have filled the itemsource with List of class whose variables are same as datagrid columns. But after assigning itemsource to datagrid, grid is showing total rows but there is not data in that rows(infact empty rows are displayed whereas item source list has got data).

Any remedy for this issue. Please suggest.

Thanks

dipa ahuja replied to Sreenath G V on 09-May-11 03:25 AM
have you applied any css to your grid? because sometime it happens the text is displaying with background color..


Sreenath G V replied to dipa ahuja on 09-May-11 03:26 AM
No. its simple default datagrid
John Martin replied to Sreenath G V on 09-May-11 04:02 AM
Its nice one gives a lots of data on topic also give more data on topic.

---
Management Resumes | Construction Manager Resume | Fire Management Resume
Sreenath G V replied to John Martin on 09-May-11 04:57 AM
I hope I have metioned everything needed here..whet else you want..
Sreenath G V replied to John Martin on 09-May-11 05:58 AM
Here are more details..

Grid definition..

<sdk:DataGrid Name="dgrIncidents" AutoGenerateColumns="False" IsReadOnly="True" >

<sdk:DataGrid.Columns>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Reported Date" Binding="{Binding Reported_Date}"/>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Incident ID" Binding="{Binding Incident_ID}"/>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Closed Date" Binding="{Binding Closed_Date}"/>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Last Resolved Date" Binding="{Binding Last_Resolved_Date}"/>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Assigned Group" Binding="{Binding Assigned_Group}"/>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Assignee" Binding="{Binding Assignee}"/>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Status" Binding="{Binding Status}"/>

<sdk:DataGridTextColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" Header="Summary" Binding="{Binding Summary}"/>

</sdk:DataGrid.Columns>

</sdk:DataGrid>



and the item soruce class..

class clsGridLoadExcelData

{

public string _Reported_Date = "";

public string _Incident_ID = "";

public string _Closed_Date = "";

public string _Last_Resolved_Date = "";

public string _Assigned_Group = "";

public string _Assignee = "";

public string _Status = "";

public string _Summary = "";

public string Reported_Date

{

get

{

return _Reported_Date;

}

set

{

_Reported_Date = value;

}

}

public string Incident_ID

{

get

{

return _Incident_ID;

}

set

{

_Incident_ID = value;

}

}

public string Closed_Date

{

get

{

return _Closed_Date;

}

set

{

_Closed_Date = value;

}

}

public string Last_Resolved_Date

{

get

{

return _Last_Resolved_Date;

}

set

{

_Last_Resolved_Date = value;

}

}

public string Assigned_Group

{

get

{

return _Assigned_Group;

}

set

{

_Assigned_Group = value;

}

}

public string Assignee

{

get

{

return _Assignee;

}

set

{

_Assignee = value;

}

}

public string Status

{

get

{

return _Status;

}

set

{

_Status = value;

}

}

public string Summary

{

get

{

return _Summary;

}

set

{

_Summary = value;

}

}

 

}



_______________________

List<clsGridLoadExcelData> lArrObjclsGridLoadExcelData = new List<clsGridLoadExcelData>();



this will be my grids item source..any help now plzz..
D Sriram replied to Sreenath G V on 09-May-11 09:07 AM
Try With ObservableCollection instead of List
Sreenath G V replied to D Sriram on 09-May-11 09:55 AM
Yeah..I have tried that too..but was no use..