Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
67 views
Hi,

    I have put "telerik:RadAjaxMAnager" in .aspx page,
    I have created one user defined control, it contains asp:button, when "OnClientClick" event fires at that time it gives "Microsoft JScript runtime error: Object expected" error.
    I have used this control in RadScheduler "<AdvancedInsertTemplate>" and "<AdvancedEditTemplate>" tag.

    Can anyone help us for this issue?
    
umesh prajapati
Top achievements
Rank 1
 asked on 26 Jul 2011
1 answer
174 views
I'm going crazy and I'm not sure what the problem is.

Here is my situation:
My main page (aspx) contains two usercontrol (ascx)
first one is basically a tree. second one is a radgrid and some textbox I fill on row selection itemcommand.

The second one is dinamically loaded depending on tree's node value has a radgrid. I mean, I load different ascx by the node's value but they all are a radgrid and textboxes.

main Page
<td>
<qsf:RTV runat="server" ID="CatTree1" ></qsf:RTV>
</td>
                                     
<td style="width:80%;vertical-align:top">
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:PlaceHolder ID="PlaceHolder_UC" runat="server"></asp:PlaceHolder>
</ContentTemplate>
                                             
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CatTree1" />
</Triggers>
</asp:UpdatePanel>                                      
</td>

PlaceHolder_UC is dinamically loaded this way


function AAAAAAA()....
Dim UControl As Control
If ....
  controlPath = "Arrangements2.ascx"
End If
 
UControl = CType(LoadControl(controlPath), UserControl)
 
If controlPath <> "" Then
  If Not (UControl Is Nothing) Then
 'ascx dinamically attached
  PlaceHolder_UC.Controls.Clear()
  PlaceHolder_UC.Controls.Add(UControl)
  .....
  Dim myUC As ASP.Arrangements2 = DirectCast(tempControl, ASP.Arrangements2)
 
  'here I Call function on second ascx, fill radgrid whit data
  myUC.InitControl(value)
  ....
 
  End If
End If



I call AAAAAAA on the nodeclick event catch on the aspx raised by my first ascx
Ascx2 radgrid is filled, i click on the rows, itemcommand fires, I fill the textboxes. everything is ok

here come my problem
I click on a different tree's node, AAAAAAA is called, ascx2 radgrid is filled with a new set of data, i click on the rows and itemcommand never fires

here's my ascx2 (summaring)
<asp:UpdatePanel ID="UpdatePanelAscx" runat="server" UpdateMode="Conditional">
<ContentTemplate>
 
<telerik:RadGrid    ID="RadGridArrangement"
 runat="server"
OnItemCommand="RadGridArrangement_ItemCommand"
>
 
.....
<ClientSettings enablePostBackOnRowClick="True">                      
    <Selecting AllowRowSelect="True" />
</ClientSettings>
 
 
 
.........
<Triggers>
 <asp:AsyncPostBackTrigger ControlID="RadGridArrangement" EventName="OnItemCommand" />
</Triggers>
</asp:UpdatePanel>

Thank you
Vasil
Telerik team
 answered on 26 Jul 2011
7 answers
117 views

Hi,

How do I go about finding a control in the AppointmentDelete? I;ve tried

 

e.Appointment.AppointmentControls[0].FindControl[

 

"txtname"].

I know how to do it in the

 

RadScheduler1_FormCreated

Thanks

Karl
Top achievements
Rank 1
 answered on 26 Jul 2011
1 answer
171 views
Hello everyone

I have a Telerik RadGrid on a page that uses an asp ObjectDataSource.  This is a search page, and the user selects some options from drop down lists etc and then clicks a Search button.  The ObjectDataSource uses a SelectMethod to retrieve the data from the database based on the parameters.  I have set a breakpoint here and the ObjectDataSource returns the correct dataset.  However the grid does not update.  I have set AllowPaging = true, and if I change the page size, the grid updates with the correct data.

Many thanks for your help

Grid
<telerik:RadGrid ID="alarms" runat="server" CssClass="gridview" AllowAutomaticUpdates="true"
        AutoGenerateColumns="false" OnItemDataBound="AlarmDataBound" AllowPaging="true" AllowSorting="true"
        AllowMultiRowSelection="true" PagerStyle-Mode="NextPrevAndNumeric" PagerStyle-AlwaysVisible="true">
    <MasterTableView>
        <Columns>
            <Columns removed>
        </Columns>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true">
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
    <SelectedItemStyle CssClass="selected" />
    <AlternatingItemStyle CssClass="even" />
