Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
387 views
Hi,

I need to refresh a RadTreeView inside of a user control from client side. Is there any way to rebind the treeview in javascript?

Thanks,
Frank
Frank Fu
Top achievements
Rank 1
 answered on 21 Dec 2009
1 answer
90 views
Hi Telerik,
i saw your example of using a user control in RadGrid to mmake a custom edit mode and I have some wuestions about it:
1. in the user control, i want to have access in the code behind to the recieved data item. how can i do that?
2. The reason i ask it is because i didn't manage to perform more complicated data binding in the user control. I wanted to bind a dropdown list to one of the dataItem fields. this is the full dataItem that is returened by the datasource in the main grid:
 public DataView Fill() 
        { 
            //DataView dv = new DataView(); 
 
            //dv.Table.DataSet.Tables.Add("tbl999"); 
            DataTable dt = new DataTable("tbl999"); 
             
            dt.Columns.Add(new DataColumn("Title")); 
            dt.Columns.Add(new DataColumn("isCombo")); 
            dt.Columns.Add(new DataColumn("options")); 
 
 
             
            for (int i = 0; i < 10; i++) 
            { 
                DataTable dtInner = new DataTable("dtInner "+i); 
 
                dtInner.Columns.Add(new DataColumn("optionValue")); 
                dtInner.Columns.Add(new DataColumn("optionTitle")); 
                for(int j=0;j<i;j++){ 
                    dtInner.Rows.Add(j,"option " + j); 
                } 
                DataView dvInner = dtInner.DefaultView; 
                dt.Rows.Add("Question number " + i, Convert.ToBoolean(i % 2), dvInner); 
            } 
            DataView dv = dt.DefaultView; 
            return dv; 
        } 
and in my user control, i tried to Bind / Eval it in the ASCX side:
  <td style="width: 50%"> 
                            <asp:Label ID="lblOptionTitle" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>'></asp:Label> 
                        </td> 
             <asp:DropDownList runat="server" DataSource='<%# DataBinder.Eval(Container, "DataItem.options") %>' OnDataBinding="dropdownlist2_DataBound" 
                                ID="dropdownlist2" AppendDataBoundItems="true" DataTextField="optionTitle" DataValueField="optionValue" DataMember="options"> 
                            </asp:DropDownList>           <td style="width: 50%"> 
 </td> 

but the second Eval doesn't work.

3. To make things more neat, is it possible to user DetailsView in the edited user control and use it's events? Can you please demonstrate how to bind it to the returned data item? do you have a better recommendation for this use?

Thanks,
Hadar
Pavlina
Telerik team
 answered on 21 Dec 2009
3 answers
216 views
Hello,

I have a RadGrid with a UserControl for the Edit command.  That UC contains both a RadToolbar and a RadEditor.  I want to verify client-side that the Editor contains some text when the user clicks a toolbar button.  I've subscribed to the OnClientButtonClicking event for the toolbar.  However, when the UC opens, I get a JavaScript error that 'OnClientButtonClicking' is undefined.

Here is the declaration for the OnClientButtonClicking handler:

<script type="text/javascript">  
function OnClientButtonClicking(sender, args)  
{  
    if (args.get_item().get_value() == "save") {  
        var editor = $find("<%=reComments.ClientID%>");  
        if (editor.get_text() == "") {  
            window.alert("You must enter Comments in order to have your request reviewed!");  
            args.set_cancel(true);  
        }  
    }  
}  
</script> 

And here are the declarations for the RadEditor and RadToolbar:

<telerik:radeditor  
    Skin="WebBlue" 
    EditModes="Design" 
    Width="80%" 
    Height="250px" 
    StripFormattingOnPaste="All" 
    ID="reComments" 
    runat="server" 
    toolsfile="~/ToolsFile.xml" 
    StripFormattingOptions="All">  
    <CssFiles><telerik:EditorCssFile Value="~/css/EditorContentArea.css" /></CssFiles>  
    <Content> 
    </Content> 
