473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

ListView & Coloumn Managing [Win #C]

Is There a way of managing individual Listview columns when it comes to
Color, Text size, etc.? If so, does anyhow have any helpful suggestions on
how to do this feat? If So, there is a sample of my code below:

private void Create_LV_Headers()

{

//Index Header

ColumnHeader colHead;

colHead = new ColumnHeader();

colHead.Text = "Item Name";

colHead.Width = 135;

this.lvBody.Columns.Add(colHead);

//Price Header

colHead = new ColumnHeader();

colHead.Text = "Price";

colHead.Width = 60;

this.lvBody.Columns.Add(colHead);

}

private void Display_Existing_TableItems()

{

//Add Selected Button Itemn To ListView

lvBody.BeginUpdate();

ListViewItem lvItem = lvBody.Items.Add(myListView_Item_Counter);

lvItem.SubItems.Add(Selected_Item);

lvItem.SubItems.Add(Item_Quantity.ToString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_NUMBER.T oString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_PRICE.To String());

this.lvBody.EndUpdate();

}
Thank you all in advance.

MikeY
Jan 19 '07 #1
3 1298
Have you tried this:
http://msdn2.microsoft.com/en-us/lib...13(vs.80).aspx

chanmm

"MikeY" <mi*******@yaho.comwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Is There a way of managing individual Listview columns when it comes to
Color, Text size, etc.? If so, does anyhow have any helpful suggestions on
how to do this feat? If So, there is a sample of my code below:

private void Create_LV_Headers()

{

//Index Header

ColumnHeader colHead;

colHead = new ColumnHeader();

colHead.Text = "Item Name";

colHead.Width = 135;

this.lvBody.Columns.Add(colHead);

//Price Header

colHead = new ColumnHeader();

colHead.Text = "Price";

colHead.Width = 60;

this.lvBody.Columns.Add(colHead);

}

private void Display_Existing_TableItems()

{

//Add Selected Button Itemn To ListView

lvBody.BeginUpdate();

ListViewItem lvItem = lvBody.Items.Add(myListView_Item_Counter);

lvItem.SubItems.Add(Selected_Item);

lvItem.SubItems.Add(Item_Quantity.ToString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_NUMBER.T oString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_PRICE.To String());

this.lvBody.EndUpdate();

}
Thank you all in advance.

MikeY
Jan 20 '07 #2

Thank you Chan. I'm going to go look at the site now.

MikeY

"Chan Ming Man" <ch*****@hotmail.comwrote in message
news:D1**********************************@microsof t.com...
Have you tried this:
http://msdn2.microsoft.com/en-us/lib...13(vs.80).aspx

chanmm

"MikeY" <mi*******@yaho.comwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>Is There a way of managing individual Listview columns when it comes to
Color, Text size, etc.? If so, does anyhow have any helpful suggestions
on how to do this feat? If So, there is a sample of my code below:

private void Create_LV_Headers()

{

//Index Header

ColumnHeader colHead;

colHead = new ColumnHeader();

colHead.Text = "Item Name";

colHead.Width = 135;

this.lvBody.Columns.Add(colHead);

//Price Header

colHead = new ColumnHeader();

colHead.Text = "Price";

colHead.Width = 60;

this.lvBody.Columns.Add(colHead);

}

private void Display_Existing_TableItems()

{

//Add Selected Button Itemn To ListView

lvBody.BeginUpdate();

ListViewItem lvItem = lvBody.Items.Add(myListView_Item_Counter);

lvItem.SubItems.Add(Selected_Item);

lvItem.SubItems.Add(Item_Quantity.ToString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_NUMBER. ToString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_PRICE.T oString());

this.lvBody.EndUpdate();

}
Thank you all in advance.

MikeY

Jan 20 '07 #3
If Anyone is looking for something simular try this. It works perfectly

http://msdn2.microsoft.com/en-us/lib...rsubitems.aspx

MikeY

"MikeY" <mi*******@yaho.comwrote in message
news:uX**************@TK2MSFTNGP03.phx.gbl...
>
Thank you Chan. I'm going to go look at the site now.

MikeY

"Chan Ming Man" <ch*****@hotmail.comwrote in message
news:D1**********************************@microsof t.com...
>Have you tried this:
http://msdn2.microsoft.com/en-us/lib...13(vs.80).aspx

chanmm

"MikeY" <mi*******@yaho.comwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>>Is There a way of managing individual Listview columns when it comes to
Color, Text size, etc.? If so, does anyhow have any helpful suggestions
on how to do this feat? If So, there is a sample of my code below:

private void Create_LV_Headers()

{

//Index Header

ColumnHeader colHead;

colHead = new ColumnHeader();

colHead.Text = "Item Name";

colHead.Width = 135;

this.lvBody.Columns.Add(colHead);

//Price Header

colHead = new ColumnHeader();

colHead.Text = "Price";

colHead.Width = 60;

this.lvBody.Columns.Add(colHead);

}

private void Display_Existing_TableItems()

{

//Add Selected Button Itemn To ListView

lvBody.BeginUpdate();

ListViewItem lvItem = lvBody.Items.Add(myListView_Item_Counter);

lvItem.SubItems.Add(Selected_Item);

lvItem.SubItems.Add(Item_Quantity.ToString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_NUMBER .ToString());

lvItem.SubItems.Add(DB_Items.GETSET_TABLE_PRICE. ToString());

this.lvBody.EndUpdate();

}
Thank you all in advance.

MikeY


Jan 20 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Menu Chen | last post by:
我用LISTVIEW控件的时候,想限制用户对控件列大小的调节 但是找遍了LISTVIEW的属性,没有实现该功能的 另外,如果实在不能限制用户对列大小的调节的话,起码不要显示水平滚动 条,因为那会比较难看,可以吗?
3
by: Li Pang | last post by:
Hi, I'd like to know how to hide a column of the listview control. anybody gives a hand? Thanks in advance
5
by: Martin Horn | last post by:
Hi all, I want to implement a listview with editable subitems and I assume the easiest way is to overlay a textbox over the item to be edited. With this in mind I have come up with: Using...
1
by: Alan T | last post by:
I have a listview defined a coloumn at design time. And the code I use to add a listviewitem: ListViewItem lvi = new ListViewItem(user.Name); lvi.Tag = (Object)user.Id; ...
1
by: MikeY | last post by:
Hi Everyone, I am trying to ensure displayed items at the top most portion of my ListView when being added to my ListView, no matter where the items are being added with in the listview. So that...
2
by: YMPN | last post by:
Hello Guys, I have a datetime coloumn, i want to extract time only this coloumn and save this time only to another coloumn in the same table. I am new to asp.net.. thanks..
0
by: Vijay | last post by:
Prep Courses for International Certifications, CSTE & CSQA & ISEB & ISTQB &Business Analyst & SOA Certifications in HYDERABAD. After receiving overwhelming response to our last 50+ batches, ...
5
by: Jure Bogataj | last post by:
Hi all! I have a problem (performance issue) with listview. I have implemented an ItemSelectionChange on my listview and put some code in it (I build some toolbar based on selection and update...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.