locked
How to set ID field of sharepoint list to not nullable. RRS feed

  • Question

  • hi,

    I want to set ID filed of sharepoint list to not nullable.

    bydefault it is int?.

    I want to set it int.

    Thanks in advance.

     

    • Moved by Mike Walsh FIN Wednesday, September 21, 2011 4:44 PM admin q (From:SharePoint - Development and Programming (pre-SharePoint 2010))
    Wednesday, September 21, 2011 1:56 PM

All replies

  • You can't set the ID, SharePoint manages this.  You can however create a new column to store your number.
    My SharePoint Blog - http://www.davehunter.co.uk/blog Twitter - @davehunter
    Wednesday, September 21, 2011 2:32 PM
  • Jitendra,

    As Dave said that ID column is manageable only by Sharepoint. So probably if you can describe your scenario and we can suggest you some workaround.

     


    Thanks,
    Rakesh
    Wednesday, September 21, 2011 4:21 PM
  • HI,

    The ID field is system generated one and it is not nullable.

    This is int only.


    Thanks, Rahul Rashu
    Thursday, September 22, 2011 4:14 AM
  • Actually when we create entity class for sharepoint list then it generates id field as int?

    .

    I want  it as int not nullable.

     

    So is it possible.

     

     

    Thursday, September 22, 2011 4:55 AM