Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
217 views
Is there a way to set the ! icon inside the RadDatePicker control using JavaScript?
Princy
Top achievements
Rank 2
 answered on 17 Jan 2014
5 answers
147 views
Hello,

I am using the Filterexpressions to filter a Grid depending of an DropDownList.

Here is the Code from the GridView:
<telerik:RadGrid ID="ContactsGrid" runat="server" AllowAutomaticDeletes="True"
                            AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True"
                            AllowSorting="True" Culture="de-DE" DataSourceID="contacts"
                            GridLines="None" Height="100%" OnItemCreated="ContactsGrid_ItemCreated"
                            OnItemInserted="ContactsGrid_ItemInserted"
                                OnPreRender="ContactsGrid_PreRender"
                                onneeddatasource="ContactsGrid_NeedDataSource"                                
                                onitemdatabound="ContactsGrid_ItemDataBound">                               
                            <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top"
                                DataKeyNames="ContactsID" DataSourceID="contacts" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton"
                                        UniqueName="EditCommandColumn">
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridBoundColumn DataField="ContactsID" DataType="System.Int32"
                                        FilterControlAltText="Filter ContactsID column" HeaderText="ContactsID"
                                        SortExpression="ContactsID" UniqueName="ContactsID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CustomerID" DataType="System.Int32"
                                        FilterControlAltText="Filter CustomerID column" HeaderText="CustomerID"
                                        SortExpression="CustomerID" UniqueName="CustomerID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Name" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter Name column" HeaderText="Name"
                                        SortExpression="Name" UniqueName="Name">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Lastname" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter Lastname column" HeaderText="Lastname"
                                        SortExpression="Lastname" UniqueName="Lastname">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Telephone" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter Telephone column" HeaderText="Telephone"
                                        SortExpression="Telephone" UniqueName="Telephone">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Mobile" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter Mobile column" HeaderText="Mobile"
                                        SortExpression="Mobile" UniqueName="Mobile" AutoPostBackOnFilter="False">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="E_Mail" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter E_Mail column" HeaderText="E_Mail"
                                        SortExpression="E_Mail" UniqueName="E_Mail">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Fax" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter Fax column" HeaderText="Fax" SortExpression="Fax"
                                        UniqueName="Fax">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Department" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter Department column" HeaderText="Department"
                                        SortExpression="Department" UniqueName="Department">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Notification" DataFormatString="<nobr>{0}</nobr>"
                                        FilterControlAltText="Filter Notification column" HeaderText="Notification"
                                        SortExpression="Notification" UniqueName="Notification">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
                                        Text="Delete" />
                                </Columns>
                                <EditFormSettings>
                                    <EditColumn ButtonType="ImageButton" />
                                </EditFormSettings>
                            </MasterTableView>
                            <ClientSettings>
                                <Selecting AllowRowSelect="True"></Selecting>
                            </ClientSettings>
                        </telerik:RadGrid>

In the SelectedIndexChanged-Event from the DropDownList i have this code:

ContactsGrid.MasterTableView.FilterExpression = "it.CustomerID = " + e.Index;
ContactsGrid.MasterTableView.Rebind();

When i now Change the DropDownList and the Grid is filtered, the paging disappears and i only see the first page wich show 10 records. But there are more than 10 records that match in the filterexpression.

How can i enable the paging again?

Kind regards
Lukas
Princy
Top achievements
Rank 2
 answered on 17 Jan 2014
5 answers
316 views
I created RadPanelItem dynamicly an add a CheckBoxList with this code
// Create a RadPnaleItem and set the Text to SelectionTitle.
RadPanelItem radPanelItemSelection = new RadPanelItem();
radPanelItemSelection.Text = row["SelectionTitle"].ToString();
 
// Expand only the first selection.
if (selectionNumber == 1)
{
    radPanelItemSelection.Expanded = true;
}
else
{
    radPanelItemSelection.Expanded = false;
}
 
// Create anothet RadPanelItem and add the CheckBoxList.
RadPanelItem radPanelItemCheckBoxList = new RadPanelItem();
radPanelItemCheckBoxList.Controls.Add(checkBoxList);
radPanelItemSelection.Items.Add(radPanelItemCheckBoxList);
 
// Add the RadPanelItem to the RadPanelBar.
rpbFilters.Items.Add(radPanelItemSelection);
This piece of code is run inside a loop so that will be more than one RadPanelItem on the RadPanelBar.

I now try to access the CheckBoxList an read them out, but some how I can't get to the CheckBocList's. I have tried different options. Please help

RadPanelItem radPanelItem = rpbFilters.Items[0];
CheckBoxList checkBoxList = (CheckBoxList)radPanelItem.FindControl("cblSelect1");
var radPanelItems = rpbFilters.GetAllItems();
 
foreach (RadPanelItem item in radPanelItems)
{
    RadPanelItem radPanelItem = item.Items[0];
    CheckBoxList checkBoxList = (CheckBoxList)radPanelItem.FindControl("cblSelect1");
}

Anders Pedersen
Shinu
Top achievements
Rank 2
 answered on 17 Jan 2014
5 answers
155 views
Hi All,

I would like to apply changes to multiple columns on ItemDataBound.  I am familiar with:
GridDataItem dataItem = e.Item as GridDataItem;
dataItem["Column_Name"].text = //Apply Formatting here;

Is there anyway to wildcard that?  For example something like "dataItem[*].text " or do I have to do each individual column?

