Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,069 members, 7,814,697 topics. Date: Wednesday, 01 May 2024 at 05:36 PM |
Nairaland Forum / Science/Technology / Programming / Data Editing In Cells (960 Views)
I Need A Programmer To Do Some Editing In My Site / All For Free! Learn Web Design, Digital Marketing, Graphic Designs,video Editing / Real Time Image Editing (2) (3) (4)
(1) (Reply)
Data Editing In Cells by maplecurie: 6:55pm On May 24, 2016 |
Hello, can someone tell me how i can edit data in cells. I am using .Net grid. thanks |
Re: Data Editing In Cells by johnievillie124: 7:01pm On May 24, 2016 |
maplecurie: a good question. Dapfor NetGrid expands its features with UITypeEditorEx class. This class has an enhanced set of methods that can be used to create an arbitrary control directly over data cell and to use it for editing. the code below should be of help. //This editor creates a clickable button inside the cell class MyEditor : UITypeEditorEx { public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.None; } public override StopEditReason EditCell(IGridEditorService service, Cell cell, StartEditReason reason) { using(Button button = new Button()) { //Add a reaction on user click button.Click += delegate { //Close control with some reason service.CloseCellControl(StopEditReason.UserStop); //Set a new value if needed cell.Value = _newvalue_; }; //Start editing in cell return service.CellEditControl(button, cell.VirtualBounds, reason); } } } |
(1) (Reply)
Please I Need Your Help. / Iiht Scholarship- / Why Is Instagram Not Using FLAG_KEEP_SCREEN_ON While Watching Videos
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7 |