Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
128 views
hi,
i've a index page with i open a radwindow. Into radwindow load another page that i use to see the messager box. Into this page there's a button that i use to load another web page out this radwindow. With IE 8 and IE 9 all function, with chrome nto function....I post my code.

Index page:
<script type="text/javascript">
// ritorna valore selezionato Anagrafica
function LoadProfilo(sender, eventArgs) {
var arg = eventArgs.get_argument();
if (arg == 1) {
window.location.href("profile.aspx");
}
}
</script>
<telerik:RadWindow ID="RadWindowProfileconfirm" runat="server"
ShowContentDuringLoad="false" Width="435px"
Height="166px" Title="Aggiornamento profilo" Behaviors="None"
MaxHeight="166" MaxWidth="435" Modal="True" Behavior="None"
Font-Names="Verdana" Font-Size="Small" IconUrl="/image/iconlogo.png"
ToolTip="Aggiornamento profilo" OnClientClose="LoadProfilo"
VisibleStatusbar="False" NavigateUrl="register_step2.aspx" Skin="Simple"
ReloadOnShow="True">
</telerik:RadWindow>

code be hinde i use to load this radwindow:

Dim script As String = "function f(){$find(""" + RadWindowProfileconfirm.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)


code radwindow to close the window:

<script type="text/javascript">
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }
    function Close_and_Load() {
        var arg = new Object();
        arg = 1
        GetRadWindow().close(arg);
    }
</script>

Protected Sub ImgBtncontinua_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgBtncontinua.Click
    ScriptManager.RegisterStartupScript(Page, Me.GetType, "close", "Close_and_Load();", True)
End Sub

please help me




Marin Bratanov
Telerik team
 answered on 26 Dec 2012
36 answers
1.1K+ views
Currently it seems that the ASP.NET Validators only work in server mode when used in the RadAjaxManager, but they work in client and server mode when in an UpdatePanel.

We currently converting our from ASP.NET UpdatePanels and are wondering if we are missing something simple?  If not can we plan on client side validation in RadAjaxManager in the near future?

Thanks,
Chris
Pavlina
Telerik team
 answered on 26 Dec 2012
1 answer
89 views
I am having difficulties getting the links to show up on the scheduler(See attached file).  I tried putting a scheduler on a page, just loading a few "Appointments" of the Telerik type, then binding them to the RadScheduler.  They are kind of appearing on the correct date, but they are VERY skinny...Not sure what I am doing wrong...Below is the code I used to create the Appointments.

thanks

mark

 List<Appointment> appointments = new List<Appointment>();

            Appointment app1 = new Appointment();
            app1.Subject = "Appt1";
            app1.Description = "App Desc";
            app1.Start = new DateTime(2012, 12, 17);
            app1.End = new DateTime(2012, 12, 17);
            app1.ID = 1;

            appointments.Add(app1);

            Appointment app2 = new Appointment();
            app2.Subject = "Appt2";
            app2.Description = "App Desc";
            app2.Start = new DateTime(2012, 12, 20);
            app2.End = new DateTime(2012, 12, 20);
            app2.ID = 2;


            appointments.Add(app2);

            RadScheduler1.DataSource = appointments;
            RadScheduler1.DataStartField = "Start";
            RadScheduler1.DataEndField = "End";
            RadScheduler1.DataSubjectField = "Subject";
            RadScheduler1.DataKeyField = "ID";
            RadScheduler1.DataBind();


Here is my markup for the RadScheduler...
<telerik:RadScheduler ID="RadScheduler1" runat="server" AppointmentStyleMode="Default" Height="600" SelectedView="MonthView" ItemType="Telerik.Web.UI.Appointment"></telerik:RadScheduler>

My controls are from Q1 of THIS year...License ran out so I can't upgrade...ugh...

HELP???

thanks
Bozhidar
Telerik team
 answered on 26 Dec 2012
10 answers
413 views
Hello,
I have a template column in grid and RadAsyncUpload control created in template's InstantiateIn method. I assign image file extensions to AllowedfileExtensions property.
_uploadControl = new RadAsyncUpload()                                     
   {                                           ID = Item.user_name + "_upload",
                                               TemporaryFolder = HostingEnvironment.MapPath(Static.Config.Paths.UploadsFolder),                                                AllowedFileExtensions = _allowedExtensions,
                                              TemporaryFileExpiration = new TimeSpan(0, 0, 30, 0)
        }

That's what I do next:
1. Click "Select" button.
2. When open file dialog opens, there's no file mask on it.
3. I select any file and upload it.

