A method for producing a solid nanocomposite material comprising nanoparticles of a metal coordination polymer with CN ligands, said nanoparticles satisfying the formula [Alk+x]Mn+[M′(CN)m]z− wherein Alk is an alkali metal, x is 1 or 2, M is a transition metal, n is 2 or 3, M′ is a transition metal, m is 6 or 8, z is 3 or 4;
- said cations Mn+ of the metal coordination polymer being bound through an organometallic or metal coordination bond to an organic group R2 of an organic graft, and said organic graft being further chemically attached to at least one surface of a solid support by reaction of a group R1 of said organic graft with said surface;
- said method comprising the following successive steps:
- a) a solid support is provided;
- b) the chemical attachment of the organic graft to the surface of the solid support is achieved;
- c) the solid support to the surface of which is attached the organic graft is put into contact with a solution containing the Mn+ ion and then the thereby grafted solid support obtained is washed one or several times and is optionally dried;
- d) the grafted solid support obtained at the end of step c) is put into contact with a solution containing a complex or salt of [M′(CN)m]z− and a salt of an alkali metal Alk, and then the thereby obtained solid support is washed once or several times, and is optionally dried;
- and
- e) steps c) to d) are optionally repeated, wherein
- f) if the steps c) and d) are the ultimate steps of the method, then during step c) the obtained grafted solid support is washed once or several times and is dried, and during step d), the thereby obtained solid support is washed one or several times and dried.