Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
132 views
I have a tabstrip with approximate 20 pageviews.  I need to refresh the pageview loads onTabSelecting, this seems to be a very common thing but none of the solutions I have found actually seem to work for me,  I have gotten this to work other than the page within the pageview is not hitting the pageload and needdatasource events.  What am I missing that I need to do to make this work. Thanks in advance.  I have edited down the tabs so they are not all listed,

function onTabSelecting(sender, args) {
               
               var multiPage = $find("<%=RadMultiPage1.ClientID %>");
               var pageView = multiPage.findPageViewByID(args.get_tab().get_pageViewID());
 
               switch (args.get_tab().get_pageViewID()) {
                   case "RadPageView2":
                       //pageView.set_contentUrl("~/pageviews/emailTemplates.aspx");
                       args.get_tab().get_pageView().set_contentUrl("pageviews/emailTemplates.aspx");
                       break;
                   case "RadPageView3":
                       //pageView.set_contentUrl("~/pageviews/originalEmails.aspx");
                       args.get_tab().get_pageView().set_contentUrl("pageviews/originalEmails.aspx");
                       break;
                   case "RadPageView4":
                       //pageView.set_contentUrl("~/pageviews/CourtList.aspx");
                       args.get_tab().get_pageView().set_contentUrl("pageviews/CourtList.aspx");
                       break;
                   case "RadPageView5":
                       //pageView.set_contentUrl("~/pageviews/region.aspx");
                       args.get_tab().get_pageView().set_contentUrl("pageviews/region.aspx");
                       break;
                   case "RadPageView6":
                       //pageView.set_contentUrl("~/pageviews/listmgmt.aspx");
                       args.get_tab().get_pageView().set_contentUrl("pageviews/listmgmt.aspx");
                       break;
                   case "RadPageView7":
                       //pageView.set_contentUrl("~/pageviews/subscribers.aspx");
                       args.get_tab().get_pageView().set_contentUrl("pageviews/subscribers.aspx");
                       break;
                  
 
               }
               // alert("The ID of the selected RadPageView is " + args.get_tab().get_pageViewID());

regina
Top achievements
Rank 1
 asked on 19 Oct 2012
2 answers
117 views
Hi,

I am hoping someone on this forum would be able to help me. 

I have a radgrid with Edit form set up as pop up. I am using an "on-click" event for my update/insert buttons on the form template.

However, I am unable to access the controls on the form from the code behind onclick function. Can someone please tell me how I'd be able to access the controls.

Here is my EditForm in my aspx:

  <EditFormSettings InsertCaption="New Request" CaptionDataField="RequestID" EditFormType="Template">
                                            <FormTemplate>
                                                <table id="Table1" cellspacing="1" cellpadding="1" width="800px" border="0" >
                                                    <tr>
                                                        <td colspan="4">
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                     <td>
                                                            Request Name:
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtReqName" runat="server" Text='<%# Bind( "Requ
est_Name") %>' TabIndex="1" >
                                                            </asp:TextBox>
                                                        </td>

                                                    </tr>
                                            
                                                </table>
                                                <table style="width: 100%">
                                                    <tr>
                                                        <td align="center" colspan="2">
                                                            <asp:Button ID="btnUpdate" OnClick = "InsertOrUpdate" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Add", "Update") %>'
                                                                runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'>
                                                            </asp:Button>&nbsp;
                                                            <asp:Button ID="btnCancel"  OnClick = "CancelUpdate" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                                            </asp:Button>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </FormTemplate>
                                            <PopUpSettings Height="600" Width="800"  CloseButtonToolTip="Cancel" Modal = "true" />
                                        </EditFormSettings>

And here is my code behind:

 Protected Sub InsertOrUpdate(ByVal sender As Object, ByVal e As EventArgs)
' How can I access the control txtReqName here and obtain it's value.
 End Sub

Appreciate any help. Thanks!
Berry
Top achievements
Rank 1
 answered on 19 Oct 2012
1 answer
84 views
Hi All,

I need to disable appointment  double click to edit for some appointment, its working fine for all appointment but i need to disable for some appointments only.

Thanks
Madhan
Madhan
Top achievements
Rank 1
 answered on 19 Oct 2012
2 answers
71 views
Due to the change in styles for the Radcombo box I regenerated a couple of skins using http://stylebuilder.telerik.com/ and I'm still seeing the problem.

Is it me or has the style builder not yet been updated?
Cradz
Top achievements
Rank 1
 answered on 19 Oct 2012
1 answer
96 views
I am following the demo here for the related ComboBoxes and have a couple questions.

Related ComboBox Demo

But I need it to expand to do the following.
  1. On Page_Load doing an edit where I have the continent and country already saved in the database how do I load it?
  2. When I select on the city and press Explore the city is not being passed correctly.  It is always sending the intial load city not the on selected. 

Your help is appreciated.
Thank You!

Kalina
Telerik team
 answered on 19 Oct 2012
1 answer
64 views
A very simple use of RAD combo:

Datasource provides a list of values to load the combo box. Plain-vanilla VB.Net code.

This combo box is used in an edit form, and the selected value is set when the record to be edited is read from the SQL Server database.

We are not using any type of binding.

So, when I attempt to initialize the combo when the page loads, I find that I have a value in the database that triggers an error that is not trapped by a traditional Try / Catch construct. (see attachment)

In this particular example, the code found in the database did not match any value in the datasource for this combo and I get a hard, untrapped error on the selected value assignment. ("selection out of range")

I am hoping that I am doing something really stupid and overlooking an obvious solution, anybody care to show me my error?

 

    type_code = reader("type_code").ToString
Try
    Me.Type_Code_Combo.SelectedValue = type_code
Catch ex As Exception
    ' just ignore if there is no match
End Try

 

 Note: I am aware that I can set "allow custom text" but that is not the intent, rather to insulate my page from data errors, and allow for corrections by setting the selected value to nothing and letting the user make a proper selection. But if that is the only way, how to I synchronize so that the text in the box matches the selectedvalue in the list?

 

Nencho
Telerik team
 answered on 19 Oct 2012
1 answer
56 views
Hi!!..
I need replace the Name of items draping by an icon!...

I did on Grid but I couldn't do in RadListbox.

OnDrapping="ShowIcon"

function ShowIcon(sender,args){

  var row = sender._draggedRow; --> this is not correct


    row.innerHTML = "<img  src='/UI/Images/user_transfer.png' />";
    row.style.width = 0 + "px";
    row.style.height = 0 + "px";
}


How i can do this?
July
Top achievements
Rank 2
 answered on 19 Oct 2012
6 answers
167 views
Hello everyone,

I'm trying to use Server snippets incrusted in HTML with no luck. The code is as follows:

<label for="<%= myTextBox.ClientID %>" >Text</label>
<asp:TextBox id="myTextBox" runat="server />

The server throws me the following exception:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

I know I have to use RadScriptBlock if I want to use it in javascript, but how can I achieve this behavior with Telerik?
I also know that Telerik:RadTextBox contains a label option, but I need it this way because I'm using a CSS template.

in advance, thanks

Gabriel
Top achievements
Rank 2
 answered on 19 Oct 2012
1 answer
380 views
Hi,
I am retrieving a set of records from database and binding it to a RadGrid. I have applied Grouping to all the columns. When i am dragging a Column to group area it is making a group by the result set with respect to that column. In group footer it is displaying the Aggregate value (say Sum). Some of these column group totals are depends upon the other column total. For example My RadGrid has 4 columns.
Column 1: Product Name
Column 2: Quantity
Column 3: Price
Column 4: Percentage

The for Column 2 and Column 3 "Aggregate=Sum".
When I will drag the Column 1 the grid automatically groups the data as per product name and the group total is displaying for column 2 and column 3. 

For Column 4 Subtotal I have a Formula like (Sum(Column 2) / Sum(Column 3) ) *100.

How I can the Column 4 Subtotal for group level?
Please help.


Thanks 
Raj
Angel Petrov
Telerik team
 answered on 19 Oct 2012
1 answer
116 views


Hi,

I have created custom grid using item template grid .and have set show header to false.
however ,when I export i get to see header and no data which i want vice-versa ie:want ot show data and no header.


below is my code


<table width="100%" style="padding: 0px 30px 0px 30px">
        <tr style="padding-bottom: 10px;">
            <th style="background-color: #4C4C4C; margin-bottom: 30px; color: White; font-size: 13px;
                height: 25px; font-weight: bold" colspan="2">
                <div style="text-align: left; float: left; width: 20%">
                    Vacation Request
                </div>
                <div style="text-align: right; float: left; width: 80%">
                    <asp:ImageButton ID="imgexcel" runat="server" ImageUrl="~/Img/Export to excel.gif"
                        OnClick="imgexcel_Click" />
                    &nbsp;
                    <asp:ImageButton ID="imgword" runat="server" ImageUrl="~/Img/ExportToWord.gif" OnClick="imgword_Click" />
                    &nbsp;
                    <asp:ImageButton ID="imgpdf" runat="server" ImageUrl="~/Img/ExportToPDF.gif" OnClick="imgpdf_Click" />
                    &nbsp;
                    <asp:ImageButton ID="imgcsv" ImageUrl="~/Img/ExportToCSV.gif" runat="server" OnClick="imgcsv_Click" />
                </div>
            </th>
        </tr>
    </table>
    <table width="100%" style="padding: 0px 30px 0px 30px">
        <tr style="padding-bottom: 10px;">
            <td>
                <telerik:RadGrid ID="RadGrid1" runat="server">
                    <ExportSettings ExportOnlyData="true" FileName="VacationDetailReport" IgnorePaging="true"
                        OpenInNewWindow="true" HideStructureColumns="true" />
                    <MasterTableView TableLayout="Fixed" ShowHeader="false">
                        <CommandItemTemplate>
                        </CommandItemTemplate>
                        <ItemTemplate>
                            <table width="100%" style="padding: 0px 30px 0px 30px">
                                <tr>
                                    <td class="td1" width="20%" style="padding-top: 20px;">
                                        Consultant :
                                    </td>
                                    <td class="td2" style="padding-left: 6px">
                                        <asp:Label ID="lblConsultant" runat="server" Text='<%#Eval("name") %>' Font-Bold="true"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td1">
                                        Start Date :
                                    </td>
                                    <td class="td2" style="padding-left: 6px">
                                        <asp:Label ID="lblstartdate" runat="server" Font-Bold="true" Text='<%#Eval("StartDate") %>'></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td1">
                                        End Date :
                                    </td>
                                    <td class="td2" style="padding-left: 6px">
                                        <asp:Label ID="lblEnddate" runat="server" Font-Bold="true" Text='<%#Eval("EndDate") %>'></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td1">
                                        Type Of Leave :
                                    </td>
                                    <td class="td2" style="padding-left: 6px">
                                        <asp:Label ID="lblTypeofLeave" runat="server" Font-Bold="true" Text='<%#Eval("TypeOfLeave") %>'></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td1">
                                        Additional Comments :
                                    </td>
                                    <td class="td2">
                                        <asp:Label ID="lblAdditionalComments" runat="server" Font-Bold="true" Text='<%#Eval("AdditionalComments") %>'></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td1">
                                        Manager :
                                    </td>
                                    <td class="td2" style="padding-left: 6px">
                                        <%-- <asp:Label ID="lblManager" runat="server" Font-Bold="true" Text='<%Eval("") %>'></asp:Label>--%>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td1">
                                        Emergency Contact Info :
                                    </td>
                                    <td class="td2">
                                        <asp:Label ID="LblEmergencyContactInfo" runat="server" Font-Bold="true" Text='<%#Eval("EmergencyContactInfo") %>'></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right; padding-right: 5px; padding-top: 10px">
                                    </td>
                                    <td style="text-align: left; padding-left: 5px; padding-top: 10px">
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </MasterTableView>
                </telerik:RadGrid>
            </td>
        </tr>
    </table>
Kostadin
Telerik team
 answered on 19 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?