Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
99 views
Hi. Would anybody know why I am getting an error when I try to access the property builder for a RadGrid. It did work fine but doesn't work now. I have deleted the old page and tried to start from scratch with a new form (based on a master page). I create the new form, add the RadGrid, use the smart tag to create an sqldatasource and then click "open property builder". I get the visual studio error:

"Error invoking 'Open Property Builder'. Details:
Exception has been thrown by the target of an invocation."
Martin
Telerik team
 answered on 24 Nov 2010
1 answer
107 views
In a user control that contains a RadGrid, I am trying to get the header text for the column that is being sorted on. I am doing this in the prerender of the control so all the databinding should have happened already. For some reason the column does not give me the correct text. For some columns the text is changed in the needdatasource event but that should happen before my routine is called. Here is the code. Is there a better way to do this?

private void Set508SortMessage()
{
    if (RadGrid1.MasterTableView.SortExpressions.Count > 0)
    {
        ATSortPane.Visible = AccessibilityMode;
        String msg = GetString("ActionWorklist.SortCriteria.DisplayText.Text");
        String sort = "";
        bool firstTime = true;
        foreach (GridSortExpression gse in RadGrid1.MasterTableView.SortExpressions)
        {
            if (!firstTime)
            {
                sort = sort + ",";
            }
            Common.Framework.SortDirection sd = GetSortDirection(gse.SortOrder);
            sort = string.Format("{0}{1} {2}", sort, RadGrid1.MasterTableView.Columns.FindByDataField(gse.FieldName).HeaderText, sd);
            firstTime = false;
        }
        lbl508Sort.Text = String.Format(msg, sort);
    }
    else
    {
        ATSortPane.Visible = false;
    }
}
Tsvetoslav
Telerik team
 answered on 24 Nov 2010
1 answer
193 views
I have several multiselect comboboxes, the entries are populated from a datasource.  Each entry has a checkbox.  I do an autopostback.  I know how to get the selected item if it's a single select, but what do I do for a multiselect?  Thanks.
Shinu
Top achievements
Rank 2
 answered on 24 Nov 2010
2 answers
92 views
Hi,
I used rad rotator for rotating the latest 10 images from a folder by retrieving their names from database.
This is working but image borders are rotating i.e., images are not displaying in the rotator

here is my aspx code
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="120px" Width="680px">
<telerik:RadRotator ID="RadRotator1" runat="server" Height="120px" Width="680px" ScrollDuration="500"
ScrollDirection="Right" FrameDuration="1500" ItemWidth="120px" ItemHeight="100px" RotatorType="AutomaticAdvance"
DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:Image ID="image1" runat="server" CssClass="image" ImageAlign="left" Visible="true"
ImageUrl='<%# String.Format("~/images/movies/{0}", DataBinder.Eval(Container.DataItem, "imagename")) %>' />
</ItemTemplate>
  </telerik:RadRotator>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:cinema mistakesConnectionString %>"
SelectCommand="SELECT TOP 10 [imagename] FROM [movie] ORDER BY [mid] DESC"></asp:SqlDataSource>
                        </telerik:RadAjaxPanel>

pls get me out of this
saratchand
Top achievements
Rank 2
 answered on 24 Nov 2010
1 answer
93 views
I am trying to incorporate the following function into the 'Delete' functionality of the RadGridView:

Protected

 

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

 

 

If e.CommandName = "Delete" Then

 

 

 

    'do something
End
If

 

 


End
Sub


My question is: does the delete happen first or whatever commands I includein this function?

thank you

 

Shinu
Top achievements
Rank 2
 answered on 24 Nov 2010
1 answer
447 views
What event can I use to populate a radcombobox in filter template in a radgrid from server side code. I do not have the ability to use datasource referenced on the page.  Can I do in it in the radgrid OnColumnCreated or ondatabound events?
Princy
Top achievements
Rank 2
 answered on 24 Nov 2010
1 answer
143 views
I am trying to get my scheduler entries to show up in order of a resource (called PeriodID). The resource is used to store the ID of the Period selected (from the Period Table) as follows:

On Call (ID=1)
AM (ID=2)
PM (ID=3)
All Day (ID=4)

I am using SQL Datasources for binding.

I have tried using Order By PeriodID in the Datasource Select statement for the Schedule Data but that doesn't work. I then tried creating a class and using the appointmentcomparer as shown here http://www.telerik.com/community/forums/aspnet-ajax/scheduler/oder-of-entry-in-scheduler.aspx#1155620 but that adds another field to the Advanced form for manual PeriodID entry which is not what I need.

Does anyone know how to have the scheduler order entries by Resource? Thanks.
GlenB
Top achievements
Rank 1
 answered on 24 Nov 2010
0 answers
156 views

I'm having difficulty getting the RecurrenceEditor to populate from existing values.

Here's Telerik's example on how to populate the control:
http://www.telerik.com/help/aspnet-ajax/recurrenceeditor_serverside_populating.html

I created some code to read my selection and it spits out:

 


Recurrence Rule Text: 
DTSTART:20101124T173647Z DTEND:20000102T000000Z RRULE:FREQ=DAILY;UNTIL=20101130T000000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR 
  
Scheduled Dates 
  
11/24/2010 5:36:47 PM
11/25/2010 5:36:47 PM
11/26/2010 5:36:47 PM
11/29/2010 5:36:47 PM

The control's state renders fine between post backs.  I then store the Recurrence Recurrence Rule Text in my database but when I try to read it back to the control later on I get nothing.  None of the items are selected in the control and even the Recurrence Checkbox isn't selected?  So, how do I assign this control it's values?  Here's my assignment code:


protected
void Page_Load(object sender, EventArgs e)
{
    this.RecurrenceEditor1.StartDate = Convert.ToDateTime("11/24/2010 5:36:47 PM");
    this.RecurrenceEditor1.RecurrenceRuleText = "DTSTART:20101124T173647Z DTEND:20000102T000000Z RRULE:FREQ=DAILY;UNTIL=20101130T000000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR";
}

Any help would be appreciated,

Thanks,

Robert
Top achievements
Rank 1
 asked on 23 Nov 2010
3 answers
303 views
Folks,

Is it possible to show/hide RadComboBox depending on the RadioButtionListSelected Value? For example In RadioButtonList1_SelectedIndexChanged event, if my RadioButtonList1's selected Value = "1", show RadcomboBox (CountryName), else hide the RadComboBox.  Both My RadioButtonList and ComboBox are within EditTemplate of RadGrid.

Below is my code.

Thanks

<telerik:GridTemplateColumn DataField="rblLIST" HeaderText="rbl" UniqueName="rBL">
                        <EditItemTemplate>
                         
                               <asp:RadioButtonList ID="RadioButtonList1" runat="server"  AutoPostBack = "true"
                                onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
                                RepeatDirection="Horizontal">
                                    <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                <asp:ListItem Text="No" Value="2"></asp:ListItem>
  
                            </asp:RadioButtonList>     
                              
                             
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                      
                    <telerik:GridTemplateColumn DataField="CountryName" HeaderText="Country" UniqueName="CountryName">
                      
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("CountryName") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="rcbCountries"  
                                runat="server" 
                                AutoPostBack="true"
                                Skin="Vista"                                         
                                DataTextField="Name" 
                                DataValueField="CountryID">                                
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>


gc_0620
Top achievements
Rank 1
 answered on 23 Nov 2010
4 answers
122 views
Hi there,

I have a page with RadSplitter which contains RadGrid and my custom user control (Footer) in two separate
RadPanes. I enabled ajax on the grid, but I would like to update the footer with ajax as well. In code
below I have tried inserting the footer id or the id of a panel that wraps the footer as ControlID in
AjaxUpdateControl tag. None of them worked and they even caused that the RadGrid doesn't work properly
(when I click on the next page button, it doesn't change the page, but loading icon is shown).
The footer user control contains only <%Reponse.Write(DateTime.Now);%>.

What am I missing?


<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid" UpdatePanelHeight="100%" />
                            <telerik:AjaxUpdatedControl ControlID="***WhatShouldBeHere?***" UpdatePanelHeight="100%" />
                    
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadSplitter ID="RadSplitter" runat="server" Orientation="Horizontal">
        <telerik:RadPane ID="TitleRadPane" runat="server" Height="26px" >
          <!-- ...... -->
        </telerik:RadPane>
        <telerik:RadPane ID="ContentRadPane" runat="server" Scrolling="None">
            <telerik:RadGrid
                ID="RadGrid"     
                DataSourceID="MasterObjectDataSource"
                EnableLinqExpressions="false"
                OnUpdateCommand="UpdateGrid"
                OnInsertCommand="UpdateGrid"
                OnDeleteCommand="DeleteItem"
                runat="server">
 
                <ClientSettings>
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    <Selecting AllowRowSelect="true" />
                </ClientSettings>
 
                <MasterTableView CommandItemDisplay="Top" AllowSorting="true" DataSourceID="MasterObjectDataSource" AllowFilteringByColumn="True" IsFilterItemExpanded="False" DataKeyNames="Id">
 
                    <CommandItemTemplate>
                       <!-- .... -->
                    </CommandItemTemplate>
 
                    <EditFormSettings UserControlName="AreaDetail.ascx" EditFormType="WebUserControl">
                        <EditColumn UniqueName="DummyEditColumnUniqueName">
                        </EditColumn>
                    </EditFormSettings>
 
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
 
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
 
                    <Columns>
                       <!-- .... -->
                    </Columns>
                </MasterTableView>
                <SelectedItemStyle Wrap="True" />
                <SortingSettings SortedBackColor="" EnableSkinSortStyles="false" />
            </telerik:RadGrid>
        </telerik:RadPane>
 
        <telerik:RadPane ID="FooterRadPane" runat="server" Height="100">
            <asp:Panel ID="FooterPanel" runat="server">
                <metTrade:Footer ID="Footer" runat="server">
                </metTrade:Footer>
            </asp:Panel>
        </telerik:RadPane>
    </telerik:RadSplitter>
steve
Top achievements
Rank 1
 answered on 23 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?