Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
112 views
Hi,
I have a very simple Telerik AJAX setup in one page, and it works well most of the time, but it sometimes enters into a state where dropdowns won't send their selected values back to the server in AJAX posts anymore.

This is basically what I have (simplified for the purpose of posting it here, the actual page is much much bigger):

<%@ Page Language="VB" MasterPageFile="~/Admin/_MasterPages/Default.master" AutoEventWireup="false"<br>    ValidateRequest="false" MaintainScrollPositionOnPostback="true" CodeFile="Edit.aspx.vb"<br>    Inherits="Admin_Setup_Edit" %><br><br><asp:Content ID="Content1" ContentPlaceHolderID="SubNavigationContentPlaceHolder"<br>    runat="Server"><br></asp:Content><br><asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server"><br>    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">        <br>    </telerik:RadAjaxManager><br>    <telerik:RadCodeBlock ID="CodeBlock1" runat="server">    <br>        <script type="text/javascript"><br><br>            var AddEvent_ShowLoader = function () {<br>                JS.showLoader();<br>            }<br><br>            var AddEvent_HideLoader = function () {<br>                JS.hideLoader();<br>            }<br><br>        </script><br>    </telerik:RadCodeBlock><br>    <telerik:RadAjaxPanel ID="mainAjaxPanel" runat="server" ClientEvents-OnRequestStart="AddEvent_ShowLoader"<br>        ClientEvents-OnResponseEnd="AddEvent_HideLoader" LoadingPanelID="MasterRadAjaxLoadingPanel"><br>        <table cellpadding="0" cellspacing="0" width="100%"><br>            <tr><br>                [[... a lot of other rows here... ]]<br>            </tr>            <br>            <tr><br>                <td class="BorderRight"><br>                    <asp:DropDownList ID="ddlStatus" runat="server"><br>                    </asp:DropDownList><br>                </td>                <br>                <td><br>                    <asp:DropDownList ID="ddlType" runat="server"><br>                    </asp:DropDownList><br>                </td><br>            </tr><br>            <tr><br>                [[... a lot of other rows here... ]]<br>            </tr>            <br>        </table><br>    </telerik:RadAjaxPanel><br></asp:Content>

Values from dropdowns will come as empty strings, which is incorrect.
Please note that this is a random issue, so there must be something that's getting corrupted somehow and I need to know why.

Have someone experienced this before? Any pointers on what the problem could be?

Thanks
Andrey
Telerik team
 answered on 29 Mar 2012
9 answers
400 views
My client would like to use a close button that has the word close followed by the X.  (They think the current close button is too tiny to be noticed by users.)  The close button is the only button we want to have appear along the top of the window.  I have created a custom skin and updated the sprite (attached), but don't know how to get the window to show the entire close portion of the sprite.  Any clues?  I'm also attaching an image that shows how the close button appears currently.

Thanks.

Laurie
Chris Mitchell
Top achievements
Rank 1
 answered on 29 Mar 2012
3 answers
525 views
Hey there,

I have a series of buttons and drop downs that I'd like to show in the header of my RadGrid using the CommandItemTemplate.  My first attempt at solving this problem involved using the RadToolBar.  This works well, except I have not been able to identify a way to position the buttons as I'd like.  Essentially, I want to be able to have the last button in the ToolBar aligned to the right.

Is there a way to use an HTML table to position the RadToolBar's Items as I'd like?  

Using standard ASP.Net controls, the essential layout I'd want can be created like this:

<table style="width: 100%"
      <tr> 
           <td> 
                <asp:DropDownList ID="SentBoxSelect" runat="server" CssClass="Normal" AutoPostBack="true" OnSelectedIndexChanged="SentBoxSelect_SelectedIndexChanged"
                   <asp:ListItem Text="All" Value="All" /> 
                   <asp:ListItem Text="None" Value="None" /> 
                 </asp:DropDownList> 
                 <asp:Button ID="btnReplySent" runat="server" CssClass="Normal" Text="Reply" /> 
               </td> 
               <td style="text-align: right"><asp:Button ID="SentTools" runat="server" CssClass="Normal" Text="Tools & Settings" OnClick="ToolsAndSettingsButton_Click" /></td
          </tr> 
</table> 

This results in a DropDownList on and a Button on the left side of the Grid's Header, and a "Tools & Settings" button aligned on the right side.

Thanks for your help,

Chris
Kate
Telerik team
 answered on 29 Mar 2012
1 answer
45 views
Hi Telerik:

This is a question perplex me.
In RadGrid,Nest a RadChart,Of course ,that data bind to radGrid.
There are two kind of think. 
        First : Through data of  radGrid takes datasource to radChart. This think source think of silverlight.
        Second: Through keyColumn of  radGrid ,Execute StoredProcedure with parameter to bind radChart. Why needing execute StoredProcedure ,Because I must process some things. The SqlDataSource seem to can't to execute  StoredProcedure with parameter.

I try to two ways,but fail.I  distressed.
So I please admin help me trying to use second way. Give me some example.
The sourcecode here:


