Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,089 members, 7,957,076 topics. Date: Tuesday, 24 September 2024 at 06:37 AM |
Nairaland Forum / Science/Technology / Programming / Data Editing In Cells (980 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)
Admin Needed If You Wat To Blog Wit Us / Stack Overflow Just Launched Real-world Developer Problem Solver / [dev] Make A Mon - Make Pokemon From Pokemon Go
(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. 13 |