Post Reply 
 
Thread Rating:
  • 1 Votes - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic contenct not working property in sortable
1st December, 16:05
Post: #1
Dynamic contenct not working property in sortable
Hi,

I am trying to implement a popup in a ASP.net sortable GridView control. Basically, when a label in a row (tr) is clicked in the gridview, a popup will display, showing the detail information about that particular row. The content of the popup is dynamic. I am able to create the popup with the dynamic content. However, after the popup is opened, and when I try to sort the grid by clicking on the column heading, the page is replaced by the popup page. Can anyone tell me what's wrong with my code?

Parent page that contains sortable gridView:
JS Code
<asp:GridView ID="gvwService" AllowSorting="true" runat="server" AutoGenerateColumns="False"
                           EnableViewState="True"  OnSorting="gvw_Sorting" width="460" >
    <Columns>            
           <asp:TemplateField HeaderText="Service" SortExpression="ServiceName">
                 <ItemTemplate>  
                       <asp:Label ID="lblServiceName" runat="server"
	              Text='<%# DataBinder.Eval(Container.DataItem, "ServiceSubType") %>' 
                           EntityId='<%# DataBinder.Eval(Container.DataItem, "ServiceSubTypeId") %>' 
		 ToolTip="Click for details" />                                        
                 </ItemTemplate>
            </asp:TemplateField>             
            <asp:BoundField HeaderText="Service Group" DataField="ServiceGroup" SortExpression="ServiceGroup" />     
</Columns>                                   
</asp:GridView>


JS Code
<script type="text/javascript" language="javascript">
         // Create the tooltips on document load
         $(document).ready(function () {
 
             var qTipBorderWidth = 3, qTipBorderRadius = 5, qTipBorderColor = '#1B549C', qTipPadding = 15,
                qTipTextAlign = 'left', qTipStyleName = 'blue', qTipStyleBackground = '#FAFAFA',
                qTipTitleColor = 'white', qTipTitleBackground = '#333366',
                qTipContentClassName = 'instruction',
                qTipCloseButton = "<img src='../../App_Themes/IROTheme/Images/close.gif' alt='Close'/>";
 
             $("[ID*='lblServiceName']").each(function (index) {
                 $(this).qtip({
                     // Give it some content, in this case a simple string
                     content: {
                         url: 'Popup.aspx',
                         data: { EntityId: $(this).attr("EntityId") },
                         method:'get',
                         title: { text: $(this).text(), button: qTipCloseButton }
                     },
                     position: { corner: { tooltip: "leftBottom", target: "topRight"} },
                     show: { solo: true, when: { event: 'click'} },
                     hide: { when: { event: 'click'} },
                     style: {
                         background: qTipStyleBackground,
                         color: 'black',
                         border: { width: qTipBorderWidth, radius: qTipBorderRadius, color: qTipBorderColor },
                         title: { color: qTipTitleColor, background: qTipTitleBackground },
                         width: 300,
                         padding: qTipPadding,
                         textAlign: qTipTextAlign,
                         classes: { content: qTipContentClassName },
                         tip: true, // Give it a speech bubble tip with automatic corner detection
                         name: qTipStyleName
                     }
                 });
             });
 
         });
    </script>


popup.aspx page:
protected override void Page_Load(object sender, EventArgs e)
{
_EntityId = Request.QueryString["EntityId"];
lblEntityId.Text=_EntityId
}
Find all posts by this user
Quote this message in a reply
1st December, 18:03
Post: #2
RE: Dynamic contenct not working property in sortable
I'd need a live demo to help, sorry Sad

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
2nd December, 01:22
Post: #3
RE: Dynamic contenct not working property in sortable
(1st December 18:03)Craig Wrote:  I'd need a live demo to help, sorry Sad

Hi

I cannot give you direct access to the site. however, I just created a dumb down version and the code is attached. I cannot recreate the problem I am experiencing 100%, but the code i sent you gives the error: "theForm.__SCROLLPOSITIONX IS NULL or not an object" when I click on the grid view heading to sort after the qtip popup is shown.
Find all posts by this user
Quote this message in a reply
3rd December, 15:35
Post: #4
RE: Dynamic contenct not working property in sortable
I'm not seeing any attachments?

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
3rd December, 16:56
Post: #5
RE: Dynamic contenct not working property in sortable

.zip  Test.zip (Size: 3.73 KB / Downloads: 1)
(3rd December 15:35)Craig Wrote:  I'm not seeing any attachments?

Here you go. Thanks in advance for any advice.
Find all posts by this user
Quote this message in a reply
8th December, 18:45
Post: #6
RE: Dynamic contenct not working property in sortable
I don't have a web server capable of parsing this unfortunately. I'd need to see a live example hosted somewhere.

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] Dynamic Content From Page Element frogg3862 2 81 3rd May 17:12
Last Post: frogg3862
  [Solved] dynamic tipcreation alnikitich 1 443 8th December 18:29
Last Post: Craig
  Youtube demo not working on ffox 6 & 7 ivanmayes 2 694 11th October 17:14
Last Post: ivanmayes
  [Solved] Why is this not working - Link nested in tooltip needed 1 538 12th September 17:10
Last Post: Craig
  [Solved] error: missing}after property list captamirul@yahoo.com 8 1,311 10th September 15:22
Last Post: Craig
  [Solved] Dynamic content based off map area befeetback 1 1,035 25th August 18:23
Last Post: Craig
  how to get dynamic attri('id') before displaying on content davidkhan 3 612 23rd August 18:04
Last Post: Craig
  [Solved] Blanket Destroy not working migdalskiy 2 508 22nd August 22:44
Last Post: migdalskiy
  [Solved] Dynamic content not showing? dabd 3 800 21st August 18:17
Last Post: Craig
  Unfocus Not Working biglesliep 1 751 13th August 12:50
Last Post: Craig



User(s) browsing this thread: 1 Guest(s)