<telerik:RadGrid AutoGenerateColumns="False" ID="RadGridFHData"
                AllowFilteringByColumn="True" AllowPaging="True"
                AllowSorting="True" runat="server" ShowGroupPanel="true"
            onitemcommand="RadGridFHData_ItemCommand">
                <PagerStyle Mode="NextPrevAndNumeric" />
                <GroupingSettings CaseSensitive="false" />
                <MasterTableView TableLayout="Fixed" DataKeyNames="FHID" ClientDataKeyNames="FHID">
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="FHID" DataField="FHID" UniqueName="FHID"
                            SortExpression="FHID" HeaderStyle-Width="100px" FilterControlWidth="100px"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />

                        <telerik:GridBoundColumn HeaderText="病人ID" DataField="PID" UniqueName="PID"
                            SortExpression="PID" HeaderStyle-Width="100px" FilterControlWidth="100px"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />

                        <telerik:GridBoundColumn HeaderText="病人姓名" DataField="PName" UniqueName="PName"
                            SortExpression="PName" HeaderStyle-Width="100px" FilterControlWidth="100px"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />

                        <telerik:GridNumericColumn  HeaderText="测量值" DataField="FHValue" UniqueName="FHValue"
                            SortExpression="FHValue" HeaderStyle-Width="100px" FilterControlWidth="140px"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />

                        <telerik:GridDateTimeColumn HeaderText="测量日期" DataField="ReceiveDate" UniqueName="ReceiveDate"
                            SortExpression="ReceiveDate" HeaderStyle-Width="100px" FilterControlWidth="140px"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />

                        <telerik:GridBoundColumn HeaderText="查看状态" DataField="isNew" UniqueName="isNew"
                            SortExpression="isNew" HeaderStyle-Width="100px" FilterControlWidth="140px"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />

                        <telerik:GridBoundColumn HeaderText="医生留言" DataField="Remark" UniqueName="Remark"
                            SortExpression="Remark" HeaderStyle-Width="100px" FilterControlWidth="140px"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />
                    </Columns>
                                        
                    <NestedViewSettings>
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="FHID" MasterKeyField="FHID" />
                        </ParentTableRelation>
                    </NestedViewSettings>
                     <NestedViewTemplate >
                         <table>
                             <tr>
                                <td align="left" colspan="3">
                                    <telerik:RadChart ID="RadChartFH" runat="Server"
                                                      Width="495px" AutoLayout="true" Skin="Mac">
                                        <ClientSettings EnableZoom="false" ScrollMode="XOnly" XScale="4" />
                                        <Series>
                                            <telerik:ChartSeries Name="ChartFH" DataYColumn="FHValue" Type="Line">
                                                <Appearance FillStyle-MainColor="223, 87, 60">
                                                </Appearance>
                                            </telerik:ChartSeries>
                                        </Series>
                                        <Legend Visible="false"></Legend>
                                        <ChartTitle TextBlock-Text="Scrolling only (initial XScale applied)">
                                        </ChartTitle>
                                    </telerik:RadChart>

                                </td>
                             </tr>
                         </table>
                   </NestedViewTemplate>
                  
                </MasterTableView>
                <ClientSettings AllowDragToGroup="true" >
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                </ClientSettings>
      </telerik:RadGrid>

      <asp:SqlDataSource ID="SqlDataSource1" CancelSelectOnNullParameter="false" runat="server" ConnectionString="<%$ appSettings:XCareSqlConn%>"
           ProviderName="System.Data.SqlClient" SelectCommandType="StoredProcedure" SelectCommand="ChartFHData">
          <SelectParameters>
               <asp:Parameter  Name="FHID" Type="String"/>
           </SelectParameters>          
          
      </asp:SqlDataSource>


Maria Ilieva
Telerik team
 answered on 29 Mar 2012
0 answers
66 views
Hi,
We have a website developed using ASP.NET AJAX with Telerik controls. Telerik controls are not loading properly for few people, who are accessing the website from their laptops with wireless connections.

Users are facing this issue intermittently. I have gone through hundreds of blogs and until now there was no success. It is becoming a critical issue for us as it is affecting many people on site. Could anyone please advice?? 

Thanks,
Ram

Ram
Top achievements
Rank 1
 asked on 29 Mar 2012
2 answers
233 views
Hi,
     I have one GridEditCommandColumn and GridButtonColumn inside my radgrid.
What i want to do is, on click of both  want to open different popup to edit.
I gave command name as Edit in Gridbuttoncolumn. 
On both click its showing same mastertablevieweditform.
How to have multiple mastertablevieweditform. 

Please tell me some solution for this.


Regards,
Soumya,
Bangalore
Soumya
Top achievements
Rank 1
 answered on 29 Mar 2012
1 answer
300 views
I have the following scenario.

1) Master - Cotante Page



2) RadWindows.
When user click on "Assume User" in menu


RadWindows is open.


After user click on Assume User (I closed windows and execute ajaxManager command)

