Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
I'm sure that would make a good name for a dance.

To see what I consider to be the problem go to any  image editor demo such as this one.
http://demos.telerik.com/aspnet-ajax/imageeditor/examples/overview/defaultcs.aspx

Click on the crop icon. The crop box appears at the top left of the image and the dialog box opens as well.
Move the crop box from the top left corner to somewhere around the center of the image.
Now try to resize the crop box using any of the nodes on the left side of the crop box.
You will see the crop box jump to the right of the image.

This seems to me to be a bug in the javascript code and should be very easy to fix. I'm not a javascript coder but I believe the offending code is in the ascx file that defines how the crop box works.
Vessy
Telerik team
 answered on 09 Dec 2014
7 answers
195 views
Hi,

I am currently evaluating my options for reading an iCalendar file and displaying it on the web in a read only format.

I am considering using the RadScheduler for this purpose, however in looking in the documentation, I don't see a way to import/read an iCalendar file for RadScheduler.

Is there such an option or could some custom code allow me to read an iCalendar file?

This iCalendar file will be updated periodically through WebDAV from Microsoft Exchange. Thanks.

Andre
Ricard Bertran Vall
Top achievements
Rank 1
 answered on 09 Dec 2014
7 answers
173 views
Hi All,

I'm trying to find a way to correctly hide the master table row if there are now details.

protected void myGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
 {


        if (!e.IsFromDetailTable)
        {
         myGrid.DataSource = GetMasterData(Val1, Val2);  // filter by values
        }
 }


protected voidmyGrid_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
        GridDataItem parentItem = e.DetailTableView.ParentItem as GridDataItem;
        if (parentItem.Edit)
        {
            return;
        }

        if (e.DetailTableView.Name == "ChildItems")
        {
            e.DetailTableView.DataSource = GetChildItems(int.Parse(parentItem.GetDataKeyValue("ID").ToString()), val1, val2, val3); // filter the rows off of other values
        }
}


