Giter Site home page Giter Site logo

Comments (8)

ericsink avatar ericsink commented on May 24, 2024

Yes, DataGrid can do the fixed column and header row. Yes, it can do the selection and the notification of the tapped cell. No, it cannot do in-place editing in the cell. Not yet. :-)

Note that DataGrid right now is more like "a framework building data grids" and less like "a ready-to-use data grid". Its API is pretty rough. So far. :-)

from drawndatagridframework.

cvarelae avatar cvarelae commented on May 24, 2024

Thanks! Your control is so amazing...I'm trying to understand the code.

I would need to edit a cell, and change their background color when is selected and when you introduce a value jump to the next cell.

Any idea, where can i start ?

Thanks again

from drawndatagridframework.

ericsink avatar ericsink commented on May 24, 2024

Sorry -- the code is rather unfriendly right now. I'm working to make it more approachable.

You might want to look in grids.cs for usages of DrawCell_FillRectIfSelected. These show some basic examples of selections, being drawn as a partially transparent layer overlay.

from drawndatagridframework.

cvarelae avatar cvarelae commented on May 24, 2024

Hello Eric!

I came back to do tests with your code. I'm trying to do a version of your trivialgrid to modify values on the grid. But... i don't know how I could paint only a known cell on the main panel when the grid is totally displayed.

Can you help me, please?

Thanks a lot again!

from drawndatagridframework.

ericsink avatar ericsink commented on May 24, 2024

Note that I have stopped work on this code base (in favor of a completely
different approach to the same problem) and I don't know if or when I might
return to it.

If you're asking about how to do the UI for in place editing, the answer is
that this code cannot do that.

If you're asking how to tell the grid to redraw just one cell in trivial
grid...

The cells array is hooked up using a all to valuepercell_fromdelegates. The
object that it returns contains an event called changed. You need to
trigger this event with the coords of the cell you want to redraw.

E

On Thursday, November 20, 2014, cvarelae [email protected] wrote:

Hello Eric!

I came back to do tests with your code. I'm trying to do a version of your
trivialgrid to modify values on the grid. But... i don't know how I could
paint only a known cell on the main panel when the grid is totally
displayed.

Can you help me, please?

Thanks a lot again!


Reply to this email directly or view it on GitHub
#1 (comment)
.

from drawndatagridframework.

cvarelae avatar cvarelae commented on May 24, 2024

First of all, Thanks you very much for answering and helping me.

I achieve to change the text of a cell in 2 steps:

  • Changing the value in the array. For example: Cells[0,0] = "150"
  • Notify the change of the cell. Example: text.notify_changed(0,0);

I don't want to disturb you more.. I want to ask you the last thing:
Could i change the backcolor and textcolor of an only cell?

Thanks you again in advance!

from drawndatagridframework.

ericsink avatar ericsink commented on May 24, 2024

Trivial grid was not designed to allow per-cell format changes.

In trivial grid, notice this line:

var fmt = new ValuePerCell_Steady

and this one:

var fill_white = new ValuePerCell_Steady<CrossGraphics.Color>
(CrossGraphics.Colors.White);

These use ValuePerCell_Steady, which means that they will return the same
thing for all cells.

If you want to change the backgroundcolor and textcolor for just one cell,
you'll need these to be a different instance of the ValuePerCell objects.
Like a ValuePerCell_FromDelegates, for example. And you'll have to provide
delegates which return the right thing for each cell. (This will be a
little slower, BTW.)

Some of the other example grids are probably more flexible than trivial
grid is, so you could probably find ideas there.

E

On Thu, Nov 20, 2014 at 9:35 AM, cvarelae [email protected] wrote:

First of all, Thanks you very much for answering and helping me.

I achieve to change the text of a cell in 2 steps:

  • Changing the value in the array. For example: Cells[0,0] = "150"
  • Notify the change of the cell. Example: text.notify_changed(0,0);

I don't want to disturb you more.. I want to ask you the last thing:
Could i change the backcolor and textcolor of an only cell?

Thanks you again in advance!


Reply to this email directly or view it on GitHub
#1 (comment)
.

from drawndatagridframework.

cvarelae avatar cvarelae commented on May 24, 2024

Thanks. I will continue searching a solution hehe ;)

from drawndatagridframework.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.