Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
116 views

Hi,

 

anyone got a nice idea to create a dashboard page like shown in the attached screenshot. The problem there is that I created a row with 3 columns each of the got a width of 33% after that a row with two columns of 50% and a row with 100%. Each cell got a RadDockZone with a width of 100%.

How can i avoid the miss alignment on the right side. The current code looks like this:

001.<style type="text/css">
002.        .td33
003.        {
004.            width: 33%;
005.            height: 98%;
006.            vertical-align:top;
007.        }
008.        .td100
009.        {
010.            width: 100%;
011.            height: 98%;
012.            vertical-align:top;
013.        }
014.        .td50
015.        {
016.            width: 50%;
017.            height: 98%;
018.            vertical-align:top;
019.        }
020.        div#main
021.        {
022.            position: relative;
023.            height: 800px;
024.            width: 100%;
025.            background-color: #ccc;
026.            overflow-y: auto;
027.            border: 1px solid red;
028.        }
029.    </style>
030.        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
031.            <div id="main">
032.                <table style="table-layout: fixed; width: 100%;">
033.                    <tr>
034.                        <td class="td33">
035.                            <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="96%" MinHeight="50px"
036.                                Height="95%">
037.                                <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Title="RadDock-Title">
038.                                    <ContentTemplate>
039.                                        <br />
040.                                        CONTENT
041.                                        <br />
042.                                    </ContentTemplate>
043.                                </telerik:RadDock>
044.                            </telerik:RadDockZone>
045.                        </td>
046.                        <td class="td33">
047.                            <telerik:RadDockZone ID="RadDockZone2" runat="server" Width="96%" MinHeight="50px"
048.                                Height="95%">
049.                                <telerik:RadDock ID="RadDock2" runat="server" Width="300px" Title="RadDock-Title">
050.                                    <ContentTemplate>
051.                                        <br />
052.                                        CONTENT
053.                                        <br />
054.                                    </ContentTemplate>
055.                                </telerik:RadDock>
056.                            </telerik:RadDockZone>
057.                        </td>
058.                        <td class="td33">
059.                            <telerik:RadDockZone ID="RadDockZone3" runat="server" Width="96%" MinHeight="50px"
060.                                Height="95%">
061.                                <telerik:RadDock ID="RadDock3" runat="server" Width="300px" Title="RadDock-Title">
062.                                    <ContentTemplate>
063.                                        <br />
064.                                        CONTENT
065.                                        <br />
066.                                    </ContentTemplate>
067.                                </telerik:RadDock>
068.                            </telerik:RadDockZone>
069.                        </td>
070.                    </tr>
071.                </table>
072. 
073.                <table style="table-layout: fixed; width: 100%;">
074.                    <tr>
075.                        <td class="td50">
076.                            <telerik:RadDockZone ID="RadDockZone5" runat="server" Width="96%" MinHeight="50px"
077.                                Height="95%">
078.                                <telerik:RadDock ID="RadDock5" runat="server" Width="300px" Title="RadDock-Title">
079.                                    <ContentTemplate>
080.                                        <br />
081.                                        CONTENT
082.                                        <br />
083.                                    </ContentTemplate>
084.                                </telerik:RadDock>
085.                            </telerik:RadDockZone>
086.                        </td>
087.                        <td class="td50">
088.                            <telerik:RadDockZone ID="RadDockZone6" runat="server" Width="96%" MinHeight="50px"
089.                                Height="95%">
090.                                <telerik:RadDock ID="RadDock6" runat="server" Width="300px" Title="RadDock-Title">
091.                                    <ContentTemplate>
092.                                        <br />
093.                                        CONTENT
094.                                        <br />
095.                                    </ContentTemplate>
096.                                </telerik:RadDock>
097.                            </telerik:RadDockZone>
098.                        </td>
099.                    </tr>
100.                </table>
101. 
102. 
103.                <table style="table-layout: fixed; width: 100%;">
104.                    <tr>
105.                        <td class="td100">
106.                            <telerik:RadDockZone ID="RadDockZone4" runat="server" Width="96%" MinHeight="50px"
107.                                Height="95%">
108.                                <telerik:RadDock ID="RadDock4" runat="server" Width="300px" Title="RadDock-Title">
109.                                    <ContentTemplate>
110.                                        <br />
111.                                        CONTENT
112.                                        <br />
113.                                    </ContentTemplate>
114.                                </telerik:RadDock>
115.                            </telerik:RadDockZone>
116.                        </td>
117.                    </tr>
118.                </table>
119.            </div>
120.        </telerik:RadDockLayout>
HMPSOLBB
Top achievements
Rank 1
 answered on 18 Jan 2019
