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 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
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Menu Chen |
last post by:
我用LISTVIEW控件的时候,想限制用户对控件列大小的调节
但是找遍了LISTVIEW的属性,没有实现该功能的
另外,如果实在不能限制用户对列大小的调节的话,起码不要显示水平滚动
条,因为那会比较难看,可以吗?
|
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
|
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...
|
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;
...
|
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...
|
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..
|
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, ...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |