|
Hi gurus,
I need to disable some items inside a ListView control. As far as I know ListViewItem has no Enabled property or something like it. How can I disable a ListViteItem?
Thanks
Aref
|
|
|
|
|
Hi Dear,
I don't know ListViewItem control in 2005. But if you had you can do Visible true false only in
RowDataBound Events only...... You have to find control by Casting it you can do visible true false;
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
Hi!
What do you mean by "disabling" a LVItem? Should it get a different color? Should the user not be able to select the item? Should doubleclicking it perform differently than it does with other LVItems?
Please specify more clearly.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
It is pretty clear that what Enabled and Disabled mean. As you mentioned , Disable items must look Gray and could not be selected. Also their Click, Doubleclick and other such events must not be triggered.
thanks
Aref
|
|
|
|
|
Since MS didn't include an Enabled property for LVItems, it seems it isn't "pretty clear" what you consider a disabled item to be.
ListViewItems are no controls on their own behalf, just like TreeNodes they are dependent from their containing parent control. Thus, Enabled does not have an inherent meaning by itself for child elements of controls.
You'll have to implement whatever meaning you want "Enabled" to have on your own.
"Their Click, Doubleclick and other such events" doesn't make sense, either - a LVItem doesn't fire these events, its containing ListView does.
So if you want a ListView that can handle additional properties for its Items, you'll have to roll your own (i.e. derive from ListView and catch the appropriate events).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Mav is dead on with his response. In order to do this, you'd have to roll your own ListView and ListViewItem classes to expose this kind of functionality.
If you don't want to do that, you could always just remove the disabled items from the ListView.
You really should read up on Windows GUI design guide. In there, it'll tell you why what you're doing is a bad idea. Something about a "consistant user experience". A ListView control is expected to provide a list of valid and selectable items. Turning off some items is an unexpected behavior for the control, thereby leading to confusion about how the control really works.
|
|
|
|
|
hi friends i need some help from u.. i have 1 gridview and i m populating data from database in pageload.. and i created checkbox in gridview so i want to do is now ..dynamically i want to checkbox ll true in gridview..plz..tell me wht can i do now..
thanks 2 all..
|
|
|
|
|
Hi,
in the gridview's datarowbound event you can seach checkbox from e.row.findcontrol["chkboxName"]
and then you can check if from database value is true then chkBox.Checked = true;
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi, sunray..
DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn();
{
column.HeaderText = "Total Filed";
column.Name = "TotalFiled";
column.Width = 66;
column.CellTemplate = new DataGridViewCheckBoxCell();
column.CellTemplate.Style.BackColor = Color.Beige;
this is my code which i m doing here, i m creating checkboxs in source code only ...
in this there is no control like checked after press dot..plzz see it once..
-- modified at 2:12 Tuesday 27th November, 2007
-- modified at 2:13 Tuesday 27th November, 2007
thanks 2 all..
|
|
|
|
|
|
Hi,
I am working on Outlook integration with ASP.NET web application. When I am importing the contacts the application is showing empty rows for those contacts which are deleted. I want to know is there any way to recognize deleted contact in outlook.
With warm regards
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
|
Thanks you. I got it.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
Hello i am developing an window application in which there is a combo box and i am getting data in it from text file and i can also add data in this text file at run time that i have done so far.
Now what i want that whatever item i select from combobox and press delete button will be deleted from text file.
Please Help....................
|
|
|
|
|
This is a pretty trivial problem.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have started a banking project and i have no idea about the accounting transaction. I don't know the format of the trial balance, journal voucher , general ledger How can i do this?
|
|
|
|
|
Read any basic Accounting book
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Hi.
To learn Account follow this link
http://highered.mcgraw-hill.com/sites/0072423390/student_view0/
Helps you to learn accounting basic fundass....
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
I have developed a windows applicaion in C#.I want to install this app in 10 system on the network.But i want to use same database( MS access) for application.I have a connection string in app config
<add key="DBPath" value="C:\Program Files\School\DB\School.MDB">
This is my original database path
how can access this database from other system on the network
please write the connection string in appconfig for other system?
|
|
|
|
|
You have to write like this
\\Server\C\ABC\MyDatabase.mdb
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Hi,
You can use [ Server.Mappath("\\x\\xx.mdb") ]
Try this.
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
Hi
I have created custom controls like listbox, spinbox, textbox and treeview controls
And we are handling mouse wheel msg strategy through strategy design pattern .
Problem is when form has scrollbars and when we scroll on tree view control
Then form also gets scrolled which is not required i.e, if I scroll treeview only treeview must scroll not the parent.
So how to stop this, could your suggest me a solution for this.
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
Hi,
take panel and put treeview in that.
Give height to treeview and scrollbar to panel.
Solve your problem..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I want to replace Dash with a period only once in a string like
ABC-XYZ =ABC.XYZ
ABCXYZ =ABCXYZ (No Replace)
ABC-X-Y-Z =ABC.X-Y-Z
A-BC-XYZ =A.BC-XYZ
ABCXYZ- =ABCXYZ.
I found where the first dash is match using of IndexOF property of string.
And RegEx.Replace replace all the found characters I want to replace only first occurrence.
But how I can replace only once...?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
write your own function, use loop, if character found then replace and then break or return.
|
|
|
|