Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
QuestionAdding controls at design time via DesignerActions [modified] Pin
Chris Copeland29-Oct-08 5:11
mveChris Copeland29-Oct-08 5:11 
AnswerRe: Adding controls at design time via DesignerActions Pin
Thomas Stockwell29-Oct-08 6:21
professionalThomas Stockwell29-Oct-08 6:21 
GeneralRe: Adding controls at design time via DesignerActions Pin
Chris Copeland29-Oct-08 10:42
mveChris Copeland29-Oct-08 10:42 
QuestionListView Column Sorting Pin
vishnukamath29-Oct-08 4:30
vishnukamath29-Oct-08 4:30 
AnswerRe: ListView Column Sorting Pin
Simon P Stevens29-Oct-08 5:07
Simon P Stevens29-Oct-08 5:07 
GeneralRe: ListView Column Sorting Pin
J4amieC29-Oct-08 5:35
J4amieC29-Oct-08 5:35 
GeneralRe: ListView Column Sorting Pin
Simon P Stevens29-Oct-08 6:32
Simon P Stevens29-Oct-08 6:32 
GeneralRe: ListView Column Sorting Pin
vishnukamath29-Oct-08 20:12
vishnukamath29-Oct-08 20:12 
hi,
we can add another Icomparer class for List view Sorting ,
private void Form1_Load(object sender, EventArgs e)
{
var y = from x in dcontext.CONFIG_CITies
orderby x.str_city descending
where x.bool_active == true
select new { Code = x.int_cityID, CityName = x.str_city };
int i = 0;
foreach (var lst in y)
{
listView1.Items.Add(lst.Code.ToString());
listView1.Items[i].SubItems.Add(lst.CityName);
i++;
}
int j=0;
arr = new string[y.Count()];

foreach (var asd in y)
{
arr[j] = asd.CityName+","+asd.Code;
j++;
}

}

private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
{
listView1.Columns[1].ListView.Sorting = SortOrder.Descending;
if (listView1.Columns[1].ListView.Sorting == SortOrder.Descending)
{
listView1.Items.Clear();
string[] y;
Array.Sort(arr);
string x;
int j = 0;

for (int i = 0; i < arr.Count(); i++)
{
x = arr.ElementAt(i);
y = x.Split(',');
listView1.Items.Add(y[0]);
listView1.Items[j].SubItems.Add(y[1]);
j++;
}

}
}
i tried this above sample code ,but it is also not working .Please help me.
QuestionMS Agent speech related Pin
Muammar©29-Oct-08 4:07
Muammar©29-Oct-08 4:07 
AnswerRe: MS Agent speech related Pin
Thomas Stockwell29-Oct-08 6:23
professionalThomas Stockwell29-Oct-08 6:23 
QuestionUnit testing for DevExpress Pin
J-Cod3r29-Oct-08 4:07
J-Cod3r29-Oct-08 4:07 
AnswerRe: Unit testing for DevExpress Pin
Kevin McFarlane29-Oct-08 5:47
Kevin McFarlane29-Oct-08 5:47 
GeneralRe: Unit testing for DevExpress Pin
J-Cod3r29-Oct-08 20:26
J-Cod3r29-Oct-08 20:26 
AnswerRe: Unit testing for DevExpress Pin
N a v a n e e t h29-Oct-08 18:35
N a v a n e e t h29-Oct-08 18:35 
AnswerRe: Unit testing for DevExpress Pin
Dennis Garavsky7-Jul-11 5:21
Dennis Garavsky7-Jul-11 5:21 
Questionxml Pin
arkiboys29-Oct-08 3:28
arkiboys29-Oct-08 3:28 
AnswerRe: xml Pin
SeMartens29-Oct-08 3:39
SeMartens29-Oct-08 3:39 
GeneralRe: xml Pin
arkiboys29-Oct-08 4:40
arkiboys29-Oct-08 4:40 
GeneralRe: xml Pin
PIEBALDconsult29-Oct-08 4:54
mvePIEBALDconsult29-Oct-08 4:54 
GeneralRe: xml Pin
Andrew Rissing29-Oct-08 8:28
Andrew Rissing29-Oct-08 8:28 
AnswerRe: xml Pin
Guffa29-Oct-08 8:29
Guffa29-Oct-08 8:29 
GeneralRe: xml Pin
arkiboys29-Oct-08 21:47
arkiboys29-Oct-08 21:47 
GeneralRe: xml Pin
Guffa30-Oct-08 9:58
Guffa30-Oct-08 9:58 
GeneralRe: xml Pin
arkiboys30-Oct-08 11:48
arkiboys30-Oct-08 11:48 
AnswerRe: xml Pin
Guffa30-Oct-08 15:32
Guffa30-Oct-08 15:32 

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.