Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
97 views
hi Telerik,

I try to recalculate the total height of the panel bar after its child item is expanded or collapsed and i did try the panel bar events like OnClientItemExpand/OnClientItemCollapse, OnClientClicked but in none of them i can get the real height of the panel bar since the panel bar always keeps the current height (not the actual height after child item expanded or collapsed)


function OnClientItemExpand(sender, args)
{
    var panelHeight = sender.get_element().offsetHeight; //always current height not after child item expanded
}

please help -- very appreciate!

thanks,

roger
roger
Top achievements
Rank 1
 asked on 29 May 2013
0 answers
81 views

My solution uses a splitbar to hide a upload button in the lower half of the pane and a listbox and a dropdownlistbox in the upper half of the same pane.  The splitbar should be collapsed upon page load, hiding the upload button.  What is the command for this?  I can place the command in the Page_load of the web page if I knew it.  Also, the splitbar should move down, collapse, to hide the upload button when the dropdownlistbox option is changed.  The splitbar should move up, expand, when the user completes the selection process by choosing a option in the listbox.  None of the animations are working. 

The control does work when coded within the vb codebehind but I am required to have it operate on the client side using jQuery.  In Firefox v21.0, Firebug gives me the following error:

 

TypeError: splitter.expand is not a function.  

I'm using Telerik RadControls for ASP.NET Ajax version 2013.1.220.40.  Thanks.

    $(function () {
 
        $('#<%= dropdwn.ClientID %>').change(function (e) {
 
            B_SelectedIndexChanged();
 
            resizePane(false)
            e.preventDefault();
        });
 
        $('#<%= Listbox.ClientID %>').change(function (e) {
 
            O_SelectedItemChanged();
 
            resizePane(true)
            e.preventDefault();
 
        });
 
});
 
function resizePane(source) {
 
        var splitter = $("#<%= HideUploadRadsplitbar.ClientID %>");
        var pane = $("#<%= FileUploadRadpane.ClientID %>");
 
        if (source = true) {
 
                splitter.expand();
 
        } else {
 
            pane.collapse();
 
        }
    }


Jermaine
Top achievements
Rank 1
 asked on 29 May 2013
3 answers
121 views
I have a Give Below Code for
webchart.dll

but i want same thing do in the RadChart

ColumnChart c = new ColumnChart();
        c.MaxColumnWidth = 20;
        c.Fill.Color = Color.Black;
        c.Fill.ForeColor = Color.Blue;
        c.Fill.Type = InteriorType.Hatch;
        c.Fill.HatchStyle = HatchStyle.Cross;
        c.Legend = "Date/Bill";
        SqlConnection conn = new SqlConnection(@"Data Source=.\SQL2005;Initial Catalog=OrderProcessAutomation;Persist Security Info=True;User ID=sa;Password=123456");
        conn.Open();
        string qry = "Rpt_DailyBillTrend";
        SqlCommand cmd = new SqlCommand(qry, conn);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@FromDate", txtFromDate.Text);
        cmd.Parameters.AddWithValue("@ToDate", txtToDate.Text);
        c.DataSource = cmd.ExecuteReader();
        c.DataXValueField = "Date";
        c.DataYValueField = "BillCount";
        c.DataBind();
        conn.Close();
        Chart1.Charts.Add(c);
        Chart1.Charts.Add(new LineChart(c.Data, Color.Black));
        Chart1.RedrawChart();
now how to do .. plzz help me out from this thing.. how to do with the radChart no external DataSource Wizard all things by the Coding only how to do
Petar Kirov
Telerik team
 answered on 29 May 2013
1 answer
87 views
Hello:

Here's the scenario. user defines a search via several radcomboboxes. The form is cleared, using the following javascript to clear the comboboxes selected:

function ResetComboBoxValue(ctrl, isDisable) {
    var combo = $find(ctrl);
    var input = combo.get_inputDomElement();
    if (combo != null) {
        combo._enabled = true;
        combo.trackChanges();
        combo.clearSelection();
        combo.set_emptyMessage(combo.get_emptyMessage());
        if (isDisable) {
            combo._enabled = false;
            input.readOnly = true;
        }
        combo.commitChanges();
    }
}

All that looks good until a postback is done then the previously selected values are "restored". I thought that by using the commitChanges() it would sync the client changes to the server to prevent the previous selected items from being restored. 

Thanks!
Will Lopez
Top achievements
Rank 1
 answered on 29 May 2013
