Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
171 views
Hi everybody,

I trying to find a way to bind my rad menu with a siteMapPath but I can't find a way to do it.

On my master page I hate a menu item

<

 

telerik:RadMenu ID="RadMenu1" runat="server" Skin="Vista">

that i dinamically populated non my code behind page in the following way

 

RadMenu1.DataTextField =

"Name";

 

RadMenu1.DataFieldID =

"Id";

 

RadMenu1.DataFieldParentID =

"ParentId";

 

RadMenu1.DataNavigateUrlField =

"NavigateURL";

 

RadMenu1.DataSource = GetMenu(Context.User.Identity.Name.ToString());

RadMenu1.DataBind();

Is there a way tu use the asp:SiteMapPath? Or is there a better way?

Thanx a lot for the Help

Raphael

PS: I still use the telerik 2008 Q1

 

Princy
Top achievements
Rank 2
 answered on 09 Oct 2009
4 answers
130 views
I'm have the RadWindowManager and a RadWindow object in my aspx page and I set the NaviagteUrl, OpenerElementId and OffsetElementId proeprties in the code-behind of my page for the RadWindow. Now on the first page load every this works correctly. Now if a postback occurs on the page, the RadWindow loses all those properties I set.

I've overcome this problem by setting those properties on every postback, but it becomes difficult to do on certain forms I use, since its not possible for me to do that.

So I just wanted to know if this is this a bug or something?

Thanks.
Georgi Tunev
Telerik team
 answered on 09 Oct 2009
3 answers
89 views
I am using the Rad MOSS Editor for my custom pages in a sharepoint application. The pages contain many textboxes apart from the Editor. I need to have a single spell checker on the page for all these textboxes and the Moss Editor. Is that possible? I tried using the RadSpell Control on the page but it did not work well for the Editor. Am i missing something here. Can i achieve this functionality? Please guide.


Thanks in Advance
Stanimir
Telerik team
 answered on 09 Oct 2009
1 answer
99 views
Hi Support Team,

I am using RadControls for ASP.Net AJAX (v. 2009.2.826.35).  I have a RadSplitter control that is nested inside of a RadMultiPage control used by a RadTabStrip.  The splitter controls has two panes - a left pane, that has a fixed width in pixels, and a right pane that I want to fill all of the remaining area.  I have tried to set the height and width of the right pane in two ways: 1) by setting both the height and width to 100%, and 2) using the "Free Size" method, where the height and width are not specified in the RadPane and the splitter calculates the pane size based on what space is remaining after allocating space to absolutely-sized or percent-sized panes.

Either method works fine in Firefox (v3.0.14) and Chrome (v3.0.195.25).  However, in both IE6 and IE8, I get a javascript error, and the content in the right pane only occupies a small fraction of the total available space.  If I specify the height and width in pixels in IE, instead of percent, it works fine.

The markup for the page, specifying the width and height by percent is listed below:

<body style="height:100%;margin:0px;width:100%;" > 
    <form id="Form1" runat="server" style="height:100%;margin:0px" > 
        <asp:ScriptManager ID="ScriptManager1" runat="server"/> 
         
        <div style="height:100%;margin:0px;width:100%;" > 
         
            <telerik:RadTabStrip ID="radTapStripMain" MultiPageID="radMultiPageMain" AutoPostBack="false" Width="100%" runat="server"> 
                <Tabs> 
                    <telerik:RadTab Value="tabAdmin" Text="Admin" PageViewID="pvAdmin" Visible="true" runat="server" /> 
                </Tabs> 
            </telerik:RadTabStrip> 
 
            <telerik:RadMultiPage id="radMultiPageMain" runat="server" Height="100%" Width="100%"> 
               <telerik:RadPageView  id="pvAdmin" runat="server" Visible="true" Height="100%" Width="100%"> 
                    <telerik:radsplitter id="splitterLinksIndex" orientation="Vertical" Width="100%" Height="100%" HeightOffset="30" runat="server" > 
                      <telerik:radpane id="LeftPane" Width="200" MinWidth="100" MaxWidth="500" runat="server"> 
                           <a href="http://www.telerik.com" target="<%= RightPane.ClientID %>">link</a> 
                      </telerik:radpane> 
                      <telerik:radsplitbar id="RadSplitBar1" collapsemode="Forward" runat="server"/> 
                      <telerik:radpane Scrolling="Y" id="RightPane" Width="100%" Height="100%" ContentUrl="http://www.microsoft.com" runat="server"></telerik:radpane> 
                    </telerik:radsplitter>      
                 </telerik:RadPageView >   
            </telerik:RadMultiPage> 
             
        </div> 
    </form> 
</body> 

If I look at the IFRAME that is generated by the page, it has a specified height and width in Firefox but not in IE:

 
Firefox 
<iframe id="RAD_SPLITTER_PANE_EXT_CONTENT_RightPane" frameborder="0" scrolling="auto" name="RightPane" src="http://www.microsoft.com" style="border: 0px none ; height: 825px; width: 1055px;"> 
 
IE6 
<IFRAME id=RAD_SPLITTER_PANE_EXT_CONTENT_RightPane style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" name=RightPane src="http://www.microsoft.com" frameBorder=0></IFRAME> 

The javascript error that gets thrown in IE occurs in the line marked with asteriks in the following javascript function:
function(g,f) 
 { 
    if(f<=0||f==""){ 
        g.style.width="" 
    }    
    else 
    { 
**      g.style.width=f+"px"; 
        var h=g.offsetWidth-f; 
        var e=f-h; 
        if(e>0) 
        { 
            g.style.width=e+"px" 
        } 
        else 
        { 
            g.style.width="" 
        } 
    } 
  } 

The error states that the variable "f" is NaN.  I get the same error if I specify the height and width by percent or by the "free size" method.

As an aside, if I remove the splitter from the RadMultiPage and RadTabStrip and put it by itself on the page, the IE javascript error disappears and I can set the width and height by percent with no problems.

Thank you for your assistance.  Please let me know if you need any further information.

Paul
Telerik team
 answered on 09 Oct 2009
1 answer
482 views
Hi,
I have below requirement
on page load I have set the Maxdate of the datepicker to today.. and I have some special days which are added when page load itself.
that was fine..
when i click on one button i need to do some changes to date picker at client side..
The main inportant thing is the Selected date must be today + 10 days ..which i am unable to with below code
        var datpick1 = <%= datpick1.ClientID %>;  
        var datpick2 = <%= datpick2.ClientID %>;  
        var calendar2 = <%= datpick2.ClientID %>.GetCalendar();  
        calendar2.SpecialDays.Clear();  
        calendar2.SetMaxDate(datpick1.GetMaxDate());//datpick1.GetMaxDate() is 10 days greater than datpick2 max date  
        var da = new Date(datpick1.GetMaxDate());  
        da.setDate(da.getDate());  
        calendar2.SetDate(da); 

1. Clear the special Days (working fine)
2.Set the MaxDate() which also seems to be working fine
3.Set the date using SetDate() which seems to be not working (with the max date greater than the max date defined on page load)
if i give SetDate as less than or equal to the Pageload the Maxdate it is working fine.

Please help me to set the date at client side ..
Please let me know if i am missing any thingelse

Thanks
-Krishna
Veli
Telerik team
 answered on 09 Oct 2009
2 answers
225 views
hi!

   I want store and retrive textfile or Imagefile into sql database using radupload control...........can  any one bring the sample code to me?

thank you....
       
Priya Priya
Top achievements
Rank 1
 answered on 09 Oct 2009
1 answer
73 views
Hi,
I have set enableviewstate to false on my grid but now it's not fireing the delete command anymore.
What do I need to do if I want to continue having viewstate off?

/Mattias
Mira
Telerik team
 answered on 09 Oct 2009
2 answers
214 views

Hello,

I have a problem using custom skinning in RadEditor.
I have tried the solution mentioned in the installation manual delivered with our version (2008.3 1314)
Appearance > Create New Skin
Appearance > DialogsCssFile Property

The editor itself takes the custom skin but the context menu en the <Hyperlink manager> control(s) doesn't.