4. Click "Remove" link
5. Open file dialog again and see the file mask is set correctly.
What should I do to fix that?

Peter Filipov
Telerik team
 answered on 26 Dec 2012
1 answer
64 views
Changing forecolor doesnt seem to work in AppointmentDataBound...
The backColor changes just fine..
The ForeColor stays black..

e.Appointment.BackColor = Color.Blue;
e.Appointment.ForeColor = Color.White;


Bozhidar
Telerik team
 answered on 26 Dec 2012
3 answers
328 views
There are, say 2 items in a combobox. How do I set first item (visible for the user with icon and text) and prohibit selecting another item? So combobox should not expand and be "Read-only".
Shinu
Top achievements
Rank 2
 answered on 26 Dec 2012
4 answers
111 views
Hi Guys!

I'm beginner in .NET development. But I've learned how to save time with this technology. I'm very impressed with the power of Telerik too.
Well, here is my trouble for now:

I've a grid that show many columns. I need show all the content columns without wrap lines with horizontal scrool activated, like this.
But when I'll configure a grouped column, the horizontal scrool bar disappears and the column content are cropped, like can see here.

Here the grouping code:
         
<GroupByExpressions>
  <telerik:GridGroupByExpression>
    <SelectFields>
      <telerik:GridGroupByField FieldAlias="Evento" FieldName="Evento" FormatString="{0:D}" HeaderValueSeparator=": ">
        </
telerik:GridGroupByField>
    </SelectFields>
     <GroupByFields>
      <telerik:GridGroupByField FieldName="EVENTO" SortOrder="Ascending"></telerik:GridGroupByField>
     </GroupByFields>
   </telerik:GridGroupByExpression>
</GroupByExpressions>


Can anybody help me?

Andre.
Shinu
Top achievements
Rank 2
 answered on 26 Dec 2012
2 answers
62 views
Hi,

I am trying to add checkboxcolumn to support selection of rows in the RadGrid Control

I have tried both client and server side approaches but have issues with both the approaches. I have ran throught the samples provided
 the server side approach seems to work fine.

My Requirement is to be able to  capture the selected rows on the server side apart from selecting and deselecting the rows
on the grid. let me know the suggested apprach.

I have tried the Server side approach but the Toggle events are getting fired in wrong order.
For example if I select the Checkbox in the HeaderRow the ToggleSelectedState gets fired on first check but on unchecking the
same CheckBox ToggleRowSelection gets fired henceforth whihc is not what the expected behaviour should be. Please see attached file for the radgrid aspx code.

<
telerik:GridTemplateColumn UniqueName
="CheckBoxTemplateColumn">
<HeaderTemplate
>
<asp:CheckBox ID="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox
>
</HeaderTemplate
>
<ItemTemplate
>
<asp:CheckBox ID="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True"

runat
="server">


If I had to use the Client side approach how will I be able to capture the selected rows on the server side. If you can provide us some sample as attahced project It would be of great help!

<telerik:GridClientSelectColumn UniqueName="grdClinetSelectCol"></telerik:GridClientSelectColumn>

</asp:CheckBox>
</ItemTemplate>
</telerik:GridTemplateColumn>

Thanks
Kumar

Shinu
Top achievements
Rank 2
 answered on 26 Dec 2012
2 answers
89 views
Hi,

We have a LoadOnDemand ComboBox (2008.3.1114.35) with Header and ItemTemplates. When a user searches a text comprised of multiple words with space between words, spaces are encoded to %20 in text value of RadComboBoxItemsRequestedEventArgs object.  Furthermore, this generates other ItemRequested events, only this time '%' is encoded as '%25.' and continues for some time. (i.e. sample text, generates event for sample%20text, then sample%2520text, then sample%252520text etc.)

Code snippet of ComboBox is included below, .cs file is not included as it only contains comparison of text to empty string.

This occurs only sometimes, sometimes spaces are not encoded.  Are the users supposed to handle encoded chars separately or is this a bug ?

Thanks in advance,
Oner

*****************************************************************************************************************************
<telerik:RadComboBox ID="rcbCompanies" runat="server"
    Skin="Hay" Width="158" DropDownWidth="360"
    ShowToggleImage="False" AllowCustomText="True"
    DataTextField="Name" DataValueField="ID"
    EnableLoadOnDemand="True" OnItemsRequested="rcbCompanies_ItemsRequested"