Now my issue is that GetChildItems may return 0 rows if the filters don't return any matches.  I've tried looping over the data on a pre_render, but paging gets messed up because it's still part of the datasource.  I've seen that you have to remove it from the datasource, but how is that done if I only know if it should be removed after the detail is bound to it?


    protected void myGrid_PreRender(object sender, EventArgs e)
    {

       
        foreach (GridDataItem gdi in myGrid.MasterTableView.Items)
        {
            //LineCount is the count of child items that the parent actually has.
//so if the MasterData.ChildTable doesn't have items, but  it actually has lines in the DB, hide it.
            if (gdi.ChildItem.NestedTableViews[0].Items.Count == 0 && gdi["LineCount"].Text != "0")
            {
               //this messes up the paging.
                gdi.Display = false;
                gdi.ChildItem.Display = false;
            }
        }

Ideally I don't want to have to pass the child parameters into the GetMasterData() function.

Thanks in advanced.







Angel Petrov
Telerik team
 answered on 09 Dec 2014
2 answers
62 views
For some (big) images the scaling in the LightBox is not OK.

See attached screenshot.

Marc
Kostadin
Telerik team
 answered on 09 Dec 2014
5 answers
631 views
From telerik website:

Use the OnClientTabSelected property to specify a JavaScript function that will be executed after a tab is selected - either by left-clicking it with a mouse or hitting enter after tabbing to that tab.

Two parameters are passed to the handler

  • sender (the client-side RadTabStrip object)
  • eventArgs with one property
    • Tab - the instance of the selected tab

From my understanding, telerik will automatically pass 2 parameters to the handler, and we don't have to specify the parameters. However, what if I need to pass an extra parameter, something like below, how do I do it? 

function ClientTabSelectedHandler(sender, eventArgs, name) {
alert(name);
}

            <telerik:RadTabStrip ID="radTabStripTicketInfo" runat="server" 
                SelectedIndex="0" OnClientTabSelected="ClientTabSelectedHandler(sender, eventArgs, anotherControlID)">
                <Tabs>
                    <telerik:RadTab runat="server" Text="1" Selected="True">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="2">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="3">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
Eyup
Telerik team
 answered on 09 Dec 2014
1 answer
383 views
Hi,
There tons of sample for "get a control in an itemtemplate with javascript". But I have a problem.

I have a grid like below. When cbAllCanSelect is checked, I try to find all checkboxes in a column and check them all.

<telerik:RadGrid ID="rgOptions" runat="server" AutoGenerateColumns="False"
            ResolvedRenderMode="Classic" AllowMultiRowEdit="True">
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn DataField="KARAKTERTANIM"
                        FilterControlAltText="Filter column column" HeaderText="Option"
                        UniqueName="column">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn FilterControlAltText=""
                        HeaderText="Selection" UniqueName="TemplateColumn">
                        <ItemTemplate>
                            <asp:HiddenField ID="hfKarakter" runat="server" Value = '<%# Eval("KARAKTER") %>'/>
                            <asp:CheckBox ID="cbCanSelect" runat="server"   Checked = '<%#bool.Parse( Eval("CANSELECT").ToString()) %>'/>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <telerik:RadButton ID="cbAllCanSelect" runat="server" ToggleType="CustomToggle" ButtonType="ToggleButton"
               AutoPostBack="false" onclienttogglestatechanged="toggleCanSelectCheckBoxes">
               <ToggleStates>
                    <telerik:RadButtonToggleState Text="" PrimaryIconCssClass="rbToggleCheckbox">
                    </telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text=""  PrimaryIconCssClass="rbToggleCheckboxFilled">
                    </telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text=""  PrimaryIconCssClass="rbToggleCheckboxChecked">
                    </telerik:RadButtonToggleState>
               </ToggleStates>
          </telerik:RadButton>
                        </HeaderTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>



My script (ignore button toogle and just check them all):

function toggleCanSelectCheckBoxes(sender, args) {
            //alert(sender.get_selectedToggleState().get_index());
 
            var dataItems = $find('<%=rgOptions.ClientID%>').get_masterTableView().get_dataItems();
            for (var i = 0; i < dataItems.length; i++) {
                var cb = dataItems[i].findControl("cbCanSelect");
                alert(cb);
                if (cb != null)
                    cb.checked = true;
            }
        }



I cant find "cbCanSelect". "cb" is always return null.

What is my mistake?

Thanks a lot.
Eyup
Telerik team
 answered on 09 Dec 2014
4 answers
50 views
 Hello,

I have three radgirds in RadTabStrip (1 grid in 1 tab), I want to achive the resize to fit facility. so I have written following code with "AllowColumnResize='True' AllowRowResize='false' ResizeGridOnColumnResize='true' AllowResizeToFit='true'" property settings of grid.

var grdstQ = $find("<%= Grid1.ClientID %>");
                    var clmstQ = grdstQ.get_masterTableView().get_columns();
                    for (var i = 0; i < clmstQ.length; i++) {
                        clmstQ[i].resizeToFit(false, true);
                    }

I have applied the above code solution for all three grids, the first grid in tab working fine but columns in other two grids disappeared after apply the same solution.

Please suggest, I am not getting how to resolve this strange issue.

Thanks in advance.

Regards,
Vishal
vishal
Top achievements
Rank 1
 answered on 09 Dec 2014
2 answers
97 views
Can someone please explain why this code does nothing on my page? 


public partial class SettingsDialog : System.Web.UI.Page
{
 
    public RadSkinManager rsm;
 
    protected void Page_Load(object sender, EventArgs e)
    {
        rsm = new RadSkinManager();
        rsm.Skin = "Glow";
        Form.Controls.Add(rsm);
         
    }
}
Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 09 Dec 2014
7 answers
99 views
I am using the RadScheduler for a website that will display bar events. Many of these events will end after midnight. I am trying to avoid having such events appear across 2 days on the calendar when in Month or Week view. Is there a way to do this? Can the Scheduler be configured so that days start at 6:00AM and end at 5:59AM?

Thanks for any help.
Boyan Dimitrov
Telerik team
 answered on 09 Dec 2014
0 answers
88 views
Hi,
I have a database sql server on the remote web server, there are some tables that contain thousands of data on which I have to do some research display.
My question is the following, for example, using a control radcombobox, which technique is faster to load and display the data?

1) SqlDataSource
2) Entity datasouce
3) Web Service?

thanks
Fabio Cirillo
Top achievements
Rank 1
 asked on 09 Dec 2014
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?