1 answer
196 views

Hi,

Would it be possible to page in the LightBox without refreshing the whole page in this demo:

 

https://demos.telerik.com/aspnet-ajax/lightbox/examples/templates/defaultvb.aspx?show-source=true

 

Every time I click Next, the page is refreshed...

 

Marc

Attila Antal
Telerik team
 answered on 18 Jan 2019
2 answers
192 views

Hi,

I'm using RadAsyncUpload in my ASP.NET AJAX project.

Overall this works fine but when filename contains ' sh ' (<blank>sh<blank>) it not work!? It just trying to upload but never get it done

Example filename "Bending sh plate.pdf" did not get uploaded

 

BR,

Auvo

 

 

 

 

 

Auvo
Top achievements
Rank 1
 answered on 18 Jan 2019
4 answers
266 views

 

How do you persist the PageSize combo setting if the user refreshes the page? It seems to always revert to 25.

 

            <telerik:RadGrid ID="RadGrid1" runat="server"
                OnItemCommand="RadGrid1_ItemCommand"
                RenderMode="Lightweight"
                OnNeedDataSource="RadGrid1_NeedDataSource"
                AllowPaging="True"
                PageSize="25"
                AllowSorting="True"
                CellSpacing="-1"
                GridLines="Both"
                >
                <MasterTableView AutoGenerateColumns="true" TableLayout="Fixed" DataKeyNames="Catalog #">
                    <NestedViewTemplate>
                        <div>
                            <div style="float: left;">
                                <%
                                    int catalogId = Convert.ToInt32(RadGrid1.SelectedValue);

                                    List<string> files = GetImageUrlList(catalogId);
                                    if (files != null)
                                    {
                                        foreach (var path in files)
                                        { %>
                                            <img src='<%= path %>' height="400px" />
                                <%      }  
                                    } %>
                            </div>
                            <div style="clear: both">
                            </div>
                        </div>
                    </NestedViewTemplate>
                    <PagerStyle PageSizes="25,50,100" PagerTextFormat="{4}<strong>{5}</strong> rows"
                        PageSizeLabelText="Rows per page:" />
                </MasterTableView>
                <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
                <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                    <Scrolling AllowScroll="true" ScrollHeight="" UseStaticHeaders="true" />
                </ClientSettings>
                <FilterMenu RenderMode="Lightweight"></FilterMenu>
                <HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>
            </telerik:RadGrid>

 

 

Attila Antal
Telerik team
 answered on 18 Jan 2019
0 answers
47 views

