Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Some Help with jQuery
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Client-side développement
Titre:
Some Help with jQuery
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01554460
Message ID:
01554460
Vues:
52
Hi everybody,

I have the following code:
 $('#fntype').val('Edit');
            $('#Id').val($('.trSelected td:eq(0)').text());
            $('#Number').val($('.trSelected td:eq(1)').text());
            $('#Name').val($('.trSelected td:eq(2)').text());
            $('#Contact1').val($('.trSelected td:eq(3)').text());
When I run this site in IE and have a breakpoint, I can check in immediate window that
$('.trSelected td:eq(0)').text() and other selected elements display correct values.

What the above statement is supposed to do?

In my page view I have the following:
<br />
<div style="padding-left:150px; padding-top:50px; padding-bottom:50px;">
<table id="flexClients" style="display:none">
</table>
</div>
<div style="display:none">
<form id="sform">
<input type="hidden" id="fntype" name="fntype">
<input type="hidden" id="Id" name="Id">
<label for="Number">Client No: </label>
<input type="number" name="Number" class="numericOnly" />
<label for="Name">Client Name: </label>
<input type =  "text" size =25 name ="Name" /><br />
<label for="Contact11">Contact 1: </label>
<input type =  "text" size =25 name ="Contact1" /><br />
<input type="button" value="Submit" onclick="addFormData();$('#flexClients').flexOptions({ url: '/Client/Client/'}).flexReload();clearAll();$('#sform').dialog('close');">
<input type="button" value="Cancel" onclick="clearAll();$('#sform').dialog('close');" />
</form>
</div>
And I also have
 $("#flexClients").flexigrid({
        url: '/Client/Client/',
        dataType: 'json',
        colModel: [
        { display: 'Client Id', name: 'Id', width: 100, sortable: true, align: 'center', hide: true},
        { display: 'Client #', name: 'Number', width: 100, sortable: true, align: 'center' },
        { display: 'Name', name: 'Name', width: 350, sortable: true, align: 'center' },
        { display: 'Contact 1', name: 'Contact1', width: 350, sortable: true, align: 'center' },
        ],
        buttons: [
        { name: 'Add', bclass: 'add', onpress: test },
        { name: 'Edit', bclass: 'edit', onpress: test },
        { name: 'Delete', bclass: 'delete', onpress: test },
        { separator: true }
In the .js file that is loaded in that view.

So, 1) what the above lines are doing and can it be the collision between form names and grid column names and that's why my Edit button doesn't work?

In the flexgrid sample I used as a prototype, the Edit form opens with values pre-populated, but in my case, Edit forms comes with empty values - the same as Add.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform