Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
199 views
How can we make this article: http://www.telerik.com/help/aspnet-ajax/ajxshowloadingpanelnexttoajaxinitiator.html work when using master pages. I placed the code in the linked document in my master page. I surrounded the javascript with radcodeblock markup and changed the 1st line of the javascript to get the client id since i would be calling from a page using a masterpage.

var divElementStyle = document.getElementById('<%= RadAjaxLoadingPanel1.ClientID %>').style;

divElementStyle is populated correctly and i can see all of the styles applied to the loading panel. 
When the function gets to:

 divElementStyle.left = eventArgs.get_eventTargetElement().offsetLeft + "px";

the get_eventTargetElement failes with the exception "Object Required". I searched the support site for get_eventTargetElement and could not find any additional information. Can anyone provide a workaround?  
KevinMc
Top achievements
Rank 1
 answered on 31 Oct 2008
6 answers
181 views
i want to be able to use the itemcommand  onclick but i can't do it. here is the scenario. i have a grid declared like this in the default.aspx

<

telerik:RadGrid ID="RadGrid1" runat="server" Width="150"

 

 

 

PageSize="20" AllowSorting="True" AllowMultiRowSelection="False" Skin="Default"

 

 

 

AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="false" GridLines="none" OnItemCommand="RadGrid1_ItemCommand">

 

 

 

</telerik:RadGrid>

then in the default.aspx.vb i have a pageload to load the data and column.

 

 

 

 

RadGrid1.DataSource = "sqlsource1"

 

 

Dim boundcolumn As GridBoundColumn

 

boundcolumn =

 

New GridBoundColumn

 

boundcolumn.DataField =

 

"Department"

 

 

 

 

boundcolumn.HeaderText =

 

"Department"

 

 

 

 

RadGrid1.MasterTableView.Columns.Add(boundcolumn)

RadGrid1.DataBind()

now i want to be able to detect a click on the row click and then open something with the column value like the Auto postback on row click example that you guys have on the web. i could detect the click but it keeps giving me error of "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
 
here is my onclick itemcommand code

 

Protected

Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand

 

Thread.Sleep(2000)

 

If (e.CommandName = "RowClick" AndAlso TypeOf e.Item Is GridDataItem) Then

 

 

 

e.Item.Selected =

True

 

 

 

 

Dim text As String = "Selected mail ID is: " & e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("MailID")

 

RadGrid1.Controls.Add(

New LiteralControl(String.Format("<span style='color:red'>{0}</span>", text)))

 

 

End If

 

 

 

 

End Sub

 

 

 what did i do wrong here? could you help me. thank you very much

 

 

appdev
Top achievements
Rank 1
 answered on 31 Oct 2008
2 answers
174 views
Hi

I am recieving a stackoverflow vs debug error when i try to execute the following code

            RadPanelItem it = new RadPanelItem("Root1");  
            HtmlGenericControl control = new HtmlGenericControl("div");  
            control.InnerHtml = "<table style='width:660px'><tr>"+thread.subject+"<td></td>"+GetDateDiference(thread.lastpostDate)+"<td></td></tr><tr><td>Posted by: "+thread.CMSMember.username+"</td><td>Replies:"+thread.CMSForumMessages.Count+"</td></tr><tr><td colspan='2'>"+GetThreadReplyLinkCommand()+"</td></tr></table>";  
            it.Controls.Add(it);                      
            threadsBar.Items.Add(it); 



what am i doing wrong ?
Stuart
Top achievements
Rank 1
 answered on 31 Oct 2008
2 answers
63 views
When we have page size of 40 in Rad Grid, the grid shows as if it is populated with records but it take time to populate (has an issue with performance)
vikram
Top achievements
Rank 1
 answered on 31 Oct 2008
1 answer
107 views

Hi All

I Create Rad Window by Vb.net language on behind code at Page1
this code in the button1 for create rad window
Dim RW As New RadWindow
RW.ID =
"Rad2"
RW.ShowContentDuringLoad = True
RW.Width = 600
RW.Height = 500
RW.NavigateUrl = (
"TestPage2.aspx")
RW.VisibleTitlebar =
False
RW.VisibleStatusbar = False
RW.Modal = True
Me.RadWindowManager1.Windows.Clear()
Me.RadWindowManager1.Windows.Add(RW)
Me.RadWindowManager1.Windows(0).VisibleOnPageLoad = True

 

 

and then On Rad Window will open Page2. On Page2 has button2
i would like to button2 do close rad window pop up and redirect Page1 to New Page.
how can i coding it by vb.net language only or rad window is not support...

Thank a lot

Princy
Top achievements
Rank 2
 answered on 31 Oct 2008
3 answers
158 views
Hey all,

Anyone else find it really strange how RadDock's behave when ti comes time for the Post-Back?  I followed the example with savelayout, loadlayout to/from the session but after a day of work-around's had to give up... the code was becoming spahgetti and confusing even to me.

I am wondering how everyone else handles post-back's and dock states?  I am going to modify my button to do an onclick, then record state with javascript and re-create state server-side in my code-behind. 

One serious problem I noticed is that when I start my page, all my RadDocks are in 1 zone to the right, they then are drug onto various zones on left to layout a 'page'.  When you save state, all of the zones still think they are in the zone on the right. 

Anyone have any advice or clear examples of how to use RadDocks?

Thanks,
Rob
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 31 Oct 2008
1 answer
187 views
Hello,

I would like to reset the calendar of the RadCalendar to a different month after page postback. Is it possible to do? By default the RadCalendar reset the Calendar to the current calendar month.

I tried setting the CurrentViewBeginDate and CurrentViewEndDate properties. But it didn't work and i always see the RadCalendar reset to current calendar month.

RadCalendar1.CalendarView.CurrentViewBeginDate = (

DateTime)ViewState["RadCStartDate"];

 

 

if(ViewState["RadCEndDate"] != null)

 

RadCalendar1.CalendarView.CurrentViewEndDate = (

DateTime)ViewState["RadCEndDate"];

Any feedback will be appreciated.

Thanks
Padma

 

Shinu
Top achievements
Rank 2
 answered on 31 Oct 2008
1 answer
99 views
Hello - I have a RadGrid with a GridTemplateColumn, as my code shows below.  In this column is a ComboBox, which I want to give users the choice to either choose an existing item or type in a new item.  This works if they choose an existing item, but if they type in a new item, when it goes to insert the new row, it loses the value of the custom text.  You can see where I am testing it below.  What am I missing?

<

 

telerik:GridTemplateColumn UniqueName="CompanyName" HeaderText="Company Name" DataField="CompanyName"> 
    
<ItemTemplate
            
<asp:Label ID="lblVendorID" runat="server" Text='<%# Eval("CompanyName")%>'></asp:Label
    
</ItemTemplate>
    
<EditItemTemplate
        
<telerik:RadComboBox ID="ddlCompanyName" runat="server" DataTextField="CompanyName" DataValueField="CompanyName" MarkFirstMatch="true" SelectedValue='<%# Bind("CompanyName") %>'  DataSourceID="SDSVendorCompany" AppendDataBoundItems="true" AllowCustomText="true"> 
                <Items><telerik:RadComboBoxItem Text="- Select One -" Value="" /></Items>     
        <
/telerik:RadComboBox
    
</EditItemTemplate>
    
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" /> </telerik:GridTemplateColumn>

I"m testing it here, and if I type in a new value, the value of test is always 'Nothing'.  If I choose an existing value, it works great.

Protected
Sub SDSVendors_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles SDSVendors.Inserting

 

 

 

 

Dim test As String = e.Command.Parameters("@CompanyName").Value

 

 E

nd Sub  

 

 

 

 

 

Yavor
Telerik team
 answered on 31 Oct 2008
1 answer
70 views
Hi

Im using a DateTimePicker control and want to set the font on
the raddateinputbox - ive tried the "Calender stylesheet" and
the "Input stylesheet" but I cant find a class for this ?

regards Erik 
Missing User
 answered on 31 Oct 2008
1 answer
79 views

Hello,
I have a telerik radgrid with two item templates. Categories are appeared at the left item template and related categories at the right. I would like every time i choose one item at the left side , only one item (one row) to be appeared and not all. Thank you very much.

This is the aspx code:

 

<

telerik:RadGrid ID="cr" runat="server" AutoGenerateColumns="false" Skin="Vista" EnableViewState="false">

 

 

 

 

<MasterTableView>

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="">

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:HyperLink runat="server" Text='<%# Eval("sDescr") %>' NavigateUrl='<%# String.Format("CategoryRelations2.aspx?fromCategoryID={0}", Eval("lRow_Id")) %>'></asp:HyperLink>

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="">

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Repeater ID="RelatedCategories" runat="server" DataSource="<%# GetRelatedCategories(Container.DataItem as Category) %>">

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:HyperLink runat="server" Text='<%# Eval("sDescr") %>' NavigateUrl='<%# String.Format("CategoryRelations2.aspx?fromCategoryID={0}&toCategoryID={1}", DataBinder.Eval(Container, "Parent.Parent.Parent.DataItem.lRow_Id"), Eval("lRow_Id")) %>'></asp:HyperLink>

 

 

 

 

</ItemTemplate>

 

 

 

 

<SeparatorTemplate>

 

 

 

,

 

</SeparatorTemplate>

 

 

 

 

</asp:Repeater>

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

</Columns>

 

 

 

 

</MasterTableView>

 

 

 

 

</telerik:RadGrid>

 

Yavor
Telerik team
 answered on 31 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?