Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

enter image description here

Were i dislay the title and date are a Gridview when pressing the title that uniqueid shows and the information are displayed, but also just to that UniqueId that i display i want to add Nickname and comments (Userinput) and save back to the list there i have the columns nickname and comments enter image description here

enter image description here

share|improve this question

1 Answer 1

Have you tried committing the changes back to SharePoint?

itemToUpdate["Nickname"] = TextBoxName.Text;
itemToUpdate["_Comments"] = TextBoxComment.Text;
itemToUpdate.Update();

Edit

It's hard for me to make out what you're asking here.

If you're trying to query against the SPListItem.UniqueId, it's a Guid, not an int.

query.Query = "<Where>" +
                "<Eq>" +
                  "<FieldRef Name='UniqueId'/>" +
                  "<Value Type='Guid'>" + theUniqueId + "</Value>" +
                "</Eq>" +
              "</Where>";

Also, those extra gators ("<" + listItemId + "/>") in your query will cause the query to fail to parse.

share|improve this answer
    
@ rjcup3 that not the problem i dont know how to use spsitedataquery to get items by id , –  Martin Feb 13 '13 at 18:01
    
I edited my answer to address this. –  RJ Cuthbertson Feb 13 '13 at 18:18
    
@jcup3 okej , but do spsitedataquery support splistitem? –  Martin Feb 13 '13 at 18:40
    
It's for queries against multiple lists. If you're only querying one list, just use SPQuery. –  RJ Cuthbertson Feb 13 '13 at 18:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.