Thanks,
Mark




Shinu
Top achievements
Rank 2
 answered on 17 Jan 2014
5 answers
905 views
Hi, 
 I'm expecting something like raddropdowntree.selectedvalues or similar, but I couldn't find one. And also,is there any way to add items just like regular dropdown, like raddropdowntree.items.add()?

Thanks!
Shinu
Top achievements
Rank 2
 answered on 17 Jan 2014
3 answers
1.2K+ views

I'm getting an error "Conversion from type 'DBNull' to type 'Boolean' is not valid." upon displaying an insert form inside a RadGrid that has two RadButton controls with the ToggleType="Checkbox" that have the Checked property being bound from a database.

<telerik:RadButton ID="RXRequired" runat="server" ForeColor="White"

   
AutoPostBack="false"
ButtonType="ToggleButton" Checked='<%# Bind("RXRequired")%>'

    ToggleType="CheckBox" EnableViewState="true" >

    <ToggleStates>

         <telerik:RadButtonToggleState PrimaryIconCssClass="rbRemove" />

         <telerik:RadButtonToggleState PrimaryIconCssClass="rbOk" Selected="true" />

    </ToggleStates>

</telerik:RadButton>

I have seen numerous posts all over the web regarding DBNull values and checkboxes upon initiating a form insert with the Bind statement. This apparently has been going on for many, many years. This is truly amazing that this is still an issue today, many years later! When the hell is Telerik going to fix this issue with their controls? Come on guys, fix this already!!! This is a real simple thing to do, why should this still be an issue?


This is insane already. FIX IT!!!!!!!!!!!!!!!!!!!!!!

Steve
Top achievements
Rank 1
 answered on 16 Jan 2014
3 answers
249 views
Hi all,

I have a SQL Data Source with three columns for simplicity (Organization_Name, Organization_ID, Organization_Parent_ID).

I am receiving the following error, "This constraint cannot be enabled as not all values have corresponding parent values."  This makes sense as some of the Organization_Parent_ID values are null.  How can I circumvent this error message, showing all of the parent organizations with their children underneath?

It should look something like this:

Organization_A
Organization_B
Organization_C
Organization_D
          Sub_Organization_A
          Sub_Organization_B
Organization_E

I see in the Object Data Source example in this link that there are multiple root level items as well.

Thanks,
Mark




Mark
Top achievements
Rank 1
 answered on 16 Jan 2014
2 answers
192 views
Hi,
I am using a RadWindow to display the RadMediaPlayer. It all works fine until I close the RadWindow; the sound track from the YouTube clip keeps playing. How can I stop the YouTube clip completely when the RadWindow is closed?
Thanks
Rob
Rob
Top achievements
Rank 2
 answered on 16 Jan 2014
10 answers
251 views

Hi

i use Following code : (RadControls for ASP.NET Q3 2010)


                var oWindow = window.radopen(navigateUrl, null);
                oWindow.setSize(winWidth, winHeight);
                oWindow.set_title(winTitle);
                oWindow.add_pageLoad(function () { oWindow.set_status(" "); });
                oWindow.center();

and config of RadWindowManager :

            <telerik:RadWindowManager ID="RadWindowManager" runat="server"
                Skin="Vista" Behavior="Close, Move, Resize, Minimize, Maximize, Reload"
                OnClientClose="OnClientClose" Width="1280px" Height="1024px"
                VisibleStatusbar="true" RestrictionZoneID="fullheightcontainer"
                ShowContentDuringLoad="true" DestroyOnClose="true" MinimizeZoneID="MinimizeBar">
            </telerik:RadWindowManager>

this code work correctly on IE but when i use it in firefox , oWindow.setSize doesn't work
and show all window in Width="1280px" Height="1024px" resolution!!!!


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

also i have a question about following script :

// Get instance from Parent RadWindowManager
function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow)
        oWindow = window.radWindow;
    else if (window.frameElement.radWindow)
        oWindow = window.frameElement.radWindow;
    return oWindow;
}

function ShowModalWindow(navigateUrl, winWidth, winHeight, winTitle, setModal) {

    var oManager = GetRadWindow().get_windowManager();
    var oWindow = oManager.open(navigateUrl, null);

    // Set RadWindow Behaviors ClientSide
    // Close, Move, Resize, Reload
    oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close +
                            Telerik.Web.UI.WindowBehaviors.Move +
                            Telerik.Web.UI.WindowBehaviors.Resize +
                            Telerik.Web.UI.WindowBehaviors.Reload);

    oWindow.setSize(winWidth, winHeight);
    oWindow.set_title(winTitle);
    oWindow.add_pageLoad(function () { oWindow.set_status(" "); });
    oWindow.center();
    if (setModal == true) {
        oWindow.set_modal(true);
    }
    return false;
};

when i using this code i have an error :
"Microsoft JScript runtime error: 'Telerik.Web.UI.WindowBehaviors.Close' is null or not an object" :-(


how can i fix it , please help me
really thanks

Tom
Top achievements
Rank 1
 answered on 16 Jan 2014
3 answers
147 views
Hi,
We use the Telerik controls a lot and like the architecture. We need to create some controls and want to use your RadWebControl as base.
What is the easiest way to implement the JavaScript/ClientAPI and skinning. Do you have any examples or some documentation on it.
You have a class called SkinRegistrar. Is this the one to use ?

Regards
Ole Oscar Johnsen
Genady Sergeev
Telerik team
 answered on 16 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?