Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

.net - How can I prevent users from entering data into DataGridViewComboBoxCells? -


i have project uses number of datagridview controls. of cells of datagridviewtextboxcell persuasion. declare controls so:

dim mycell datagridviewcell 

later specify whether datagridviewtextboxcontrols or datagridviewcomboboxcells so:

mycell = new datagridviewtextboxcell   ...or... mycell = new datagridviewcomboboxcell 

none of places in code require ability users enter own values in combo boxes. is, either hard-coded or values gathered other data within application.

currently, users can highlight combo box control defined shown above , begin typing like. example, have 1 combo box offers user selection of integers between 1 , 9. can highlight combo box cell , enter "hello, world!" if i'd like.

what take disable ability? i'm sure there's property, have yet find it. have searched internet, , have found ability have user-entered values added list , stream of data-binding tutorials.

thank in advance! c

check here

edit

i should have put more information up, i'm tired , feeling little sick felt being lazy ... no have ruin laziness , force me type more. (lol joking).

essentially comboxbox see in comboboxcell acutally combobox control (tired = bad engrish).

from can recall, should able @ control used in cell using editingcontrolshowing event of datagridview. once there set dropdownstyle.

like:

private sub datagridview_editingcontrolshowing(byval sender object, byval e datagridvieweditingcontrolshowingeventargs)      dim c combobox = e.control      if not c nothing          c.dropdownstyle = comboboxstyle.dropdownlist      end if  end sub 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -