Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
743 views
Hi,

I have a site that uses custom skins and also custom base style sheets for (almost) all controls (menu, combobox, grid...) so I added these two settings to the web.config:

<add key="Telerik.EnableEmbeddedSkins" value="false" />
<add key="Telerik.EnableEmbeddedBaseStylesheet" value="false" />

this works perfectly fine... but....

now I created an additional page within the main website that uses many controls (scheduler, combobox, grid...) that should use skins & base style sheets.

so my question:
is there a possibility to override the globally set values (from the web.config) for the whole .aspx page?
so that all controls on that page will use embedded skins & base style sheets?
(btw. I cannot use a separate web.config as the whole project is one application in a cms without physical folders...)

thank you very much!
Georgi Tunev
Telerik team
 answered on 24 May 2011
3 answers
90 views
Hi

I have a table that shows the following:

Id     DivisionId     LocationId
-------------------------------------
1      4                  10
2      4                  11
3      4                  12
4      4                  13

The Division Name and Location Name are stored in seperate tables and I can resolve these name easily using linqtosql (see below how i've done this with DivisionName)

<

 

 

Columns>

 

 

<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" UniqueName="ID">

 

</telerik:GridBoundColumn>

 

<telerik:GridBoundColumn DataField="Division.DivisionName" HeaderText="DivisionName">

 

 

</telerik:GridBoundColumn>

 

 


<
telerik:GridBoundColumn DataField="LocationID" HeaderText="LocationID">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

 


However, when you click edit/add, i need to be able to show the division names in a dropdown and the user simply selects the option (i also need to do this for location too, but i can replicate this functionality once i know how to do it)

I'm new to linqtosql and the radgrid so please bear that in mind when replying
I've looked at the linqtosql Crud opertations and i'm a little confused.
is there an edit tag, and can i put a dropdown in it and bind it to the division name
if so do you have any example code please?

I've tried using this but it doesn't work

 

 

<EditItemTemplate>

 

 

 

 

<telerik:RadComboBox DataTextField="Division.DivisionName" DataField="Division.DivisionName" ID="ddlDivisionName" runat="server" >

 

 

 

</telerik:RadComboBox>

 

 

 

 

<telerik:RadComboBox DataTextField="Location.LocationName" DataField="Location.LocationName" ID="ddlLocationName" runat="server" >

 

 

 

</telerik:RadComboBox>

 

 

 

</EditItemTemplate>

Thanks!

 

Radoslav
Telerik team
 answered on 24 May 2011
3 answers
91 views
Hi
I need to use in-line editing for the RadGrid and there is a GridDropcolumn involved also.My Grid Data source has four columns
1.CompProductId
2.ProductName
3.CompProdKeywordId
4.CompProdKeywordName

            
<telerik:RadGrid ID="radGridCompProdKeywords" GridLines="None" runat="server"
AllowAutomaticDeletes=
"True"
AllowAutomaticInserts=
"True" PageSize="10" AllowAutomaticUpdates="True" AllowPaging="false"
AutoGenerateColumns=
"False" OnUpdateCommand="radGridCompProdKeywords_ItemUpdated"
OnNeedDataSource="radGridCompProdKeywords_NeedDataSource"           
OnDeleteCommand=
"radGridCompProdKeywords_ItemDeleted"
OnInsertCommand=
"radGridCompProdKeywords_ItemInserted" Width="650px"
OnItemDataBound=
"radGridCompProdKeywords_ItemDataBound">
<MasterTableView EditMode=
"InPlace" Width="100%" CommandItemDisplay="Top" DataKeyNames=""
HorizontalAlign="NotSet" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType=
"ImageButton"
UniqueName=
"EditCommandColumn"> <ItemStyle CssClass="MyImageButton" />
</telerik:GridEditCommandColumn>
               <telerik:GridBoundColumn DataField=
"CompProdKeywordId"
HeaderText="CompProdKeywordId" SortExpression="CompProdKeywordId"
 UniqueName=
"columnCompProdKeywordId" ColumnEditorID="GridTextBoxCompProdKeywordId"
Visible="false">
</telerik:GridBoundColumn>
      <telerik:GridBoundColumn DataField=
"CompProductId" HeaderText="ProductId"
SortExpression=
"ProductId" UniqueName="CompProductId"
ColumnEditorID=
"GridTextBoxCompProductId" Visible="false">
                    </telerik:GridBoundColumn>
   <telerik:GridDropDownColumn DataField=
"ProductName" HeaderText="Company Product Name"
ListTextField=
"ProductName" ListValueField="CompProductId" UniqueName="columnCompProductName"
ColumnEditorID="GridDropDownColumnCompProdName" ListDataMember="ProductName">
                    </telerik:GridDropDownColumn>
                    <telerik:GridBoundColumn DataField=
"CompProdKeywordName"
HeaderText=
"Keyword" SortExpression="CompProdKeywordName"
 UniqueName=
"columnCompProdKeywordName" ColumnEditorID="GridTextBoxCompProdKeywordName">
                    </telerik:GridBoundColumn>
           <telerik:GridButtonColumn ConfirmText=
"Delete this product?"
ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton"
CommandName=
"Delete" Text="Delete" UniqueName="DeleteColumn">
<ItemStyle HorizontalAlign=
"Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>
               </Columns>
 </MasterTableView>
<ClientSettings>
 <ClientEvents OnRowDblClick=
"RowDblClick" />            </ClientSettings>     
 </telerik:RadGrid>

My issue is the Product Name column is not updated at all. Neither it is getting values in drop down also while doing in-line editing.
And also the Drop down is also not  showing even if I bring the data somehow in the Column.
Also if I am clicking on save, I can see that the Datasource of the Grid has value in ProductName column but while refreshing the data from the column goes away.

I have seen all the examplles of inline editing. But nothing is helping.
Could you please help me out.

Regards
Harsh


Hus Damen
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
51 views

Hi,

We are trying to change the color of the filterItem when there is a filter in the grid(dynamicaly created).  It all seems to work fine but when one of the grid columns is filtered with the "Is Empty" function the color does not apply.  The code works fine and if a column is using a filterTemplate this column has the color applied correctly but the color is ignored by the other columns.

Here is the code that we use to make the filterItem change color when filter is applied :

using System;
using System.Collections;
using System.IO;
using System.Web.UI;
using CommonTools;
using Telerik.Web.UI;
namespace CCO.Fortress.MainWebApplication.Library.Helpers
{
     private void OnPageLoadComplete(object sender, EventArgs e)
        {
            FortressGrid.MasterTableView.AllowMultiColumnSorting = true;
            GridItem[] gridFilteringItems = FortressGrid.MasterTableView.GetItems(GridItemType.FilteringItem);
            if (gridFilteringItems.Length > 0)
            {      
                GridFilteringItem filteringItem = (GridFilteringItem)gridFilteringItems[0];
                foreach (GridColumn column in FortressGrid.MasterTableView.Columns)
                {
                    if (column.CurrentFilterValue != string.Empty)
                    {
                        Control control = filteringItem[column.UniqueName].Controls[0];
                        if(control is WebControl)
                        {
                            ((WebControl)control).BackColor = Color.PaleTurquoise;
                        }
                    }
                }
            }
        }
}

Thx for your help,
Guillaume

Pavel
Telerik team
 answered on 24 May 2011
3 answers
113 views
I need my scheduler to have a full 24 hour day as im using it for booking details (a band could be preforming at 1am)

eg  start time - 24:00
end time 23:59

so ive used these settings

DayStartTime="24:00:00" DayEndTime="23:59:00"   

when i run it, I get this error

Microsoft JScript runtime error: Unable to get value of the property 'cells': object is null or undefined
 on this line

l.cellWidth=l.targetRect.width/l.rows[0].cells.length;

so there seems to be a problem when creating the cells in the scheduler.  How can I set it up to use a 24 hour day ?


Stuart Hemming
Top achievements
Rank 2
 answered on 24 May 2011
1 answer
118 views
Hi all,

    I have a doubt in radWindow. I am having 3 pages.
    1. Master Page
    2.Content Page
    3. RadWindow.


My scenario is when the user clicks the link which is in master page. Then a radWindow will appear the navigateURL property points out an aspx page which uses the masterpage. So the radWindow loads both content page and master page but i need only the content page to display. Is there any solution?


Thanks in Advance.
Georgi Tunev
Telerik team
 answered on 24 May 2011
8 answers
950 views
Hi All

Have a radgrid with which works fine.

I have set the PageSize="6", AllowPaging ="true", then in PagerSytle have set AlwaysVisible="true". have set the grid height="250px".

But there are only 2 records in the grid. So the footer is displayed below the 2 records.

have attached an screen shot.

Is there any option to rectify this.

-Anto



Pavlina
Telerik team
 answered on 24 May 2011
1 answer
90 views
Hi,

Here I need to add some little text at cursor location into RadEditor's content on click of radbutton.

E.g.

If I have some text "My name is Kaushal Jani", also my cursor is between "Kaushal" and "Jani" and I clicked on RadButton than sample/some text "Hi" should place between that both words. Result will be "My name is Kaushal Hi Jani".

Is there any event or method by which I can locate some text to radeditor (specific to cursor location)?

Thanks & Regards,

Kaushal Jani
Rumen
Telerik team
 answered on 24 May 2011
1 answer
82 views
Hi ,

I am using RadDatePicker control inside the Gridview.
I have three operation on Gridview row:- Insert, Edit,Delete.
I am able to insert 10 records but when i insert 11th record i got the javascript runtime error. See Attachmenet Error.png
I am using two RadDatePicker. When i remove both the RadDatePicker control from Gridview my application ran successfully.
So RadDatePicker cause the error.
When i remove one of the two RadDatePicker control, I got same error on the insertion of 21st record instead of 11th record.
Please see the attachment for error.
Below is the designcode.

1st RadControl

<

 

asp:TemplateField meta:resourcekey="TemplateField3">

 

 

<EditItemTemplate>

 

 

 

<radCln:RadDatePicker ID="txtPriceValidFrom" runat="server" DbSelectedDate='<%# Bind("ValidFrom") %>' ControlContext="Product" RequiredPermission="EditProduct">

 

 

<Calendar ID="Calendar3" runat="server">

 

 

 

<SpecialDays>

 

 

 

<radCln:RadCalendarDay Repeatable="Today" Date="">

 

 

 

<ItemStyle CssClass="radCalendarTodayBackground" />

 

 

 

</radCln:RadCalendarDay>

 

 

 

</SpecialDays>

 

 

 

</Calendar>

 

 

 

<DateInput CssClass="TextBoxDays"></DateInput>

 

 

<PopupButton CssClass="radPopupImage" ImageUrl="~/images/icons/calendar.gif" HoverImageUrl="~/images/icons/calendar.gif"></PopupButton>

 

 

</radCln:RadDatePicker>

 

 

</EditItemTemplate>

 

 

<HeaderTemplate>

 

 

<asp:Label runat="server" Text="Valid from" ID="lblValidFromHeader" meta:resourceKey="Label31"></asp:Label>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" Text='<%# Bind("ValidFrom") %>' ID="lblValidFrom" meta:resourceKey="lblValidFrom"></asp:Label>

 

 

</ItemTemplate>

 

 

</asp:TemplateField>

 


2nd Radcontrol

<

 

asp:TemplateField meta:resourcekey="TemplateField4">

 

 

<EditItemTemplate>

 

 

<radCln:RadDatePicker ID="txtPriceValidTo" runat="server" DbSelectedDate='<%# Bind("ValidTo") %>'

 

 

ControlContext="Product" RequiredPermission="EditProduct">

 

 

<Calendar ID="Calendar4" runat="server">

 

 

<SpecialDays>

 

 

<radCln:RadCalendarDay Repeatable="Today" Date="">

 

 

<ItemStyle CssClass="radCalendarTodayBackground" />

 

 

</radCln:RadCalendarDay>

 

 

</SpecialDays>

 

 

</Calendar>

 

 

<DateInput CssClass="TextBoxDays">

 

 

</DateInput>

 

 

<PopupButton CssClass="radPopupImage" ImageUrl="~/images/icons/calendar.gif" HoverImageUrl="~/images/icons/calendar.gif">

 

 

</PopupButton>

 

 

</radCln:RadDatePicker>

 

 

</EditItemTemplate>

 

 

<HeaderTemplate>

 

 

<asp:Label runat="server" Text="Valid until" ID="lblValidUntil" meta:resourceKey="Label32"></asp:Label>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" Text='<%# Bind("ValidTo") %>' ID="lblValidTo" meta:resourceKey="lblValidTo"></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle VerticalAlign="Middle" />

 

 

</asp:TemplateField>

 

Tsvetoslav
Telerik team
 answered on 24 May 2011
1 answer
114 views
Hello ,
I'm using RadEditor as TextBox , and i want to disable drag and drop function to prevent add images .
any ideas ??
Thanks.
Rumen
Telerik team
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?