Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Moving rows between repeating tables

Posted: Jan/18/2011   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:15   Vote Up (0)   Vote Down (0)    
Howdy,

I've found a lot on this subject, using IP 2007 and Form Services. Here's my code for when the button is clicked on the desired row. The repeating table is a return from a web service of searching for people. So this repeating table may have several rows in it. I want to select one and move it to another repeating table. Adding it to another table is done and working, but the values saved in the other table is incorrect, so I need assistance pulling the data out of the source table.

1 public void addRequestor_Clicked(object sender, ClickedEventArgs e)  
2         {  
3             XPathNavigator currentReq = e.Source;  
4  
5             XPathNavigator selReqs = MainDataSource.CreateNavigator().SelectSingleNode(  
6                 "/my:myFields/my:DetailsSection/my:SearchRequestorSection/my:group33", NamespaceManager);  
7  
8             XmlDocument xmlDoc = new XmlDocument();  
9             xmlDoc.AppendChild(xmlDoc.CreateElement("my:group34", selReqs.NamespaceURI));  
10  
11             xmlDoc.DocumentElement.AppendChild(xmlDoc.CreateElement("my:selName", selReqs.NamespaceURI));  
12             currentReq.MoveToNext("Name",currentReq.NamespaceURI);  
13             xmlDoc.DocumentElement.LastChild.InnerText = currentReq.ToString();  
14  
15             xmlDoc.DocumentElement.AppendChild(xmlDoc.CreateElement("my:selTitleAgency", selReqs.NamespaceURI));  
16             currentReq.MoveToNextAttribute();  
17             xmlDoc.DocumentElement.LastChild.InnerText = currentReq.Value;  
18  
19             xmlDoc.DocumentElement.AppendChild(xmlDoc.CreateElement("my:selURL", selReqs.NamespaceURI));  
20             currentReq.MoveToNextAttribute();  
21             xmlDoc.DocumentElement.LastChild.InnerText = currentReq.Value;  
22  
23             MainDataSource.CreateNavigator().SelectSingleNode(  
24                "/my:myFields/my:DetailsSection/my:Comments", NamespaceManager)

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

How to format and update GridView and DataGrid rows using JQuery

  
The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Delete Rows in GridView in ASP.Net 2.0

  
Read the previous code snippet to edit/update in a GridView here. I have disabled AutoGenerateColumns and declared the columns explicitly. In the below code snippet, I have made the delete button to appear as first column.

GridView - Change Row background every 3 rows

  

This should not be to hard but my head is not going for it today

I have a gridview that changes the sales reps name every 3 rows.

The data is group in 3 rows for each rep. estimates, job & invoices each have their own row

I want to change the backgroup for each rep.

I am using C# and I would guess it would be in the code behind file

I got this far but can not remember a way to check the next row to make sure

it is the same of changed from the previous row


protected void gvSaleReport_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
           string prevRep;
           prevRep = e.Row.Cells[0].Text;
           if (prevRep == e.Row.Cells[0].Text)
                e.Row.BackColor = System.Drawing.Color.Blue;
            else
                e.Row.BackColor = System.Drawing.Color.White;
        }
    }


Thanks



Problem with IE, layout and text moving..

  

hello,

here is the structure of my web pages, for some reason with IE i experience two strange bug that i cant replicate using FF in particular here is what happening:

- when i select the text space between letter shift like if the font change letter-spacing or size but it doesnt nor it is meant to

- the content of the <td> with rowspan make all other <td> elements to shift down, if i select the text in the main body the layout reform correctly

by no mean i can replicate the issue using FF whats strange is that the problem 2 replicates on IE selecting the text fixes it.


any suggestions pls?


<tr>
        <td>
        </td>
            </tr>


Problems moving Drupal from WebMatrix to hosting

  

I got the first beta of WebMatrix, downloaded Drupal, and got a site more or less going.  I then tried to move it to two different hosts - first the IIS server running on my own domain controller, then to my hosting service.  I dumped the DB with mysqldump, and imported it to the databases running on each server. Then I ftp'd the code and configuration files to both servers, and made appropriate configuration changes (primarily the mysql connect string).

On both servers I have the same problem: The site comes up in its home page and looks great, but as soon as I log in as the site admin, I get a 404 (not found) error.  Since it looks like virtually everything in Drupal is driven from the database, I really haven't the faintest idea where to start debugging this.

Can anyone give me any hints?


Filterling tables records

  

i have a common database for more then one company..

now i want to use Dyanamic Data web sites for data entrys.. but  dont know  how to filter table records based on company code


Thanx in Advance,

Ramesh



Delete duplicat rows using Linq

  

Hi,

I have a datatable in which some of the rows contain a column with duplicate values. I need to be able to delete the duplicate rows and leave only one, doesn't matter which one. 

The rows might look like this:

A, B, C, D

E, F, G, D

H, I, J, D

I need to delete two rows and be left with only one.

Thanks.


Moving Document Libraries with Content Types & Metadata

  

Hello All,

Was hoping someone could give me some guidance on this issue.  I have been working on a document management strategy for my department's sharepoint site which consists of numerous document libraries configured to a number of content types..  Lots of metadata and views.. etc

Recently, the IT department in our organization has started work on a green slate installation of Sharepoint.. new server, fresh install, master pages, site hierarchy, the works..  

Guess my question is, how hard is it going to be to migrate my document libraries  while keeping my metadata and content types intact?  I probably have about 21 content types and almost 10 Gigs of data to transfer over... not sure what the best approach is having all this content migrated over to the new portal.

I have done some research and either only find articles on moving content types or moving document libraries, but no articles on moving both and having the content types map to the document libraries while keeping the metadata.

Any help or guidance would be appreciated.

Greg


Moving approved doc's from one library to another

  

Hello Experts,

How can we move the approved documents from one document library to another? Here my first task is to setup the OOTB approval workflow and once the approver approves the documents it needs to delete the files from Doc lib 1 and move all the approved doc's to Doc lib 2. Can we do this with the SharePoint designer workflows ?

Thanks.


Updating SharePoint list from Browser-enabled InfoPath form Repeating Table (multiple records)

  

I have the following application design that I would like to implement using InfoPath and SharePoint.

Application design:

1. Select a student
2. Get student's tasks from a custom SharePoint List
3. Mark student's tasks
4. Save the changes back to SharePoint

All student tasks are stored in a SharePoint list, with each task being due on different days for different students.

I want the teacher to be able to tick-off multiple tasks at once, and provide comments on relevant tasks. Upon submittion the data will be saved to SharePoint.

 How do I submit multiple items from my InfoPath repeating table back to sharePoint list?

Here is what my forms looks like (using repeating table and a conditional formating rule to filter unwanted items):


 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge