Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
88 views
Can you someone helps to show me how to disabled the grid if it's in the Detail Table of a Main Grid? I need to develop an App that required this feature. I know we need to use Grid Client API to work on it, but not sure how to write the javascript code. 

I've include the picture showed the Grid in Detail Table of the master Grid. If user click on the checkbox on the Master Grid, Grid in Detail Table should be ENABLED.

Thank you.
Princy
Top achievements
Rank 2
 answered on 19 Jul 2011
4 answers
169 views
Hi All,

 In my project i have one radtreeview and radgrid. when i check particular child node i am binding radgrid. These functionalities working fine. But i want to display radtreeview parent node and child node as a heading on radgrid.
I want to display heading like which is in Groupheadings.png screen shot in radgrid_with_radtreeview.png screen shot.

Please anybody help me.


Thanks,
Nagendra.
Nagendra
Top achievements
Rank 1
 answered on 19 Jul 2011
2 answers
172 views
Hello every one i want to show radlistview like msn.com view comments like
Any examples available in radlistview like that

http://www.msnbc.msn.com/id/43666041/?gt1=43001


In radlivtview i want to show only three record that view how i restrict that

Replay soon

Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 19 Jul 2011
2 answers
86 views
Hi,
I have a page consists of two grids. The bigger one is located in the center of screen, the other is smaller one which is placed at the rigth top corner. I have a template column including a button in bigger and centered grid. When it clicked some ajax code is executed. If I define
ajax setting as follows both of the grids are refreshing. But I only need smaller one to be refreshed.  If I remove the the bigger one's config item from UpdatedControls  section "Loading" sign is seems in the center of smaller grid. But I want the sign to be in the center og bigger grid. How can I do it? Refreshing two grids causes performance problem even there is no need.
Thank you,

<telerik:RadAjaxManager ID="ram" runat="server" OnAjaxRequest="ram_AjaxRequest">
....
<telerik:AjaxSetting AjaxControlID="bigger...">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="smaller..." LoadingPanelID="rLoadPanelMain" />
                    <telerik:AjaxUpdatedControl ControlID="bigger..." LoadingPanelID="rLoadPanelMain" />
                </UpdatedControls>
</telerik:AjaxSetting>    
....

<telerik:RadAjaxLoadingPanel ID="rLoadPanelMain" runat="server" Skin="Mar" EnableEmbeddedSkins="false" ></telerik:RadAjaxLoadingPanel>
Nazim
Top achievements
Rank 1
 answered on 19 Jul 2011
1 answer
180 views

Under the RadListView you suggest the following:


RadControls for ASP.NET AJAX

Collapse imageAccessing controls in the LayoutTemplate

To get reference to a control in RadListView LayoutTemplate you can use its FindControl(controlId) method.

CopyC#
protected void RadListView1_PreRender(object sender, EventArgs e)
{
    Label lbl = RadListView1.FindControl("Label1") as Label;
}

I can't make it work. 
My code:
<telerik:RadListView ID="RadListView1" runat="server" AllowPaging="True"
    ItemPlaceholderID="PlaceHolder1" onitemcreated="RadListView1_ItemCreated"
    onprerender="RadListView1_PreRender" >
    <LayoutTemplate>
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
    </LayoutTemplate>
    <ItemTemplate>
        <div style="float: left;">
            <fieldset style="border: 0; width: 154px; height: 154px; margin: 5px 5px 5px 5px;">
                <div class="myClass" style="padding: 2px 2px 2px 2px; background: #eeeeee; text-align: center;">
                    <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" AutoAdjustImageControlSize="False"
                        CssClass="myClass" ImageUrl='<%# Eval("thumbUrl") %>' ResizeMode="Fit" AlternateText="Click to view preview"
                        ToolTip="Click to view preview" Width="150px" Height="150px" />
                </div>
            </fieldset>
            <div style="border: 0px; white-space: normal; width: 150px; margin: 5px 5px 5px 5px;
                padding: 2px 2px 2px 2px;">
                <asp:CheckBox ID="chkImage" runat="server" AutoPostBack="True" />
                <asp:HyperLink ID="lnkAsset" Target="_blank" NavigateUrl='javascript:void(0);' runat="server"><%# Eval("filename") %></asp:HyperLink>
                <asp:HiddenField ID="hiddenAssetId" Value='<%# Eval("id") %>' runat="server" />
            </div>
        </div>
    </ItemTemplate>
    <EmptyDataTemplate>
        No Assets Found
    </EmptyDataTemplate>
</telerik:RadListView>
Code behind:
protected void RadListView1_PreRender (object sender, EventArgs e)
{
    HyperLink lnkAsset = RadListView1.FindControl ("lnkAsset") as HyperLink;
    lnkAsset.Attributes.Add ("OnClick", "javascript:void(assetInfoPopUp(assetId));return false;");
}
lnkAsset is null.
Shinu
Top achievements
Rank 2
 answered on 19 Jul 2011
10 answers
275 views
Hello. I have a question. I have a Grid. There's a ComboBox with DataSource with 3 fields. I want a grid TemplateColumn TeamName (Label.Text) binding with a ComboBox DataSource-Fields( not ComboBox.Value, not ComboBox.Text). I too would like a ComboBox SelectedIndexChanged TemplateColumn TeamName also changed. Is it possible?

<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
            DataSourceID="SqlDataSource1" GridLines="None">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Number"
                DataSourceID="SqlDataSource1">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="Number" DataType="System.Int32"
            FilterControlAltText="Filter Number column" HeaderText="Number" ReadOnly="True"
            SortExpression="Number" UniqueName="Number">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column"
            HeaderText="Year" UniqueName="TemplateYear" DataField="Year">
            <ItemTemplate>
                <telerik:RadComboBox ID="RadComboBox1" Runat="server"
                    SelectedValue='<%# Bind("Year") %>'>
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Text="2009" Value="2009" />
                        <telerik:RadComboBoxItem runat="server" Text="2010" Value="2010" />
                        <telerik:RadComboBoxItem runat="server" Text="2011" Value="2011" />
                    </Items>
                </telerik:RadComboBox>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column"
            HeaderText="Team" UniqueName="TemplateColumn1" DataField="Team">
            <ItemTemplate>
                <telerik:RadComboBox ID="RadComboBox2" Runat="server"
                    DataSourceID="SqlDataSource2" DataTextField="Code" DataValueField="Code"
                    SelectedValue='<%# Bind("Team") %>'
                    onselectedindexchanged="RadComboBox2_SelectedIndexChanged"
                    AutoPostBack="True" onitemdatabound="RadComboBox2_ItemDataBound">
                </telerik:RadComboBox>
                
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn2 column"
            HeaderText="TeamName" UniqueName="TemplateColumn2">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server"
                    Text='<%# Bind("RadComboBox2.Attributes("Name")") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:webzeus %>"
             
            SelectCommand="SELECT top 15 [Number], [Year], [Team] FROM [Project] WHERE year >2008 and year <2012">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                    ConnectionString="<%$ ConnectionStrings:webs %>"
                    SelectCommand="SELECT [Code], [Name], [Manager] FROM [Team] WHERE ([disabled] = @disabled)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="false" Name="disabled" Type="Boolean" />
                    </SelectParameters>
        </asp:SqlDataSource>
     
    </div>
    </form>
</body>
Thanks
Princy
Top achievements
Rank 2
 answered on 19 Jul 2011
3 answers
183 views
In my Scheduler when I dbl-click on the scheduler to schedule a new appt, click on "Options", I don't see any of the advanced options such as recurrence there.  How do I get these to show up?

Here's a screenshot of what I see.

Here's my control in my .ASPX page

<telerik:RadScheduler ID="rscSchedule" runat="server" 
    DataKeyField="Appointment_ID"
    DataEndField="EndTime" 
    DataStartField="StartTime" 
    DataSubjectField="Subject" 
    AllowInsert="true" 
    AllowDelete="true" 
    AllowEdit="true"
    DayStartTime="05:00:00" 
    DayEndTime="19:00:00" 
    FirstDayOfWeek="Monday"
    LastDayOfWeek="Friday"
    MinutesPerRow="15" 
    ShowViewTabs="true" 
    ShowFooter="false"
    WorkDayStartTime="05:00:00" 
    WorkDayEndTime="19:00:00"
    EnableDescriptionField="true"
AppointmentStyleMode="Default"
    Width="900"
    Height="700"
    GroupBy="Nurses" 
    OnAppointmentInsert="rscSchedule_Insert"
    OnAppointmentDelete="rscSchedule_Delete" 
    OnAppointmentUpdate="rscSchedule_Update"
    OnAppointmentClick="rscSchedule_Click" 
    OnAppointmentDataBound="rscSchedule_AppointmentDataBound" 
    OnNavigationComplete="rscSchedule_NavigationComplete">
<AdvancedForm Enabled="true" EnableCustomAttributeEditing="false" EnableResourceEditing="false" Modal="true" />
<TimelineView UserSelectable="false" />
<ResourceTypes>
    <telerik:ResourceType Name="Nurses" KeyField="Staff_ID" TextField="FullNameUpperCase" ForeignKeyField="Staff_ID" />
</ResourceTypes>
<TimeSlotContextMenuSettings EnableDefault="true" />
<AppointmentContextMenuSettings EnableDefault="true" /> 
</telerik:RadScheduler>
Scott Hodson
Top achievements
Rank 1
 answered on 18 Jul 2011
1 answer
103 views
I'm using 2011_2_712 and have Uploaded a project here.

I'm using a RadTabStrip to dynamically load various User Controls. Events on these user controls sometimes take multiple firings for them to land on the event handlers.

To see this,
1. Put a breakpoint on the Select statement of rgOrders_ItemCommand()
2. Navigate to Default.aspx
3. Press "Select" for one of the customers. (The first one, Alfreds Futterkiste has orders)
4. Click the Orders tab.
5. Click Select for one of the orders.
Notice the postback is lost.

6. Press Select again and the postback is correct.

In my real project it takes 2 postbacks for one telerik control and 3 for another.  Can anyone make sense of this or tell me what I'm doing wrong?

Thanks,
Dan
Dan Lehmann
Top achievements
Rank 1
 answered on 18 Jul 2011
4 answers
121 views
When exporting a Radgrid using ExcelML format, how can I set a property that is not defined in the WorkSheetOptionsElement?  For example, within the WorkSheetOptions XML, there can be a property named Zoom that allows you to set the Zoom of the Worksheet.  Can these be added using the InnerElements.Add Method and if so, how?

<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <Print>
    <ValidPrinterInfo/>
    <VerticalResolution>0</VerticalResolution>
   </Print>
   <Zoom>75</Zoom>
   <Selected/>
   <Panes>
    <Pane>
     <Number>3</Number>
     <ActiveRow>18</ActiveRow>
     <ActiveCol>4</ActiveCol>
    </Pane>
   </Panes>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
Chris
Top achievements
Rank 1
 answered on 18 Jul 2011
7 answers
313 views
Does not look like the RadListBox (SelectionMode="Multiple) has a "max # of allowable selected items" attribute, so how may I programmatically limit it client side?

I've got the following so far. But how do I basically say if the # of selectable items is greater than 5, then remove the last selected item?

Thanks! (fyi, I did an extensive search of the forums, and documentation but could not find something that shows me how to do this).
How do i set "item" to the last selected item of the listbox? sounds like
listbox.get_selectedItem();

in a multi select listbox gets the first selected, not the "last selected".


function onSelectedIndexChanged(sender, args) {
    var listbox = $find("<%= MyListBox.ClientID %>");               
    var items = listbox.get_selectedItems();
 
    if (items.length > 5) {
        // var item = get last selected item ??
        listbox.trackChanges();
        listbox.get_items().remove(item);
        listbox.commitChanges();
         
    }
Paul J
Top achievements
Rank 1
 answered on 18 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?