This is a migrated thread and some comments may be shown as answers.

set_value() does not work properly in 2009-311?

4 Answers 61 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 15 Mar 2009, 01:15 AM
I am trying to use RadToolBar together with radprompt() as described in your KB article

http://www.telerik.com/support/kb/aspnet-ajax/window/using-radprompt-and-radconfirm-with-telerik-navigational-controls.aspx

Everything works as expected - I get the prompt dialog and I enter value, but inside code behind e.Item.Value is always empty.

I traced javascript with FireBug and I can see that "lastClickedItem.set_value(args)" gets called with "args" having valid string value. But when few moments later I stop at the breakpoint inside "protected void RadToolBar1_ButtonClick" - e.Item.Value = empty string.

Could you please verify that this KB is still valid for build 2009-311 and suggest a workaround or alternative solution?

Thank you

Alexander



4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 17 Mar 2009, 12:03 PM
Hello Alex,

Thank you for contacting us.

I tested the project from the kb article and it worked without a problem.  Please make sure that you're using toolbar.trackChanges() and toolbar.commitChanges() when setting the value. If this doesn't help, send us a simple working example which we can debug. Thanks


Best wishes,
Yana
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alex
Top achievements
Rank 1
answered on 18 Mar 2009, 02:56 AM
Thank you for looking into this one!

Here is a test project that I made that shows the problem.

There are two main differences that this project has from "clean" sample from blog article

- It uses master pages
- RadToolBar is placed on top of the form view

Here is a full project (without Rad dll)

Run WebForm1.aspx to see problem

http://test20090111.s3.amazonaws.com/RadConfirmDemo.zip

I really appreciate your help


Alexander
0
Yana
Telerik team
answered on 18 Mar 2009, 04:06 PM
Hi Alex,

Thank you for preparing the project.

The problem is that the FormView is databinded on every postback. To avoid this you should bind it in Page_Load like this:

if (!IsPostBack)  
{  
    var data = new List<string>();  
    data.Add("one item");  
    cameraView.DataSource = data;  
    cameraView.DataBind();  

Now the corrected value is returned.

Regards,
Yana
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alex
Top achievements
Rank 1
answered on 20 Mar 2009, 02:48 AM
Thank you, that fixed the problem.
Tags
ToolBar
Asked by
Alex
Top achievements
Rank 1
Answers by
Yana
Telerik team
Alex
Top achievements
Rank 1
Share this question
or