2 answers
152 views
Hello, 
   I've disabled the embedded skins but the icons of the editor (neither Grid, nor Scheduler) are visible (images attached).

 According to Fiddler:

GET http://localhost:33228/App_Themes/Metro/%3C%=WebResource(%22Telerik.Web.UI.Skins.Metro.Grid.sprite.gif%22)%%3E
400 Bad Request (text/html)

The sprite images are in their right paths but it seems that the request is bad, it should ask for an image not "text/html", right?


Any help would be appreciated,
Miguel
tito miky
Top achievements
Rank 1
 answered on 29 May 2013
3 answers
69 views
I am attempting to recreate the Grid - Edit on Double-click in a SharePoint 2010 web part.  I have successfully added the script to the page using a ClientScriptManager in the PreRender method.  I also generate my RadAjaxManager in OnInit.

However, when I double click on an item I receive an error on the page, "'null' is null or not an object"

The line number it corresponds to in the page source is
$find("<%= RadGrid1.ClientID %>").get_masterTableView().editItem(editedRow);
within the RowDblClick function.

Any help would be appreciated.

Thanks!



Tsvetoslav
Telerik team
 answered on 29 May 2013
2 answers
206 views
I have the following code that has two checkboxes. Each displays a panel when it is clicked. The first checkbox is attached to a validator.
if the text is left empty and both checkboxes are clicked, and the submit button is clicked, the validation summary dispalys the error message twice. Why does it do that??
here is my markup. I have simplified it to the very bare minimum: 

<form id="Form1" method="post" runat="server" style="margin-left: 0px; margin-top: 0px">  

<asp:ScriptManager ID="scriptManager1" runat="server"></asp:ScriptManager>  

<telerik:RadAjaxManager ID="ajaxManager1" runat="server"> 

<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="chkMain">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="panelMain" />

</UpdatedControls>

 </telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="chkSub">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="panelSub" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
<asp:CheckBox ID="chkMain" runat="server" Checked="false" Text="main" AutoPostBack="true" OnCheckedChanged="chkMain_CheckedChanged" />
<asp:Panel ID="panelMain" runat="server" Visible="false">
<asp:TextBox ID="MainText" runat="server" />
<asp:RequiredFieldValidator ID="rv1" runat="server" ControlToValidate="MainText" ErrorMessage="required" />
</asp:Panel>
<asp:CheckBox ID="chkSub" runat="server" AutoPostBack="true" Checked="false" Text="sub" />
<asp:Panel ID="panelSub" runat="server" Visible="false">
Description
</asp:Panel>
<asp:Button ID="btnSubmit" CausesValidation="true" runat="server" Text="Submit"></asp:Button>
</form>

and my codebehind is very simple too:
 

protected void Page_Load(object sender, EventArgs e)  

{

}

protected void chkMain_CheckedChanged(object sender, EventArgs e)

{

panelMain.Visible = chkMain.Checked;

 }

Tim
Top achievements
Rank 1
 answered on 29 May 2013
3 answers
227 views
I know how to render a scheduler on a page and use GetAppointmentsInRange to get/count appointments, but how can I get that information programmatically without having to put a scheduler on a page? Based on the default schema. 

I have an application used for scheduling staff. Staff use appointments to mark when they are unavailable. I need to get a list of all staff that are unavailable during a certain time frame, but rendering a scheduler control with 2000 staff then calling GetAppointmentsInRange is too slow. Based on the schema and the way the scheduler control saves recurrence, is it possible to get a list of all appointments in a range without rendering the control? 

Here are my database columns, I only added one, "employeeID"

ID
Subject
Description
Start
End
RecurrenceRule
RecurrenceParentID
Reminder
Annotations
EmployeeID

So I need a command that will return all employeeID numbers that have appointments between 2 dates (a timeframe). Considering how recurrence is done by the radScheduler, what can I do to get this result? 

Thank you very much!
Genady Sergeev
Telerik team
 answered on 29 May 2013
1 answer
286 views
Instead of using the inherent AjaxUpdatedControl to do the server/client update, can I use jQuery to selectively update only the telerik grid and not carry a whole lot of viewstate etc.,
Viktor Tachev
Telerik team
 answered on 29 May 2013
2 answers
98 views
Hi I am using radasync upload to load files using this  Control  is there a way to remove the text box before the select button and i want to know why there is a text box because i want to save my page space and it is unnecessary on the page if we are not using and we cannot put any url in the text box to browse to some folder.
SKande
Top achievements
Rank 2
 answered on 29 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?