Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
204 views
Hi , I am new with that technology. I am facing one problem when i am going to work with that editor.

What i need actually is given below:
1. Need to add a Button on Editor Header Which name should be "Insert layer"
2. When We Click this Button a fixed size Div will be added to the Editor Text Area.
3. And We should able to drag/drop the div in any where of the Text area of Editor.

Could you please give any idea and sample code or any link to do functionality as i have explained.

Thanks,
Rashim
Dobromir
Telerik team
 answered on 26 Sep 2011
4 answers
240 views
Hi,

I need to trigger file selection dialog based on some concrete event, afaik, currently I can trigger it if it's rendered as input, but same trick, obviously, doesn't work when control is rendered as <object> (multiple file selection case). Question is do you have, if not then consider as feature request, abilitiy to trigger file selection dialog from JS. In my current project I have flash object and we communicate through JS, I feel like something similar could be useful.

Thank you!
Genady Sergeev
Telerik team
 answered on 26 Sep 2011
1 answer
78 views
Hi,

I was looking for a way to disable the 'case sensitive' in column filters. Please help.

thanks,
Minh Bui
Jayesh Goyani
Top achievements
Rank 2
 answered on 26 Sep 2011
1 answer
142 views
INSERTCOMMAND in a RadGrid inside a Raddock is not firing!

I have a RadGrid inside a RadDock. I am doing some updating/inserting built in the RadGrid.

The RadGrid's ItemCommand fires ok when clicking to INIT insert.

However the ItemCommand, UpdateCommand / InsertCommand ARE NOT FIRING when clicking to perform Insert.
They fire OK if I just put the grid on the page (without the raddock), it works fine, but they won't fire if the grid is inside the raddock.

I need to know why this is happening.

Thanks,
Simone

 

 Source:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="WebForm4.aspx.cs" Inherits="SMTPro.WebForm4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadDockLayout runat="server" EnableViewState="false" ID="RadDockLayout1"
        StoreLayoutInViewState="false">
        <telerik:RadDock ID="rdRepAds" runat="server" Title="Ads" Width="600px" EnableAnimation="true"
            Skin="Office2010Silver" EnableRoundedCorners="true" Resizable="true" AutoPostBack="true">
            <ContentTemplate>
                <telerik:RadGrid ID="grdRepAds" runat="server" CellSpacing="0" GridLines="None" PageSize="20"
                    EnableViewState="true" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True"
                    OnItemCommand="grdRepAds_ItemCommand" OnItemDataBound="grdRepAds_ItemDataBound"
                    OnInsertCommand="grdRepAds_InsertCommand">
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <MasterTableView DataKeyNames="ID" CommandItemDisplay="Bottom" AutoGenerateColumns="False"
                        FilterExpression="Active = true">
                        <CommandItemTemplate>
                            <asp:LinkButton ID="btnInitInsert" runat="server" CommandName="InitInsert"><img style="border:0px;vertical-align:middle;" alt="" src="Images/AddRecord.gif" />Add new&nbsp;&nbsp;&nbsp;&nbsp;</asp:LinkButton>
                        </CommandItemTemplate>
                        <Columns>
                            <telerik:GridBoundColumn DataField="RepID" FilterControlWidth="130" HeaderText="RepID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="AdID" FilterControlWidth="130" HeaderText="AdID">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                    </HeaderContextMenu>
                </telerik:RadGrid>
            </ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockLayout>
</asp:Content>


 

 =============

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                using (var db = new mockupEntities())
                {
                    int repID;
                    repID = 7784;
                    var query = from sr in db.RepAds
                                where sr.RepID == repID
                                select sr;

                    grdRepAds.DataSource = query.ToList();
                    Session["dsRepAdsByRepID"] = query.ToList();
                }
            }
            else
            {
                grdRepAds.DataSource = Session["dsRepAdsByRepID"];
            }
        }

        protected void grdRepAds_ItemCommand(object sender, GridCommandEventArgs e)
        {
        }

        protected void grdRepAds_ItemDataBound(object sender, GridItemEventArgs e)
        {
        }

        protected void grdRepAds_InsertCommand(object sender, GridCommandEventArgs e)
        {
            //does not fire!!!!!!!!!
        }

 

Simone
Top achievements
Rank 1
 answered on 26 Sep 2011
1 answer
191 views
Hi,
I am trying to export RadGrid to PDF or Excel with CSS, I looked at the sampe at:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/pdfexport/defaultcs.aspx
and have the following questions:
(1) What ever css I apply to the grid for rendering will not apply for exporting, right?
(2) Can I use css class for exporting styles? The sample seems to use inline styling only
(3) Will the same styles for exporting pdf work with exporting for Excel?

Thanks

 
Daniel
Telerik team
 answered on 26 Sep 2011
12 answers
228 views
Hi,
   I have a few controls along witha  RadDatePicker in a grid.