>
    <HeaderTemplate>
        <table width="360px">
            <tr>
                <td align="left" style="width: 130px">
                    Company Name
                </td>
                <td align="left" style="width: 100px">
                    Category Name
                </td>
                <td align="left" style="width: 130px">
                    Parent Company Name
                </td>
            </tr>
        </table>
    </HeaderTemplate>
    <ItemTemplate>
        <table width="360px">
            <tr>
                <td align="left" style="width: 130px">
                    <%# DataBinder.Eval(Container.DataItem, "Name")%>
                </td>
                <td align="left" style="width: 100px">
                    <%# DataBinder.Eval(Container.DataItem, "CategoryName")%>
                </td>
                <td align="left" style="width: 130px">
                    <%# DataBinder.Eval(Container.DataItem, "ParentName")%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadComboBox>
*****************************************************************************************************************************
PPT
Top achievements
Rank 1
 answered on 26 Dec 2012
0 answers
127 views
Hi,
When i Put the RadListView inside RadGrid Binding is fine But when click the Next Page of RadListView it Showing
"Index was out of range. Must be non-negative and less than the size of the collection"
Paging is Implementd in RadListView, when go to next Page it showing the above error.......
my code is Like this
<telerik:RadListView ID="RadListViewAdBookings" runat="server"
        SkinID="WebBlue" DataKeyNames="BID" AllowPaging="true" PageSize="3"
            ItemPlaceholderID="BranchPalceHolder"
            onitemdatabound="RadListViewAdBookings_ItemDataBound"
            onneeddatasource="RadListViewAdBookings_NeedDataSource">
        <LayoutTemplate>
            <asp:PlaceHolder ID="BranchPalceHolder" runat="server"></asp:PlaceHolder>
            <div style="clear: both;">
            </div>
            <div style="background-color: #EBEBEB; height: 30px;">
                <div style="float: left; margin-left: 30%; text-align: center; margin-top: 5px;">
              <asp:LinkButton ID="btnFirst" runat="server" CommandName="Page" CommandArgument="First"
                        Text="First" Enabled="<%#Container.CurrentPageIndex > 0 %>" Font-Underline="false"
                        Style="font-family: calibri; font-size: 15px; font-weight: bold; color: #5FA3E1;
                        padding-left: 10px; padding-right: 10px;"></asp:LinkButton>
                    &nbsp;<asp:LinkButton ID="btnPrev" runat="server" CommandName="Page" CommandArgument="Prev"
                        Text="Prev" Enabled="<%#Container.CurrentPageIndex > 0 %>" Font-Underline="false"
                        Style="font-family: calibri; font-size: 15px; font-weight: bold; color: #5FA3E1;
                        padding-left: 10px; padding-right: 10px;"></asp:LinkButton>
                    <span style="font-family: calibri; font-size: 15px; font-weight: bold; color: #545454;
                        padding-left: 10px; padding-right: 10px;">Page
                        <%#Container.CurrentPageIndex + 1 %>
                        of
                        <%#Container.PageCount %></span>
                    <asp:LinkButton ID="btnNext" runat="server" CommandName="Page" CommandArgument="Next"
                        Text="Next" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>"
                        Font-Underline="false" Style="font-family: calibri; font-size: 15px; font-weight: bold;
                        color: #5FA3E1; padding-left: 10px; padding-right: 10px;"></asp:LinkButton>
                    &nbsp;<asp:LinkButton ID="btnLast" runat="server" CommandName="Page" CommandArgument="Last"
                        Text="Last" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>"
                        Font-Underline="false" Style="font-family: calibri; font-size: 15px; font-weight: bold;
                        color: #5FA3E1; padding-left: 10px; padding-right: 10px;"></asp:LinkButton>
                    <span style="font-family: calibri; font-size: 15px; font-weight: bold; color: #545454;
                        padding-left: 10px;">Page Size:</span>
                    <telerik:RadComboBox runat="server" ID="cmbPageSize" OnSelectedIndexChanged="cmbPageSize_SelectedIndexChanged"
                        AutoPostBack="true" Width="40px" SelectedValue="<%#Container.PageSize %>">
                        <Items>
                            <telerik:RadComboBoxItem Text="3" Value="3"></telerik:RadComboBoxItem>
                            <telerik:RadComboBoxItem Text="6" Value="6"></telerik:RadComboBoxItem>
                            <telerik:RadComboBoxItem Text="9" Value="9"></telerik:RadComboBoxItem>
                            <telerik:RadComboBoxItem Text="12" Value="12"></telerik:RadComboBoxItem>
                        </Items>
                    </telerik:RadComboBox>
                    
                </div>
            </div>
        </LayoutTemplate>
        <ItemTemplate>
            <div class="in-searches">
            <div class="in-branch-info">
                <table width="100%" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td>
                              <div class="branch">
                                <asp:Label ID="lblBranchID" runat="server" Visible="false" Text='<%#Eval("BID") %>'></asp:Label>
                                    <%#Eval("BranchName")%></div>
                                <div class="dis">
                                    <strong>
                                        <%#Eval("Address")%><br />
                                        Queue : 15<br />
                                    </strong><span><strong>Next available Time : 4pm</strong></span>
                                </div>
                           
                        </td>
                        
                    </tr>
                   <tr>
                        <td valign="top">
                        <div class="dis"><strong>Available Slots</strong>
                         <telerik:RadGrid ID="RadGridDates" Width="100%" runat="server"  ShowHeader="false"
                        GridLines="None" AutoGenerateColumns="false" OnNeedDataSource="RadGridDates_NeedDataSource">
                        <MasterTableView AutoGenerateColumns="false" >            
                       <Columns>
                       <telerik:GridTemplateColumn ItemStyle-CssClass="date">
                       <ItemTemplate>
                       <%#Eval("BookingDate")%>
                       </ItemTemplate>
                       </telerik:GridTemplateColumn>
                         <telerik:GridTemplateColumn ItemStyle-CssClass="count">
                       <ItemTemplate>
                       <%#Eval("Bookingcount")%>
                       </ItemTemplate>
                       </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn ItemStyle-CssClass="book">
                       <ItemTemplate>
                        1
                       </ItemTemplate>
                       </telerik:GridTemplateColumn>
                       </Columns>
                        </MasterTableView>
                        </telerik:RadGrid>
                        </td>
                         </div>
                    </tr>
                </table>
            </div>
            </div>
        </ItemTemplate>
    </telerik:RadListView>