This command load Assume User in Mater/Content Page
I need show loading panel while that code is executing.

   protected void RadAjaxManager_Request(object sender, AjaxRequestEventArgs e)
        {
           switch(e.Argument.ToLower())
           {
               case "assume":
                   LoadSettings();
                   Response.Redirect("~/UI/DocumentsList.aspx");
                   break;

           }

        }


  private void LoadSettings()
        {


            Resources = App.GetRegistrationResources("Login");
            lblogOff.Text = Resources.GetString(lblogOff.ID, new CultureInfo(Culture));
            lblAssume.Text = Resources.GetString(lblAssume.ID, new CultureInfo(Culture));
            lnkCloseAssume.Text = Resources.GetString(lnkCloseAssume.ID, new CultureInfo(Culture));

            if (Session["AssumeUserId"] != null)
            {
//Here: START RADLOADING PANEL
                lblAssume.Visible = true;
                lnkCloseAssume.Visible = true;
                lblogOff.Visible = false;
                     LoadAssumeUser();  //here load user name
//Here: END RADLOADING PANEL
            }else
            {
                lblAssume.Visible = false;
                lnkCloseAssume.Visible = false;
                lblogOff.Visible = true;
            }


        }


Regards


Andrey
Telerik team
 answered on 29 Mar 2012
6 answers
367 views
Hi,

I have a nested (2-level) RadGrid sorted alphabetically by the name . After inserting a new record, I want to set the page index of the parent table to the newly created item without affecting the alphabetical sorting. I also want to automatically expand the new parent row to show its  child table. Thanks.
Raja M
Top achievements
Rank 1
 answered on 29 Mar 2012
1 answer
399 views
Hello,

  1. Understanding:
    1. In the code for the Image Gallery Demo using RadListView control, a RadBinaryImage control has been used.
    2. In the aspx page, a "onclick="<%#CreateWindowScript((TiledImages) Container.DataItem) %>"/>" event has been used.
    3. Also, if we run the program in debug mode and place a break point on the "CreateWindowScript" method defined in the code behind, we will see that this method is getting called at "Page_Load" itself.
    4. What i understand is its trying to register a Java Script for the click event when ever it occurs.
  2. Requirement:
    1. The images to be shown are stored in the data base.
    2. My requirement is that once the page is loaded and the user clicks on any of the image, I want to call a server side (code behind) method.
    3. Based on the selected Image and its ID, I want to load few other controls with data from the data base.
    4. As far as I understand, the onclick event used in the demo will not serve the purpose.
    5. What other option can I look out for for the above mentioned requirement?
    6. Note: In our project, we plan to use this image gallery in a form of a Live Tile in a ASP.NET application. And hence the usage of ListView and RadBinaryImage control.

A quick input towards the solution will be very helpful.

Regards,
Abhijit

 

Tsvetina
Telerik team
 answered on 29 Mar 2012
1 answer
106 views
Hi,

I had customized my radcalendar for displaying Hijri dates along with Gregorian.It works fine on my local machine but when hosting the Hijri dates from 13th to last date of every month is invisible.I am attaching a screenshot along with this for your reference.

Here my code is;

Protected Sub RadCalendar1_DayRender(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs) Handles radCal1.DayRender
        Dim label As New Label()
        Dim div As HtmlGenericControl = New HtmlGenericControl("div")
        div.Attributes.Add("class", "CalG")
        label.Text = e.Day.[Date].Day.ToString()  'Gregorian Day
        div.Controls.Add(label)
        Dim div1 As HtmlGenericControl = New HtmlGenericControl("div")
        div1.Attributes.Add("class", "CalH")
        Dim label1 As Label = New Label()
        label1.ForeColor = Drawing.Color.Brown
        Dim d As DateTime = e.Day.Date
        Dim objDateConv As New DatesConversion
        label1.Font.Size = FontSize.Small
        label1.Height = "5"
        label1.Text = objDateConv.GregToHijri(d, "Day") & "/" & objDateConv.GregToHijri(d, "Month")  'hijri Day and month
        div1.Controls.Add(label1)
        If e.Day.Date.DayOfWeek = 4 Then  'Disable week day
            Dim calendarSkin = radCal1.Skin
            If (calendarSkin = "") Then
                calendarSkin = "Default"
            End If
            Dim otherMonthCssClass As String = String.Format("otherMonth_{0}", calendarSkin)
            e.Cell.Text = ""
            e.Cell.CssClass = otherMonthCssClass ' set new CssClass for the disabled calendar day cells (e.g. look like other month days here)
            Dim calendarDay As RadCalendarDay = New RadCalendarDay
            calendarDay.Date = e.Day.Date
            calendarDay.IsSelectable = False
            calendarDay.ItemStyle.CssClass = otherMonthCssClass
            radCal1.SpecialDays.Add(calendarDay)
            e.Cell.BackColor = Drawing.Color.LightYellow 
        End If
        div.Attributes.Add("class", "CalG")
        div1.Attributes.Add("class", "CalH")
        e.Cell.Controls.Add(div)
        e.Cell.Controls.Add(div1)
    End Sub

Thnx in advance.
Milena
Telerik team
 answered on 29 Mar 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?