Use of asp:Grid in SharePoint 2010

Hi,
I have a form in SharePoint where data from a table in Database is exposed to user via asp:Grid. This grid has bunch of input fields and checkboxes to represent data in the table. There is also a Save button on the form upon pressing it, data should be saved
back to the table. Right now all the rows in the grid are being saved when Save button is pressed even though 1 out of 100 rows in the grid are edited. I do not have row wise edit button/link because we do not want user to click on edit link of every
row for eiditing multiple rows. Is there any way the unique identifier of the row is saved in a hidden field when editing a row and only those rows are saved back to the DB?
Thanks in advance.

Hi,
According to your post, my understanding is that you want to update mutiple rows when using Gridview in SharePoint 2010.
We can update multiple records in a GridView on a single button click using JSON in ASP.NET.
For more information, you can refer to:
Update Multiple Rows of GridView using JSON in ASP.NET
Walkthrough: Performing Bulk Updates to Rows Bound to a GridView Web Server Control
Inline Editing and Updating in GridView with check box
Multiple Controls in Gridview to Update Sharepoint List
Thanks,
Linda Li                
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Linda Li
TechNet Community Support

Similar Messages

  • Way to use Visual Web part in sharepoint 2010 without using/installing third party tools

    I want to know the way to use Visual Web part in sharepoint 2010 without using/installing third party tools.
    Please provide me a link where i can actually know how it is done.

    + to _eNo_,
    Visual Studio 2010 has support for visual webpart, you can find that under Visual C# node in the Installed Templates section (if your preferred language is C#)
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Issue in use a freetextbox editor in sharepoint 2010

    hi,
    i have little problem that i want to integrate the html editor in my sharpeoint webparts but in chrome and IE >8.0 i dont get the content in it .so please provide me a any html editor for sharepoint 2010.. i m using the update panel in this webpart also.
    thanks.

    Hi Bhavik Jain,
    Have you checked the Microsoft.SharePoint.Publishing.WebControls.HtmlEditor or InputFormTextBox control.
    Html Editor Control for SharePoint Web Parts:
    http://www.mssharepointtips.com/tip.asp?id=997
    SharePoint HTML Editor control in custom webpart:
    http://www.pointsharepoint.com/2008/06/sharepoint-html-editor-control-in.html
    Thanks,
    Qiao Wei
    TechNet Community Support

  • What type of column to use for this situation in SharePoint 2010?

    Hi there,
    In a SharePoint 2010 list - I have to add a few columns which need users to pick a numeric value and it's unit of measurement. E.g.
    - 30 (Inches/ft/cms)  <-- Here 30 is a number field and then a dropdown to select a unit.
    An option is to create two columns (1st - Number type and 2nd Dropdown with Inches/ft/cms values).
    But I have a lot of such sets in the same list and am not sure if above is the best way to go?
    Are there any other options for me? Is a Site Content Type a good option? Anything else?
    Thanks.

    Hi,
    I can think of two ways that you can accomplish what you are trying to -
    1. Content types could be a way or Create Site columns and prepopluate the values in these columns and use it in your list
    2. create custom column (C#) see here for more info -http://msdn.microsoft.com/en-us/library/ff648469.aspx
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if the reply helps you

  • Get current loggedin user using silverlight client object model SharePoint 2010?

    Hello,
    How can i get the current loged in user of sharepoint 2010 in silverlight4.XX  version by programtically in C#?
    Thanks
    Lovkesh Patel

    Hi,
    ClientContext clientContext = ClientContext.Current;
    clientContext.Load(clientContext.Web, s => s.CurrentUser);
    clientContext.ExecuteQueryAsync((sender, args) => {
    var currentUser = clientContext.Web.CurrentUser; }, null);
    For more information:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.web.currentuser.aspx and
    http://stackoverflow.com/questions/3441794/retrieve-current-user-login-in-sharepoint-from-a-silverlight-application
    Hope this helps you
    Senior Sharepoint Developer,STS [email protected]

  • How to hide ribbon but show welcome control for all users using security trimmed control in sharepoint 2010

    Hi All,
    I have a requirement to hide ribbon in a document library for the read permission users. I have applied SPSecurityTrimmedControl, it is working for the read permission user but for the whole site it is hiding and also unable to see the welcome control,
    like user name, sign in as different user, etc.,
    <Sharepoint:SPSecurityTrimmedControl runat="server" ID="spTrimRibbon" PermissionMode="All" Permissions="ManageLists">
    I want to apply SPSecurityTrimmedControl to specific list/library with welcome control. Can someone please help me here.
    I Appreciate your assistance...
    MercuryMan

    Hello MercuryMan,
    I guess you have applied your code in master page that's why it is hidden from site. To hide specific list ribbon, go to your list-->and edit the page-->then add content editor webpart and apply below script.
    <SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
    <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
    </div>
    </SharePoint:SPSecurityTrimmedControl>
    http://blogs.msdn.com/b/sharepointdev/archive/2012/04/30/how-to-hide-the-ribbon-in-sharepoint-2010-rajeswari-mohandas.aspx
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • To find out the list of user profiles marked for deletion using powershell or C# for SharePoint 2010

    I have Disabled the MysiteCleanup timer Job and disabled few user profile accounts in AD.  Then in SharePoint user profile service, ran the User profile full synchronise job.
    I am able to find the marked for deletion records from the table (UserProfile_Full) in SQL server and also in the Manage User profile menu of the central admin under "Profile missing from import"
    view.  But  am not getting these records, If I execute the  below powershell command.
    $upa = Get-spserviceapplication -name 'User Profile Service Application'
    Set-SPProfileServiceApplication $upa -GetNonImportedObjects $true
    This command shows only the system account and not the accounts, which are marked for deletion .
    Please suggest how to get this result.
    Thanks & Regards,
    Yoga

    What result do you get hen use use type below in powershell
    $upa

  • Export to Excel is not working for List View Web Part after filtering using Query String parameters in SharePoint 2010

    Hi, 
    I am filtering SharePoint list view web part based on Query string parameter and I am doing Export to Excel by using following code.
    <a href="#" onclick="javascript:window.location='../_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=0DC67399-BE11-48F3-ADFC-E911FB8B5845&View=54671412-3EFE-4281-835A-9EF747AE774E&CacheControl=1'"><img
    alt="Excel" src="/_layouts/images/icxlsx.gif" border="0"/>&nbsp;Export to Excel</a>
    Issue: Able to do Export to Excel when there are no filters applied on list view web part but if applied filters on web part and do export to excel , only header fields are displaying in the excel sheet.
    I don't know why owssvr.dll is behaving like that .
    Please share your ideas.
    Thanks in Advance.

    Hi,
    According to your post, my understanding is that you wanted to create hyperlink to export to excel.
    The URL to execute the export is as follows:
    {Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1
    After getting the GUID, you  need to “decode” the list GUID.
    Replace %7B with {
    Replace %2D with –
    Replace %7D with }
    More information:
    Create Link to Export Library Contents to Excel
    SharePoint - Create a link to export to Excel
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Cannot download master page using managed client object model SharePoint 2010

    string siteUrl = "http://server:port/sites/demo";
    string fileServerRelativeUrl = @"/sites/demo/_catalogs/masterpage/v4.master";
    using (ClientContext context = new ClientContext(siteUrl)){ FileInformation fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(context, fileServerRelativeUrl);}
    File.OpenBinaryDirect() throws "The remote server returned an error: (404) Not Found" error. while Microsoft.SharePoint.Client.File f1 = web.GetFileByServerRelativeUrl(fileUrl);
                    context.Load(f1);
                    context.ExecuteQuery();this gives the file object.File.OpenBinaryDirect() works if I pass "/sites/demo/_catalogs/masterpage/TabViewPageLayout.aspx" as fileServerRelativeUrl.Both the files are present in Master Page Gallery.File.OpenBinaryDirect() doesn't work if I pass any of ".master" file in the master page galleryPlease let me know whether downloading the master pages is supported using managed Client object model. 

    Hi,
    If don't change the default config, We are unble to download master page.
    It's better to create your own (perhaps based on the default.master) and use that master page.
    also,make sure there's no a permission issue on the website.
    Thanks
    Guangchao chen
    TechNet Community Support

  • How to activate Custom Feature in SharePoint 2010 using Client Object model

    I am trying to Activate a custom feature using Client Object Model in SharePoint 2010. Here is the code I used. When I execute the code, I got the error "Feature with Id 'xx' is not installed in this farm, and cannot be added to this scope while
    creating site collection". Can anyone help?
    ClientContext clientContext = new ClientContext(spURL);
    //GUID of the custom feature                    
    Guid districtFeatureId = new Guid("5b3529de-5045-46da-af87-8d2e32c121a7");
    Site clientSite = clientContext.Site;
    FeatureCollection clientSiteFeatures = clientSite.Features;
    clientContext.Load(clientSiteFeatures);
    clientContext.ExecuteQuery();
    //Activate the feature
    clientSiteFeatures.Add(districtFeatureId, false, FeatureDefinitionScope.Site);
    clientContext.ExecuteQuery();

    Hi shil chan,
    When you activate a feature on the site collection, the feature should be scoped to site or farm, the error message shows it cannot find the specific feature, this will happen when you have a feature in web
    scope or the feature isn’t installed.  
    So, to troubleshooting this issue:
    Verify whether the feature is scoped to web. Please go to
    Site Setting->Site Features . If the feature is a web scope feature, then add the feature to webfeatures.
    Make sure the feature is installed correctly.
    Please inform me freely if you have any questions.
    Thanks

  • How to export Listitems in sharepoint 2010 using powershell

    I am able to export all items in sharepoint list by below command in powershell
    Export-SPWeb -Identity
    "http://myurl.com" -   path
    "C:\Export\Lists\Announcements.cmp" -ItemUrl
    "/Lists/Announcements/AllItems.aspx" -Force
    My list is having huge data in production I want to export only 10 items from the list using powershell. Is there any command to export only certain items.
    I want to filter the Items and export only certain set of items using Export command.
    Rajendra

    Hi all,
    To export a list you can try: 
    Export data from SharePoint 2010 List using Management Shell: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/A_9182-Export-data-from-SharePoint-2010-List-using-Management-Shell.html
    Export SharePoint 2010 List to Excel with PowerShell: http://iwillsharemypoint.blogspot.com.es/2011/02/export-sharepoint-2010-list-to-excel.html
    Export SharePoint List Items to CSV using PowerShell: http://www.sharepointdiary.com/2013/04/export-sharepoint-list-items-to-csv-using-powershell.html
    If a post answers your question, please click Mark As Answer on that post and
    Vote as Helpful

  • Advanced Search using conditional & logical operators+ sharepoint 2010

    Hi Team,
    We have an requirement something like this. we have to search values from Custom SharePoint List using Conditional & Logical Operators in SharePoint 2010. how can i achieve this ? if some one has worked on something like this, can you please share the
    details to my email id ([email protected]
    Thanks in Advance.
    Cheers, San

    Hi Santhosh,
    If you have only one list, then you can use CAML query to perform search in that list. You can write code to generate dynamic CAML based on selection in the filter.
    If have to perform the search function on multiple list then you can use Search object model and create dynamic query and execute it using Search OM.
    http://msdn.microsoft.com/en-us/library/office/dn423226(v=office.15).aspx
    Best Regards,
    Brij K

  • To Track Developer Dashboard Data in SharePoint 2010

    Hi Techies,
    I need to track data of Developer Dashboard in SharePoint 2010.
    i haven't find any article related to that or any work around for that.
    Please let me know whether it is possible or not.

    I'm thinking that since the dev dashboard output is added directly to the page (
    http://blogs.technet.com/b/speschka/archive/2009/10/28/using-the-developer-dashboard-in-sharepoint-2010.aspx ) it should be possible to capture all data inc. dev dashboard by intervening in the asp.net pipeline (http://msdn.microsoft.com/en-us/library/vstudio/bb470252(v=vs.100).aspx).
    Another approach seems to be to subclass SPMonitoredScope so at least your custom code leverages it which makes it easy to track dev dashboard data added by your own custom code.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Multiple filters in a drop-down list in SharePoint 2010 browser forms

    I am using Infopath forms based on SharePoint 2010 lists. I am trying to filter a drop-down control based on inputs in two previous controls such that it looks up information in a list and returns options where A = A and B = B. This filter works when using
    Preview in Infopath 2010, but does not work on the list itself on publishing; it only filters where A = A. The B = B filter is ignored.
    1) Is there a workaround I can use so that the browser form respects the filter in the same way the Infopath form does?
    or, if not:
    2) Is there a way to force SharePoint 2010 to open up "new item" or "edit item" in InfoPath instead of in a browser form?
    Thanks.

    Thanks for your help!
    1) That was my concern. When I googled around, it seemed like it wasn't possible to do filters at all in DLL in browser forms, yet I had one that was working. So I was curious why one worked but two didn't.
    2) When I try to publish an InfoPath form from Designer that's based on a SharePoint list, the only option it gives me is to publish to that list, not to a document library.
    2a) If I did figure out how to do it, would it still submit the information to the list? I don't want a form library scenario where each list item is its own form based on a single template, I want a list I can also manage with Access.

  • Client Object Model Sharepoint 2010

    We are using client object model in sharepoint 2010
    When we excute the ExcuteQuery method of clinet obejct model we are getting following error
    The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again
    Girish

    Hi ,
    A FormDigest control has to be included to create a digest for security validations when performing some modifications to SharePoint data. It adds a security token inside your page based on user, site and time. Once the page is posted back the security token
    is validated. Once the security token is generated it’s valid for a configurable amount of time. 
    for more info check the below links
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.formdigest.aspx
    http://ranaictiu-technicalblog.blogspot.com.au/2010/02/sharepoint-2010-client-object-model-for.html
    if above link is not working, use below function before execute the query.
    function CustomUpdateFormDigest()
    if(window._spPageContextInfo != null)
    var $v_2 = window._spPageContextInfo;
    var $v_3 = $v_2.webServerRelativeUrl;
    var $v_4 = window._spFormDigestRefreshInterval;
    UpdateFormDigest($v_3, $v_4);
    CustomUpdateFormDigest();
    Please mark it as an answer/helpful if it is useful.
    Thanks
    Mahesh

Maybe you are looking for