Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
180 views
Hello,

I need to render a RadMenu from code behind; I would like to do simply calling a sub (will be responsible to generate the menu) but I did not find anything similar around.
The call will be something like:
BuildMenu()

This sub will do the following:

Define the root menu and build the submenu for each root.

How can I acheive this?
Thanks
Kate
Telerik team
 answered on 26 Jul 2011
2 answers
95 views
I'd need to display an Export to Pdf icon to the RadGrid control (CommandItemSettings.ShowExportToPdfButton = true) but with a custom implementation of my own as I'm using an external tool for the export to pdf.

How would that be possible to overwrite the default PdfExport functionality?

Please advise.

Many thanks,

Pooya
Top achievements
Rank 1
 answered on 26 Jul 2011
4 answers
193 views
Hello everybody,
I have seen many posts and comments about this but none do works,
I have a RadGrid with a GridDropDownColumn, I tend to make it invisible in Edit Mode(when I click Edit Button of selected row) under specific Condition in Code Behind.It is not in Inplace Mode.Here Is My Source Code :
I want to hide "SiteOwnerId" under Specific Condition.
<telerik:RadGrid ID="RadGridUserInfo" CssClass="myRadGrid" GridLines="None" runat="server"
  
AllowAutomaticDeletes="True" PageSize="12" AllowPaging="True" AutoGenerateColumns="False"
  
OnItemUpdated="RadGridUserInfo_ItemUpdated" OnItemDeleted="RadGridUserInfo_ItemDeleted"
  
OnItemInserted="RadGridUserInfo_ItemInserted" OnDataBound="RadGridUserInfo_DataBound"
  
AllowFilteringByColumn="True" OnItemCreated="RadGridUserInfo_ItemCreated" OnInsertCommand="RadGridUserInfo_InsertCommand"
  
OnUpdateCommand="RadGridUserInfo_UpdateCommand" OnNeedDataSource="RadGridUserInfo_NeedDataSource"
  
OnEditCommand="RadGridUserInfo_EditCommand" OnItemDataBound="RadGridUserInfo_ItemDataBound"
  
OnDeleteCommand="RadGridUserInfo_DeleteCommand" 
  
oncolumncreated="RadGridUserInfo_ColumnCreated">
  
<SelectedItemStyle Font-Names="Tahoma" Font-Size="11px" ForeColor="#8abe23" />
  
<MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="UserInfoId"
  
HorizontalAlign="NotSet" AutoGenerateColumns="False" Font-Names="Tahoma" EditFormSettings-FormStyle-ForeColor="Black"
  
Font-Size="11px">
  
<CommandItemTemplate>
  
<div style="padding: 5px 5px;" dir="rtl">
  
asp:LinkButton ID="LinkButton4" runat="server" Font-Names="Tahoma" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Icons/Refresh.gif" />به روزآوري اطلاعات</asp:LinkButton>
  
</div>
  
</CommandItemTemplate>
  
<Columns>
  
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
  
<ItemStyle CssClass="MyImageButton" />
  
</telerik:GridEditCommandColumn>
  
<telerik:GridButtonColumn ConfirmText="آيا از حذف ركورد جاري مطمئنيد؟" ConfirmDialogType="RadWindow"
  
ConfirmTitle="حذف ركورد جاري" ButtonType="ImageButton" CommandName="Delete" Text="حذف"
  
UniqueName="DeleteColumn">
  
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
  
</telerik:GridButtonColumn>
  
<telerik:GridDropDownColumn DataField="SiteOwnerId" EditFormColumnIndex="1" HeaderText="شركت فروشنده پنل"
  
UniqueName="SiteOwnerId" ListTextField="SiteOwnerName" ListValueField="SiteOwnerId"
  
DataSourceID="sds_SiteOwner" ColumnEditorID="GridDropDownEditor">
  
</telerik:GridDropDownColumn>
  
</Columns>
  
<EditFormSettings ColumnNumber="3" CaptionDataField="UserInfoId" CaptionFormatString="ويرايش اطلاعات"
  
InsertCaption="">
  
<EditColumn ButtonType="ImageButton" InsertText="ثبت پنل" UpdateText="ويرايش پنل"
  
UniqueName="EditCommandColumn1" CancelText="لغو ويرايش">
  
</EditColumn>
  
</EditFormSettings>
  
</MasterTableView>
  
</telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 26 Jul 2011
5 answers
176 views
Hi All,

I have a requirement of having a async upload control with binary image control on a user control and this user control will be attached with an aspx file. So the issue here is the "FileUploaded" event is not triggered; when i select the file thereby, i was not able to display the thumbnail in binary image control. As guided in the online demo, i've added the ajax manager & respective javascript; but it throws a java script error.

Can anyone has faced this issue and has a solution? Please share

Cheers,
Sathish. R
Peter Filipov
Telerik team
 answered on 26 Jul 2011
0 answers
51 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
163 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
111 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
148 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
361 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
113 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?