Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPINeed help settingg up DNN Label edit control C#Need help settingg up DNN Label edit control C#
Previous
 
Next
New Post
9/14/2006 2:41 AM
 

I'm trying to setup a DNN Label edit control and I cannot seem to get the callback functionality worked out.  I've read through the ClientCallback document and it didn't lead me to the right solution.  I've written a SaveTheLabel class and then added the OnUpdateLabel property with SaveTheLabel as the value to the webcontrol on my ascx page. After changing the value of the label on the page It won't update.

From the documentation that i've read on the ClientCallback it says that I need to add the IClientCallbackEventHanger interface declaration on my page but I can't find it.  Is this nessecary for it to work properly?  Additionally I haven't registered the event with the page but I'm not sure what to register.  A working example would be a great help.

I'm also trying to get this to work within a Repeater object.  Here is the page i'm working on http://beta.wsysa.com/Programs/Competitive/League/WSPL/GameResults/WSPL/Division1/Boys/U14/tabid/745/Default.aspx as you can see I'm trying to use it to update scores on our website but until I can figure out how the clientcallback functions work i'm at a loss. 

Here are a few questiosn I have after reading the documentation. It seems the documentation i read was written prior to the dnnlabeledit controls existance.

  1. Do i need to impliment a client call back interface in my codebehind file for my module?
  2. Is there an easy method to pass a row identifier to my ClientCallback in the case where i'm using it within a repeater?
  3. How would i register this event in my code behind?.
  4. Is it possible to enable the Save / Cancel popup in the DNNEditLabel Control rather than relying on the user clicking off the control?
  5.  Finally I want to expand the area that a user can click within (make the height and width fill the table cell) so that it is easy to identify and doesn't require alot of text, how can I accomplish this?

Thanks in advance.

 
New Post
9/14/2006 9:56 AM
 

From the looks of it you are simply trying to get the labeledit control to work and you are not making your own custom callbacks. correct? 

Assuming the above statement is true I will attempt to answer your questions.

1.  No, the control exposes an event (UpdateLabel) that you simply need to write a handler for.

2.  I have not tried the control in a repeater, but don't anticipate it to work yet.  I say this because the event lifecycle currently stops for a callback at the page init.   I am assuming your grid is not bound until later.  Note: The callbackFail method does not contain any indication of an error.  It should have an alert in it to notify you that your control was not found.  To see this open up the dnn.controls.dnnlabeledit.js file and update the callbackFail function to this.

callBackFail: function (result, ctx)

{

alert(result);

ctx.cancelEdit();

},

I say that it will not work yet, because I am in the process of enhancing the Callback capabilities to allow it to continue through the page's lifecycle.  I blogged about how this is being incorperated into the new DNNTabStrip control here.  I see no reason as to why this could not be added to the labeledit control.

To answer your question on figuring out the row index, the quick answer is no.  However, depending on how you register your event (see 3) or how you can interpret the ID assigned to the control it may be possible.

3.  This of course is tricky part, for what needs to happen is you need to associate an event handler to each instance of the control. 

4.  This is something I am currently working on.  There will be two ways to handle this.  The first is to offer a BeforeSaveFunction that you can write custom code in that will return true or false determining whether or not you wish to cancel the update.  I envision a dialog box here.  The second is to offer a toolbar.  I have a prototype shown here.

5.  Should be possible with CSS

To summarize, being able to use the control inside a repeater is really not possible without some major hacks right now.  However, in the near future it should be possible.  I most likely will create a sample to demonstrate this capability.

 


 
New Post
4/4/2007 4:54 PM
 

Jon,

Hi. The detail on this post has helped with an implementation I am working on. It sounds like I still probably can't do what I want with the control but I thought I would ask. Basically I can get the control to work fine until I put it in another user control and then I get the same problem with '404 Control not Found'. I am assuming this is related to the page lifecycle you mention? The javascript already included the altert which is helpful to see whats goign on but just curious if you know of a way to get this working in a user control?

-Chad

 

 
New Post
4/12/2007 1:02 PM
 

Are you dynamically loading the control, or simply placing in a usercontrol?  

The control should work fine in usercontrols (they are already embedded in quite a few inside DNN anyways).


 
New Post
4/12/2007 1:40 PM
 

Dynamically adding the control to table cells for individual table rows. I need it to be dynamic and not single instances. I guess I could try and place the control in its own user control and then try adding the user control dynamically? Actually I think I tested that too and had the same issue but I might go back and review. I had no problems if I added it to the table dynamically, only once I started adding multiple instances.

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPINeed help settingg up DNN Label edit control C#Need help settingg up DNN Label edit control C#


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out