in Code Behind

 DataTable dtList = new DataTable();
    DataSet dsList = new DataSet();
    SqlParameter [] objSqlParameter;

    VQBranchesBC objVQBranchesBC = new VQBranchesBC();
    VQBranchesInterfaceReq objVQBranchesInterfaceReq = new VQBranchesInterfaceReq();
    VQBranchesInterfaceResp objVQBranchesInterfaceResp = new VQBranchesInterfaceResp();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            
        }
    }
    protected void cmbPageSize_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        RadListViewAdBookings.PageSize = int.Parse(e.Value);
        RadListViewAdBookings.CurrentPageIndex = 0;
        RadListViewAdBookings.Rebind();
    }
    protected void RadListViewAdBookings_ItemDataBound(object sender, RadListViewItemEventArgs e)
    {
        if (e.Item is Telerik.Web.UI.RadListViewDataItem)
        {
            DataList DataListDates = (DataList)e.Item.FindControl("DataListDates");
            Label lblBranchID = (Label)e.Item.FindControl("lblBranchID");
        }
    }


    protected void RadListViewAdBookings_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
    {
        objVQBranchesInterfaceReq.Activity = "SELECT";
        objVQBranchesInterfaceReq.Status = true;
        objVQBranchesInterfaceReq.IsDelete = false;
        objVQBranchesInterfaceResp = objVQBranchesBC.VQBranchesList(objVQBranchesInterfaceReq);
        dtList = objVQBranchesInterfaceResp.Records;
        RadListViewAdBookings.DataSource = dtList;
    }
  protected void RadGridDates_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {

        var grid = sender as RadGrid;
        var lvItem = grid.NamingContainer as RadListViewDataItem;
        var data = Convert.ToInt32(lvItem.GetDataKeyValue("BID"));
        objSqlParameter = new SqlParameter[3];
        string strDate = GlobalFunctions.GetCountryDateTime().ToString("MM/dd/yyyy");
        objSqlParameter[0] = new SqlParameter("@Today", strDate);
        objSqlParameter[1] = new SqlParameter("@intFlag", "-10");
        objSqlParameter[2] = new SqlParameter("@BranchID", data);
        dsList = VQ.VQDBFunctions.ExecuteDataSetWithParams(CommandType.StoredProcedure, "SP_VQ_GetAdvanced_BookingInfo_Slots", objSqlParameter);
        grid.DataSource = dsList;
        RadListViewAdBookings.AllowPaging = true;
       
    }


Vempalli
Top achievements
Rank 1
 asked on 26 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?