When I don't use custom skinning the controls are beeing loaded by the Telerik.Web.UI.DialogHandler.aspx but then i have the problem that the resources are not beeing loaded, so i do have the controls but no text.
All the proper .resx files are in the App_globalResources folder.

I have attached 2 screens. The first is an example of the directory structure and the second attachement shows how the linkManager is beeing loaded.

thx.

Gerco

 

Rumen
Telerik team
 answered on 09 Oct 2009
0 answers
98 views

hi!
     I upload a file to database using below code...the below code is performed well in aspx page...but I want this in usercontrol that is ascx page...when use this code in ascx control , if i press upload button, can not get uploaded file in for loop(below bolded line)..so , for loop inner statement does not executed..So i cannot insert Image file into database..can anyone help me? thanks


Radupload control

 

 

<asp:TextBox ID="txtName" runat="server"></asp:TextBox>

 

 

<telerik:RadUpload ID="FileUpload1" Runat="server"/><br/>

 

 

<br />

 

 

<asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Upload" /><br />

 

 

<br />

 

 

<asp:Label ID="lblMessage" runat="server"></asp:Label><br />

 

 

 

btnupload click event
protected
void btnUpload_Click(object sender, EventArgs e)

 

{

 

foreach (UploadedFile file in FileUpload1.UploadedFiles)

 

{

 

byte[] bytes = new byte[file.InputStream.Length];

 

file.InputStream.Read(bytes, 0, (

int)(file.InputStream.Length));

 

 

string strImageName = txtName.Text.ToString();

 

 

 

// Create SQL Connection

 

 

SqlConnection con = new SqlConnection();

 

con.ConnectionString =

ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

 

 

// Create SQL Command

 

 

SqlCommand cmd = new SqlCommand();

 

cmd.CommandText =

"Ins_Files";

 

cmd.CommandType =

CommandType.StoredProcedure;

 

cmd.Connection = con;

 

SqlParameter ImageName = new SqlParameter("@ImageName", SqlDbType.VarChar, 50);

 

ImageName.Value = strImageName.ToString();

cmd.Parameters.Add(ImageName);

 

SqlParameter UploadedImage = new SqlParameter("@Image", SqlDbType.Image, bytes.Length);

 

UploadedImage.Value = bytes;

cmd.Parameters.Add(UploadedImage);

con.Open();

 

int result = cmd.ExecuteNonQuery();

 

con.Close();

 

if (result > 0)

 

lblMessage.Text =

"File Uploaded";

 

 

}

Priya Priya
Top achievements
Rank 1
 asked on 09 Oct 2009
1 answer
137 views
Hi,

I am using asp.net gridview with some imagebuttons. On click of those imagebuttons, i am opening greybox popups.
Now when user closes the greybox, it reloads the main page, with the help of one hidden button click, "   __doPostBack('ctl00$cphMainContent$btnPostBck',''); ".

I want to display the Loading image over the grid, when it reloads the page. Here is a code I am using.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Panel1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnPostBck" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Width="100%" Height="100%" 
        BorderWidth="1px"> 
        <table id="Table1" cellspacing="0" cellpadding="0" border="0" align="center" class="MainTable"> 
            <tr> 
                <td valign="top"> 
                    <table id="Table3" cellspacing="0" cellpadding="2" border="0" width="100%" align="center" 
                        class="InnerTable"> 
                        <tr> 
                            <td colspan="2"> 
                                <telerik:RadXmlHttpPanel ID="XmlHttpPanelGrid" runat="server" OnServiceRequest="XmlHttpPanel_ServiceRequest"> 
                                    <table width="100%"> 
                                        <tr> 
                                            <td> 
                                                <asp:GridView ID="dtBook" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="False" 
                                                    BorderStyle="solid" CellPadding="4" DataKeyNames="BookID,writerid,ExerciseVideos" 
                                                    HeaderStyle-CssClass="pagelabel" HorizontalAlign="Left" PageSize="30" RowStyle-Wrap="true" 
                                                    Width="100%"> 
                                                    <HeaderStyle CssClass="pagelabel" /> 
                                                    <RowStyle CssClass="pagelabel" /> 
                                                    <AlternatingRowStyle CssClass="AltPageLabel" /> 
                                                    <SelectedRowStyle BackColor="#FFFFC0" /> 
                                                    <EmptyDataTemplate> 
                                                        <asp:Label ID="lblNoData" runat="server" Style="text-align: center;" ForeColor="red" 
                                                            Text="<%$ Resources:WebResource , Logbook_Norecord%>"></asp:Label></EmptyDataTemplate> 
                                                    <PagerStyle Font-Names="Verdana" HorizontalAlign="Center"></PagerStyle> 
                                                    <Columns> 
                                                        <asp:TemplateField HeaderText="<%$ Resources:WebResource , BookRead_Date%>" SortExpression="Bookdate"> 
                                                            <ItemStyle CssClass="pagelabel" Width="10%" /> 
                                                            <HeaderStyle HorizontalAlign="Left" Width="10%" /> 
                                                            <ItemTemplate> 
                                                                <asp:Label ID="lblDate" runat="server"></asp:Label><br /> 
                                                                <asp:Label ID="lblFor" runat="server" Text="<%$ Resources:WebResource , BookRead_For%>"></asp:Label> 
                                                                <asp:Label ID="lblType" runat="server"></asp:Label> 
                                                            </ItemTemplate> 
                                                        </asp:TemplateField> 
                                                        <asp:TemplateField> 
                                                            <ItemStyle CssClass="pagelabel" Width="10%" /> 
                                                            <HeaderStyle HorizontalAlign="Left" Width="10%" /> 
                                                            <HeaderTemplate> 
                                                                <asp:Label ID="Label2" runat="server" Text="<%$ Resources:WebResource , BookRead_Comments %>"></asp:Label> 
                                                            </HeaderTemplate> 
                                                            <ItemTemplate> 
                                                                <asp:HiddenField ID="hidId" runat="server" Value='<%# Eval("Bookid") %>' /> 
                                                                <table border="0" align="center" width="100%"> 
                                                                    <tr> 
                                                                        <td> 
                                                                            &nbsp; 
                                                                            <asp:ImageButton ID="lnkAdd" runat="server" ImageUrl="~/Images/comment1.png" CommandArgument='<%Eval("Bookid") %>' 
                                                                                CommandName="UploadVideo" ToolTip="<%$ Resources:WebResource , BookRead_Comments_Add %>" /> 
                                                                        </td> 
                                                                        <td> 
                                                                            &nbsp; 
                                                                            <asp:ImageButton ID="lnkView" runat="server" ImageUrl="~/Images/comment3.png" ToolTip="<%$ Resources:WebResource , BookRead_Comments_Read %>"> 
                                                                            </asp:ImageButton> 
                                                                        </td> 
                                                                    </tr> 
                                                                    <tr style="display: none;"> 
                                                                        <td> 
                                                                            &nbsp;</td> 
                                                                        <td align="center"> 
                                                                            <asp:Label ID="lblCommentCount" runat="server" ForeColor="green"></asp:Label> 
                                                                        </td> 
                                                                    </tr> 
                                                                </table> 
                                                            </ItemTemplate> 
                                                        </asp:TemplateField> 
                                                    </Columns> 
                                                    <PagerStyle Font-Names="Verdana" HorizontalAlign="Center"></PagerStyle> 
                                                </asp:GridView> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </telerik:RadXmlHttpPanel> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
        </table> 
        <asp:Button ID="btnPostBck" runat="server" Text="Postback" CausesValidation="false" 
            Visible="false" /> 
    </asp:Panel> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="center" 
        EnableSkinTransparency="false" Height="75px" Width="75px" Transparency="25"> 
        <asp:Image ID="Image1" runat="server" ImageUrl="../Images/Loading/loading-spiral.gif"> 
        </asp:Image> 
        <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            alt="Loading..." style="border: 0;" /> 
    </telerik:RadAjaxLoadingPanel> 



Protected Sub btnPostBck_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPostBck.Click      
        Response.Redirect("bookread.aspx", False) 
    End Sub 


But this is not working as per my requirement. Where I am doing wrong??



Protected Sub btnPostBck_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPostBck.Click      
        Response.Redirect("bookread.aspx", False) 
    End Sub 




Pavlina
Telerik team
 answered on 09 Oct 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?