</telerik:RadGrid>

DataSource
<asp:ObjectDataSource ID="alarmData" runat="server"
     SelectMethod="GetAlarmData" TypeName="******.AlarmManagement" >
</asp:ObjectDataSource>

DataSource SelectMethod
public DataSet GetAlarmData(string dummy)
{
    using (SqlConnection connection = new SqlConnection(connString.ConnectionString))
    {
        try
        {
            connection.Open();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();
            // Get the data based on search criteria
              
            da.Fill(ds);
            return ds;
        }
        catch (SqlException ex)
        {
            // Log the error
            return null;
        }
        finally
        {
            connection.Close();
        }
    }
}
Fletch
Top achievements
Rank 1
 answered on 26 Jul 2011
15 answers
379 views
Hi,

I have radscriptmanager + radcompression combining and zipping up resources tremendously well on my dev environment.

Yet despite painstakingly checking web.config / code, only the combine (not compression) works on my test server. 

Obviously something is amiss, but do you have any ideas (IIS 7 settings?) what could be stopping this as sure code is synced and struggling to see where to look.

Thanks
Matt
Pavel
Telerik team
 answered on 26 Jul 2011
1 answer
118 views

Below code is placed in page  designer (page level).

<

 

telerik:RadScriptBlock runat="server" ID="RadScriptBlock2">

 

 

 

function

 

openFormReserve() {

 

 

    var dock = $find("<%= RadDock3.ClientID %>");

 

 

    // Center the RadDock on the screen

 

 

    var viewPort = $telerik.getViewPortSize();

 

 

    var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);

 

 

    var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);

 

    $telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });

    dock.set_closed(

false);

 

 

    //var descriptionTextBox = $get('<%= ComboFacility.ClientID %>');

 

    Sys.Application.remove_load(openFormReserve);


}

 

 

</telerik:RadScriptBlock>


If I placed this javascript function in Javascript file (Sample.js) and assing link to this js file.

During executing script, the first line of javascript function get the null value.
var dock = $find("<%= RadDock3.ClientID %>");

Main reason is I do not want to place this javascript function at page level, and placing it js file. then How can i get the radcontrol object in javascript function.

Please do provide small sample example.

Thanks and Regards


 

Slav
Telerik team
 answered on 26 Jul 2011
2 answers
120 views
I've made a UserControl containing a RadTreeView; when it is embeded in a webform it works perfectly. But when I embed my userControl in a RadWindow the dotted lines that appear when you drag'n drop nodes disappear (when

EnableDragAndDropBetweenNodes=true)

 

 

!
Do you have an idea of what could cause that problem?

jc mag
Top achievements
Rank 1
 answered on 26 Jul 2011
3 answers
255 views
Is there a way to automatically save the file when the save command is clicked without showing the dialog?  Possibly the best thing would be for me to override the behaviour of some of the commands.  Is this possible?

On a side note:  I get a javascript error when I start typing in the crop width or height dialog.  I was trying to type 100. I selected the current value in the height textbox, type the 1, and it gets the error.
Niko
Telerik team
 answered on 26 Jul 2011
1 answer
103 views
I use Q2 version new skins like

<

 

 

telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Office2010Silver" MultiPageID="MulProfDesPage"

 

 

 

SelectedIndex="0"

 

 

 

ShowBaseLine="True">

 

 

 

<Tabs>

 

 

 

<telerik:RadTab Text="Create Profile" Selected="True">

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab Text="Edit Profile">

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab Text="Inherit Profile">

 

 

 

</telerik:RadTab>

 

 

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

It shows error page - here I have attach......
How to clear this?

 

Bozhidar
Telerik team
 answered on 26 Jul 2011
3 answers
234 views
Hi Support,
      I'm currently doing a popup for my data selection, this popup is a usercontrol with radgrid inside,
when i use this popup usercontrol inside another usercontrol , I'm encountering a problem,
On the first load / display of the popup the paging ,filtering and rowclick work well but when i press the paging button then use the filtering or the rowclick the grid not response anymore and when i try to check on the error console of the firefox I got the error tableView is null


regards,
Pavlina
Telerik team
 answered on 26 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?