</telerik:radeditor> 
 
<telerik:radtoolbar OnClientButtonClicking="OnClientButtonClicking" Skin="Vista" Font-Names="Verdana" AutoPostBack="true" runat="server" id="Radtoolbar2">  
    <items> 
        <telerik:RadToolBarButton CommandArgument="save" CommandName="save" Enabled="false" ForeColor="White" Text="Submit Request" ImageUrl="../../images/save.gif" runat="server" ToolTip="Click here to submit your request to your supervisor." /> 
        <telerik:RadToolBarButton IsSeparator="true"></telerik:RadToolBarButton> 
        <telerik:RadToolBarButton CommandArgument="cancel" ForeColor="White" Text="Cancel & Return to Competency List" ImageUrl="../../images/back.gif" runat="server" ToolTip="Click here to cancel any changes made and return to the list of competencies." CommandName="Cancel" /> 
    </items> 
</telerik:radtoolbar> 

Again, the UC is opened for the Edit command of a RadGrid.

Thanks in advance for your help!

Jeff
Veselin Vasilev
Telerik team
 answered on 21 Dec 2009
1 answer
251 views
I'm having a hell of a time with this... thought it should be fairly straight foward, but I'm at a loss. Are there any good examples floating around out there that I can reference, a preliminary search of the forums, and a good look at the help files have yeilded very little in the way of an answer.

What I would like to acheive is a method for iterating through all the cells in my grid (which uses item templates) and determining when certain cells need adjusted text displayed. This includes replacement of string.Empty as well as shortening long strings and adding "..." to keep the grid formatted nicely. However I would rather not have to use findControl(), I would like to access each control via it's index within the itemtemplate. Is this at all possible?
Dimo
Telerik team
 answered on 21 Dec 2009
4 answers
247 views
Dear all,

I have a user-control that has a RadTabStrip with 2 Tabs on it, with two tabpages and a RadMultiPage with 2 PageViews.
everything is okay.

I have a button on the second pageview that opens a radwindow, the first time it opens the control goes back to the correct pageview (the second one) but If the click again on the button the second tabs selected but the first pageview is visible !!

Why is this happens ...

Best regards
Waleed
Schlurk
Top achievements
Rank 2
 answered on 21 Dec 2009
5 answers
183 views
Morning all,

I just follow the example ( http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx) using DialogOpener, and I have been asked to disable 'Delete' from context menu. I can not find a way to access to default RadContextMenu. Does anybody know how to do this?  BTW: I am working on RadControls_for_ASP.NET_AJAX_2009_1_402.

Q2: I use subversion for version control, so that I can see the .svn hidden folder after setting up dialogParams.ViewPaths. Is there any way to not show such hidden folders except implementing customer FileSystemContentProvider.

Q3: How can I show image thumbnails after loading image manager with my current version (have no chance to upgrade to higher version recently)

Q4: When trying to delete one .jpg file, it has been removed from image treeview, but still been shown in image previewer, is that possible to clear image previewer when deleting files?

Many thanks in advance.

Cheers,
Rachael
Rumen
Telerik team
 answered on 21 Dec 2009
6 answers
446 views
I have a web project that requires authentication that is using radspell.  However, I do have registration pages (where users have not yet been authenticated) that must use radspell.  What web.config entries are necessary to grant permissions to anon users?  Here is what is I have defined in web.config currently:

<location path="Telerik.Web.UI.WebResource.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="Users/Telerik.Web.UI.WebResource.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="Telerik.Web.UI.DialogHandler.aspx">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="App_Data/RadSpell/en-US.tdf">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>

I get this javascript error when accessing spell from a registration page:

Error: [Exception... "'Sys.ArgumentException: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data' when calling method: [nsIOnReadyStateChangeHandler::handleEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "<unknown>"  data: no]

Any suggestions?
Luiz Pires
Top achievements
Rank 2
 answered on 21 Dec 2009
0 answers
86 views
Hi All,

Here i am using RAD ComboBox and also using property of "AllowCustomTest=True" when i use this property when i am clicking on any button in that pagte without selecting any value in the ComboBox then it is first it is checking into the "cmbGroup_SelectedIndexChanged1" property, here i need not want that property to be fired when i click on any button without selecting dropdown but the selected value in the drop down should be updated.

Can any one help me out.

Thanks in Advance.

ratan mishra
Top achievements
Rank 1
 asked on 21 Dec 2009
4 answers
136 views

After trying it for awhile...and i can't seem to figure out 2 things:
(programaticly in vb.net)
1) How do you manipulate the style (font, color,etc.) of Series Item Labels?
2) In an Area-type chart, how do you alter the color gradient of a given series? Like how would you make it a solid color or keep the gradient but make it les severe?

Thanks.

Below is the code I'm using to generate the chart:

Dim sqlDataSource As New SqlDataSource()  
        sqlDataSource.ID = "myDataSource" 
 
 
        sqlDataSource.ConnectionString = "Data Source=xxxxxxxxxxxxx" 
          
        sqlDataSource.SelectCommandType = SqlDataSourceCommandType.StoredProcedure  
        sqlDataSource.SelectCommand = "sla_iap" 
        sqlDataSource.SelectParameters.Add("Param1", p1)  
        sqlDataSource.SelectParameters.Add("Param2", p2)  
        sqlDataSource.SelectParameters.Add("Param3", p3)  
 
 
        Me.Page.Controls.Add(sqlDataSource)  
 
        RadChart1.Skin = "Colorful" 
        RadChart1.Appearance.FillStyle.MainColor() = Drawing.Color.Cornsilk  
        RadChart1.Appearance.FillStyle.SecondColor() = Drawing.Color.Brown  
        RadChart1.PlotArea.Appearance.Border.Width = "1" 
        RadChart1.ChartTitle.Appearance.Border.Visible = False 
        RadChart1.ChartTitle.Appearance.FillStyle.MainColor = Drawing.Color.Cornsilk  
        RadChart1.ChartTitle.TextBlock.Text = "Maintenance Met / Missed Trending Report For All Incidents" 
 
        RadChart1.DefaultType = Telerik.Charting.ChartSeriesType.StackedSplineArea100  
        RadChart1.AutoLayout = True 
        RadChart1.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = Drawing.Color.Black  
        RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Drawing.Color.Black  
        RadChart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = "90" 
        RadChart1.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.ShortDate  
        RadChart1.PlotArea.XAxis.DataLabelsColumn = "WeekRestored" 
        RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font = New System.Drawing.Font("Arial", 14, Drawing.FontStyle.Regular)  
        RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Color = Drawing.Color.CadetBlue  
      
        RadChart1.DataSourceID = "myDataSource" 
        RadChart1.DataBind() 
Dan Schmecker
Top achievements
Rank 1
 answered on 21 Dec 2009
1 answer
166 views
Hi there,

I have several custom Link Managers that I use to link to various internal pages - microsites, unsubscribe pages, surveys etc., as well as ordinary links. These managers return a link in the format <a href="" customtype="typename" customid="1234">content</a>. When I insert this into the editor using pasteHtml in IE 7 and 8, nothing is pasted in. If I remove the empty href attribute, then the link will be pasted in and in other browsers this has no consequences so this is the method I am using. However, again in IE 7 and 8, the links do not get styled as links without an href, so unless I set a class directly on the link, it just looks like plain text, which is confusing for users.

If I load an editor with a link formatted as above with the empty href attribute, it behaves as it should, so the editor is happy enough with the custom link. It just seems that the pasteHtml function has problems with it for IE? Is there anything I can do about this?

I'm using radEditor AJAX 2009, Q3

Thanks,
Nick
Rumen
Telerik team
 answered on 21 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?