I'm having a very strange issue.  When I update or save a record in any one of my 3 RadGrids, then add a new appointment to the Scheduler, it saves the new appointment but then the scheduler stops reacting to any events.  It will not let you edit, or add new appointments and the will error as if it were not registered.  I've included my add code for the scheduler and save function from one of my RadGrids (they're all similar).

protected void RadScheduler1_AppointmentInsert(object sender, AppointmentInsertEventArgs e)
{
    string newslot = e.Appointment.Attributes["SlotDesc"].ToString();
    if (!IsValidAppointment(e.Appointment, newslot))
    {
        e.Cancel = true;
        EventsDataSource.SelectCommand = eventsselectsql;
        RadScheduler1.Rebind();
        return;
    }
    if (e.Appointment.Resources.GetResourceByType("Status").Key.ToString().Equals("UNSCHEDULED", StringComparison.OrdinalIgnoreCase))
        return;
    string fakeid = string.Empty;
    try
    {
        fakeid = e.Appointment.ID.ToString();
        Session["OrigApptID"] = fakeid;
        e.Appointment.Attributes["SystemID"] = null;
    }
    catch
    { }
    int custid = -1;
    try
    {
        custid = int.Parse(Session["CurrentCustomerID"].ToString());
        Session.Remove("CurrentCustomerID");
    }
    catch{}
    if(!e.Appointment.Subject.Equals("CLOSED", StringComparison.OrdinalIgnoreCase) && !e.Appointment.Subject.Equals("LUNCH", StringComparison.OrdinalIgnoreCase))
    {
        string trailerID = e.Appointment.Attributes["TrailerID"];
        string carrierID = e.Appointment.Resources.GetResourceByType("CarrierID") == null ? null : e.Appointment.Resources.GetResourceByType("CarrierID").Key.ToString();
        if (!string.IsNullOrWhiteSpace(trailerID) && !string.IsNullOrWhiteSpace(carrierID))
        {
            InOpenTrailers(trailerID, carrierID);
        }
 
        UpdatePOList(int.Parse(fakeid), custid);
        rgOpenTrailers.Rebind();
        rgOpenPO.Rebind();
    }
    ClearSearch();
}
private void ClearSearch()
{
    GridDataSource.SelectCommand = originalUnschedQuery;
    rgUnscheduled.DataBind();
    Session["ApptID"] = -1;
    btnResetSearch.Visible = false;
    txtSearch.Text = "";
    RadScheduler1.DayStartTime = cliconf.DayStartTime;
    RadScheduler1.DayEndTime = cliconf.DayEndTime;
    RadScheduler1.WorkDayStartTime = cliconf.WorkDayStartTime;
    RadScheduler1.WorkDayEndTime = cliconf.WorkDayEndTime;
 
    DateTime date = RadScheduler1.SelectedDate;
    Session.Add("CurrentDate", date.AddDays(-1).ToShortDateString());
    Session.Add("NextDate", date.AddDays(1).ToShortDateString());
    EventsDataSource.SelectCommand = eventsselectsql;
    RadScheduler1.Rebind();
    foreach (GridColumn column in SearchGrid.MasterTableView.OwnerGrid.Columns)
    {
        column.CurrentFilterFunction = GridKnownFunction.NoFilter;
        column.CurrentFilterValue = string.Empty;
    }
    searchWhere = string.Empty;
    SearchGrid.MasterTableView.FilterExpression = string.Empty;
    SearchGrid.MasterTableView.Rebind();
    SearchGrid.Rebind();
}
protected void btnTrailerSave_Click(object sender, EventArgs e)
{
    string update = string.Empty;
    if (txtApptID.ReadOnly)
    {
        update = "UPDATE OpenTrailers SET ";
        update += "TrailerTypeID = '" + cboTrailerTrailerType.SelectedValue + "'";
        update += ", TrailerTypeDesc = '" + cboTrailerTrailerType.SelectedItem.Text + "'";
        update += ", RefField1='" + txtTrailerRef1.Text.TrimAndSafeDB() + "'";
        update += ", RefField2='" + txtTrailerRef2.Text.TrimAndSafeDB() + "'";
        update += ", RefField3='" + txtTrailerRef3.Text.TrimAndSafeDB() + "'";
        update += ", RefField4='" + txtTrailerRef4.Text.TrimAndSafeDB() + "'";
        update += ", RefField5='" + txtTrailerRef5.Text.TrimAndSafeDB() + "'";
        update += ", LocationID = '" + cboTrailerLocation.SelectedValue + "'";
        update += ", LocationDesc = '" + cboTrailerLocation.SelectedItem.Text + "'";
        update += " WHERE TrailerID='" + txtApptID.Text + "' AND CarrierID=" + cboTrailerCarrier.SelectedValue;
        update = string.Concat(update, " and ClientID=", Session["ClientID"].ToString(), " and AccountID=", Session["AccountID"].ToString(), " and WarehouseID=", Session["WarehouseID"].ToString());
    }
    else
    {
        update = "INSERT INTO OpenTrailers (ClientID, ClientName, AccountID, AccountName, WarehouseID, WarehouseName, CarrierID, CarrierDesc, TrailerID, TrailerTypeID, TrailerTypeDesc, RefField1, RefField2, RefField3, RefField4, RefField5, LocationID, LocationDesc, CreatedBy, CreatedDateTime, ModifiedBy, ModifiedDateTime) values (";
        update += Session["ClientID"].ToString() + ", ";
        update += "(Select ClientName from Client where ClientID=" + Session["ClientID"].ToString() + "), ";
        update += Session["AccountID"].ToString() + ", ";
        update += "(Select AccountName from Account where AccountID=" + Session["AccountID"].ToString() + "), ";
        update += Session["WarehouseID"].ToString() + ", ";
        update += "(Select WarehouseName from Warehouse where WarehouseID=" + Session["WarehouseID"].ToString() + "), ";
        update += cboTrailerCarrier.SelectedValue + ", ";
        update += "'" + cboTrailerCarrier.SelectedItem.Text + "', ";
        update += "'" + txtApptID.Text +"', ";
        update += "'" + cboTrailerTrailerType.SelectedValue + "', ";
        update += "'" + cboTrailerTrailerType.SelectedItem.Text + "', ";
        update += "'" + txtTrailerRef1.Text.TrimAndSafeDB() + "', ";
        update += "'" + txtTrailerRef2.Text.TrimAndSafeDB() + "', ";
        update += "'" + txtTrailerRef3.Text.TrimAndSafeDB() + "', ";
        update += "'" + txtTrailerRef4.Text.TrimAndSafeDB() + "', ";
        update += "'" + txtTrailerRef5.Text.TrimAndSafeDB() + "', ";
        update += "'" + cboTrailerLocation.SelectedValue + "', ";
        update += "'" + cboTrailerLocation.SelectedItem.Text + "', ";
        update += "'" + Session["UserID"].ToString() + "', ";
        update += "'" + DateTime.Now + "', ";
        update += "'" + Session["UserID"].ToString() + "', ";
        update += "'" + DateTime.Now + "') ";
    }
    SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DMSConnectionString"].ConnectionString);
    conn.Open();
    SqlTransaction trans = conn.BeginTransaction();
    SqlCommand cmd = new SqlCommand(update);
    cmd.Transaction = trans;
    try
    {
        cmd.Connection = conn;
        cmd.ExecuteNonQuery();
        trans.Commit();
    resetGrids();
    }
    catch (Exception ex)
    {
        RadAjaxManager1.Alert("An error occurred during the save: " + ex.Message);
        cmd.Dispose();
        hdnTrailerIndex.Value = "OPEN";
        trans.Rollback();
    }
    finally
    {
        cmd.Dispose();
        conn.Close();
        conn.Dispose();
    }
}
EJ
Top achievements
Rank 1
 asked on 18 Jan 2019
2 answers
93 views

I have a page where I need to:

  1. Display RadBinaryImages in a datalist.
  2. Click a button to open a RadWindow which contains a RadImageEditor to edit the image.
  3. User edits the image and clicks Save in the Editor, which saves and closes the window.
  4. When the window closes, refresh the datalist so the image is updated on the page.

I've got 1-3 working great, and am successfully able to send a command back to the parent page when the RadWindow closes. It's #4 that has me stumped. I'm working with a master page that has the RadAjaxManager on it, and on my content page there's a RadAjaxManagerProxy.

I'm able to change the Datalist to anything else if that helps. I just can't figure out how all of these pieces come together to make a part of my page refresh.

Jessica B.
Top achievements
Rank 1
 answered on 17 Jan 2019
1 answer
198 views

Hello Forum Members,

we have a problem with the JavaScript radconfirm dialog box.

On our local machine it is working fine. But on a customer windows server 2012, IIS8 with IE 

the buttons do not work properly. The debug console shows that it expects to call a .close method

but there is only a .Close method. So if we change that to .Close at runtime it works.

 

Any Suggestions?

 

Rumen
Telerik team
 answered on 17 Jan 2019
1 answer
552 views

I have a RadGrid with 700,000 rows.  I do not bind the RadGrid until the user runs a search function to filter the data.  If the filtered data returns only 1 row I would like to skip showing the the Radgrid and just open a web page that would show the information for the single record.  I can not figure out how to the get the DataKey for that single record.

I am thinking the logical place would be the PreRender event.  to get a row count in the prerender and if that row count was 1 then get the datakey and redirect to my edit page with the the data key as my QueryString. 

This is far as I can get with the code:

int count = RadGrid1.Items.Count;
            if (count == 1)
            {
                string a ="How can I get the datakey value for this 1 row ?"
            }
Perry
Top achievements
Rank 1
 answered on 17 Jan 2019
1 answer
115 views

Hi,

We have an old .NET 3.5 web-site that uses RadEditor for rich text editing operations. The last version of the Telerik DLLs was 2011.2.915.35 and with this configuration, the web-site functioned well until end of December.

Currently, the RadEditor is blocked when you try to open it and no text is rendered in edit mode. This is happening in all modern browsers including Edge except in IE11 where it works only in compatibility mode. I added the meta tag http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> and it only affects IE11.

I upgraded to a newer version 2014.1.403.35 also downloaded the latest trial build 2018.3.910.35 with no luck - the same behaviour.

 

Any ideas?

Rumen
Telerik team
 answered on 17 Jan 2019
8 answers
145 views
I have some charts in a master page site which display data in currency (£) terms.

The localisation quick fix  http://www.telerik.com/help/aspnet-ajax/htmlchart-accessibility-and-internationalization-localization.html  works fine, but in my master page site it fails and the default $ is displayed.

Does anybody know why a master page site messes this up?
Marin Bratanov
Telerik team
 answered on 17 Jan 2019
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?