When i click on the calender button, the calender opens exactly below the icon.
However, the calender opens miles below the icon when clicked after there is a postback on the grid.
 Any suggestions on how to keep this fixed would help. I am pasting my code below

<

 

telerik:RadDatePicker ID="Datepicker" runat="server" Skin="Vista" Width="100px" >

 

 

 

<DateInput ID="Date" runat="server"></DateInput>

 

 

 

<Calendar ID="CalDate" runat="server"  UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>

 

 

 

<DatePopupButton CssClass="rcCalPopup"></DatePopupButton>

 

 

 

</telerik:RadDatePicker>

 

 

 

 

This is most common in the controls in the edit mode of the grid.

Tsvetina
Telerik team
 answered on 26 Sep 2011
1 answer
59 views

I am trying to create a simple grd that will take a programmatically generated datatable and allow sorting in a usercontrol that is used in DotNetNuke.
My code:
Private dt As DataTable

Private WithEvents RadGrid1 As RadGrid

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
dt = New DataTable()
dt.Columns.Add("PMID")
dt.Columns.Add("BioText")
dt.Columns.Add("Version")
dt.Columns.Add("PMCID")
dt.Columns.Add("ManuscriptID")
dt.Columns.Add("DOI")
dt.Columns.Add("pii")
dt.Columns.Add("Authors")
dt.Columns.Add("ISOAbbreviation")
dt.Columns.Add("Year")


RadGrid1 = New RadGrid
RadGrid1.AutoGenerateColumns = True
RadGrid1.DataSource = dt
RadGrid1.AllowSorting = True
RadGrid1.Skin = "Outlook"
PlaceHolder1.Controls.Add(RadGrid1)

End Sub
Then I create the datatable from data that I get from a webservice. 
however when I click the column to sort all of the data disappears as if the Grid does not have any data source. I then added:

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
RadGrid1.DataSource = GetDataTable("")
End Sub
Public Function GetDataTable(ByVal query As String) As DataTable
Return dt
End Function

but that does not seem to help. I've searched the forums for hours but it seems that I cannot find a total solution. I'm not sure if I need to wrap my placeholder in a panel or not. All help is appreciated.
Thanks

Daniel
Telerik team
 answered on 26 Sep 2011
4 answers
78 views
Hi all,

I am using a RadTreeList with drag and drop enabled. This works fine.
Now I want to prevent items at the highest level from being dropped on another item. These items cannot be the child of another item.

How can I accomplish this?

I think I can prevent the dropping of certain items in the itemDragging, but I don't know how to access the dragged_item here.
Then I can do something like:
if (level of the dragged item  is zero) then args.set_canDrop(false);

Annet
annet
Top achievements
Rank 1
 answered on 26 Sep 2011
2 answers
93 views
Hi,
I've spent all day trying to get RadGrid to export to pdf with formatting, there are so many problems I can not resolve, my codes are based on : http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/pdfexport/defaultcs.aspx
Here is my ItemCreated event handler:
void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (isPdfExport)
    {
        GridItem item = e.Item as GridItem;
        switch (item.ItemType) //Mimic RadGrid appearance for the exported PDF file
        {
            case GridItemType.Item:
                item.Style["background-color"] = "#ffffff";
                item.Style["font-size"] = "12px";
                item.Cells[2].Style["width"] = "50px";
                break;
            case GridItemType.AlternatingItem:
                item.Style["background-color"] = "#eeeeee";
                item.Cells[2].Style["width"] = "50px";
                item.Style["font-size"] = "12px";
                break;
            case GridItemType.Header:
                for (int i = 0; i < item.Cells.Count; i++)
                {
                    item.Cells[2].Style["width"] = "50px";
                    item.Cells[i].Style["text-align"] = "left";
                    item.Cells[i].Style["background-color"] = "#010101";
                    item.Cells[i].Style["color"] = "#ffffff";
                }
                break;
            case GridItemType.Footer:
            case GridItemType.GroupHeader:
            case GridItemType.GroupFooter:
                break;
        }
    }
}
The major problems I have:
(1) Width does not work at all, every column has equal width on exported pdf no matter how I set them.
(2) Contents do not wrap, if the data source has columns to long to be fitted in a row, they got truncated or overlap with next column.
(3) Sometimes it simply throws exceptions if the data source has lengthy data, I suspect the data might contain html tags.
(4) How do I control the boders? I tried Style["border"] = "1px solid #000", no effects at all. 

Please help     

Daniel
Telerik team
 answered on 26 Sep 2011
2 answers
215 views
Hi,
  I have a treeview that cause automatically expand   the parent nodes when you click it on the Client in order to see their childs.
I would like to expand only one parent node at a time.If i expand another one the previous node should automatically collapsed?
How can I?

Nirmal
Srujana
Top achievements
Rank 1
 answered on 26 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?