Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
139 views
Hi

There are two radcomboboxes in the ASPX with MetroTouch skin and I want to add some different custom styles to the radcomboboxes as shown below.

<telerik:RadComboBox ID="rcbModelName" runat="server" Skin="MetroTouch" Width="100%"
EmptyMessage="Select Model" Height="120px">
</telerik:RadComboBox>
<telerik:RadComboBox ID="rcbColor" runat="server" Skin="MetroTouch" Width="100%"
EmptyMessage="Select Color" Height="120px">
</telerik:RadComboBox>
 
.RadComboBox_MetroTouch .rcbInputCell
{
      border: 1px solid Gray !important;
      background: #FFFFFF url("../Images/Icon1.png") no-repeat 3% 55% !important;
      text-indent: 12%;
}

When I apply the above style, its getting applied to all the radcomboboxes in the page with MetroTouch skin.

So how can I apply the above CSS using the ID so that it will be applied to the corresponding radcombobox only and similarly I can provide some other custom styles to the other combobox as well.

Thanks,
Vishnu.
Vishnu
Top achievements
Rank 1
 answered on 13 Jun 2014
2 answers
123 views
Good day

I have a website where i create dynamic radgrids.

Each radgrid will have 3 rows .

i would like to hide my itemtemplates in row 1 and row 2.

The itemtemplates are checkboxes, these checkboxes should be hidden on row 1 and 2.
Princy
Top achievements
Rank 2
 answered on 13 Jun 2014
1 answer
105 views
I want my RadButton to fill the width of a container (a container whose width depends on the screen resolution). But if I do this via css (width: 100%!important; in the css-class added to the button), the button stretches out to the right, but the text does not move right. Causing the button text to look aligned to the left, rather than to the center.

How do I fix this?
Shinu
Top achievements
Rank 2
 answered on 13 Jun 2014
1 answer
1.0K+ views
I have a radgird that has a three level hierarchy.  I want to be able to expand ALL levels of a specific record when the expand button is clicked at the ROOT level of the radgrid.  **My radgrid may have two or three detail tables at one level with hiearchy levels binded to some of those tables.  I want all those levels to be opened with one click at the root level for a specific record in my radgrid.  I am using HierarchyLoadMode="Client" so I believe I need to code this in javascript.  Refer to the picture attached to this post to visually see my RadGrid.  Please Assist!
Viktor Tachev
Telerik team
 answered on 13 Jun 2014
1 answer
141 views
Hi

I would like to use the Telerik controls in multiple languages (german, french, italian, english) in more than one applications.
My idea was to translate the labels with resource files (.resx) and put the files on a central server, where every application can use them.
But now i have to set the "LocalizationPath" property on every Telerik control.

Is there a global configuration i can set for the LocalizationPath? Maybe in the web.config?
Or is there another solution for my problem?

Thank you very much!

Best regards,
Mathias
Rumen
Telerik team
 answered on 13 Jun 2014
2 answers
151 views
Hi Guys,

In my edit form template, I need to open a panel that holds a RadEditor on the conditional selection from a RadComboBox that is also in the edit form template.
So for example, if the user selects'add extra details' a panel will open with an editor.

Cheers in advance,

Jon

 
Jon
Top achievements
Rank 1
 answered on 13 Jun 2014
1 answer
83 views
Hello everybody,

again I have a Problem I simply can not get solved. I have a databound RadGrid with several pages.
All the grids rows are in EditMode and shall stay in EditMode. I handle the Updating with an own
routine. Now when I apply changes to some Entries on one page and then change the page to edit
some more, the entries on the initial page are Reset. 
I guess I know why this is happening. As long as I do not fire my SQL update method, the underlying
database is logically not updated. As to keep all rows permanently I copied this example into my
PreRender. As this implies rebinding and fires every time i change the page the orginial SQL
data is loaded. Am I right about this (just for my understanding)?

Is there any approach to achieve what I want to do.

Thank you very much!

Max
Princy
Top achievements
Rank 2
 answered on 13 Jun 2014
2 answers
206 views
I'm using the Batch Editing example as the basis of a page I'm doing.

It's ideal, because the users need to edit multiple rows and click save. The example does that with the Save Changes at the bottom. The down side is that I need to put in business logic on the create, update, and delete. Normally, I can do that, even with a SQLDataSource, using the SQLDataSource events (ex. PropertyHistories_Updating). The problem is that these events are not triggering.

Yes, I know that I could use Advanced Binding, but am unsure how this example would work with it.  :)
Any ideas?  (see attached)

Thanks,
Jason

Code:
BatchTest.aspx
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" HorizontalAlign="NotSet">
            <p>Hotel Name: <telerik:RadComboBox ID="HotelList" Width="500" runat="server" DataSourceID="Hotels" DataTextField="myview" 
                  AllowCustomText="false" Filter="StartsWith" ShowMoreResultsBox="true" DataValueField="Inncode" />
                <p>
                </p>
                <h3>Property History</h3>
                <telerik:RadGrid ID="PropertyHistory" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="PropertyHistories" OnBatchEditCommand="PropertyHistory_BatchEditCommand" OnItemDeleted="PersonnelHistory_ItemDeleted" OnItemInserted="PropertyHistory_ItemInserted" OnItemUpdated="PropertyHistory_ItemUpdated" OnPreRender="PropertyHistory_PreRender" Width="750px">
                    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Bottom" DataKeyNames="RMCCHistoryID" DataSourceID="PropertyHistories" EditMode="Batch">
                        <BatchEditingSettings EditType="Row" OpenEditingEvent="Click" />
                        <SortExpressions>
                            <telerik:GridSortExpression FieldName="RMCCHistoryID" SortOrder="Descending" />
                        </SortExpressions>
                        <Columns>
                            <telerik:GridTemplateColumn DataField="Model" HeaderText="RMCC Support Model" UniqueName="Class">
                                <ItemTemplate>
                                    <%# Eval("Model") %>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="false" DataSourceID="Models" DataTextField="Model" EmptyMessage="Search Models" EnableAutomaticLoadOnDemand="true" Filter="StartsWith" Height="200px" ShowMoreResultsBox="true" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Start Date" UniqueName="startdate">
                                <ItemTemplate>
                                    <asp:Label ID="date" runat="server" Text='<%# Eval("startdate") %>' />
                                    &nbsp;
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadDatePicker ID="picker1" runat="server" DbSelectedDate='<%# Bind("startdate") %>' MaxDate="12/31/2173" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="End Date" UniqueName="enddate">
                                <ItemTemplate>
                                    <asp:Label ID="date" runat="server" Text='<%# Eval("enddate") %>' />
                                    &nbsp;
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadDatePicker ID="picker1" runat="server" DbSelectedDate='<%# Bind("enddate") %>' MaxDate="12/31/2173" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to Delete?" ConfirmTitle="Delete" HeaderStyle-Width="50px" HeaderText="Delete" Text="Delete" UniqueName="DeleteColumn" />
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

                <p>&nbsp;</p>
                <telerik:RadListBox ID="SavedChangesList1" runat="server" Height="200px" Visible="false" Width="600px">
                </telerik:RadListBox>
           
                <telerik:RadListBox ID="SavedChangesList" runat="server" Height="200px" Visible="false" Width="600px" />
                <asp:SqlDataSource ID="PropertyHistories" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="spUAPPropertyHistory" SelectCommandType="StoredProcedure" DeleteCommand="spUAPPropertyHistoryDelete" DeleteCommandType="StoredProcedure" InsertCommand="spUAPPropertyHistoryInsert" InsertCommandType="StoredProcedure" UpdateCommand="spUAPPropertyHistoryUpdate" UpdateCommandType="StoredProcedure" OnDeleting="PropertyHistories_Deleting" OnInserting="PropertyHistories_Inserting" OnUpdating="PropertyHistories_Updating">
                  
                    <DeleteParameters>
                        <asp:Parameter Name="RMCCHistoryID" Type="Int32" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="RMCCModelLvl2ID" Type="Int32" />
                        <asp:Parameter Name="RATPropID" Type="Int32" />
                        <asp:Parameter Name="StartDate" Type="String" />
                        <asp:Parameter Name="EndDate" Type="String" />
                    </InsertParameters>
                    <SelectParameters>
                        <asp:ControlParameter ControlID="HotelList" DefaultValue="ABC" Name="Inncode" PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="RMCCHistoryID" Type="Int32" />
                        <asp:Parameter Name="RMCCModelLvl2ID" Type="Int32" />
                        <asp:Parameter Name="StartDate" Type="String" />
                        <asp:Parameter Name="EndDate" Type="String" />
                    </UpdateParameters>
                  
                </asp:SqlDataSource>
                
                <asp:SqlDataSource ID="Hotels" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="Select Usename + ' - ' + Inncode as myview, Inncode 
                        From x 
                        Order by 1 Asc">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Contacts" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="Select Distinct CorpContactFullName 
                        From y
                        Order By 1">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Models" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="Select Distinct CorpContactFullName 
                        From z
                        Order By 1">
                </asp:SqlDataSource>
                        
        </telerik:RadAjaxPanel>
    </form>
</body>


BatchTest.cs:

 protected void PropertyHistory_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
        SavedChangesList.Visible = true;
    }

    protected void PropertyHistory_ItemUpdated(object source, GridUpdatedEventArgs e)
    {
        GridEditableItem item = (GridEditableItem)e.Item;
        string id = item.GetDataKeyValue("RMCCHistoryID").ToString();

        if (e.Exception != null)
        {
            e.KeepInEditMode = true;
            e.ExceptionHandled = true;
            NotifyUser("ID " + id + " cannot be updated. Reason: " + e.Exception.Message);
        }
        else
            NotifyUser("ID " + id + " is updated!");        
    }

    protected void PropertyHistory_ItemInserted(object source, GridInsertedEventArgs e)
    {
        if (e.Exception != null)
        {
            e.ExceptionHandled = true;
            NotifyUser("Cannot be inserted. Reason: " + e.Exception.Message);
        }
        else
            NotifyUser("New product is inserted!");        
    }

    protected void PropertyHistory_ItemDeleted(object source, GridDeletedEventArgs e)
    {
        GridDataItem dataItem = (GridDataItem)e.Item;
        string id = dataItem.GetDataKeyValue("RMCCHistoryID").ToString();
        if (e.Exception != null)
        {
            e.ExceptionHandled = true;
            NotifyUser("ID " + id + " cannot be deleted. Reason: " + e.Exception.Message);
        }
        else
            NotifyUser("ID " + id + " is deleted!");
    }

    protected void PropertyHistory_PreRender(object sender, EventArgs e)
    {      
        //RadNumericTextBox w = (PersonnelHistory.MasterTableView.GetBatchColumnEditor("UnitsInStock") as GridNumericColumnEditor).NumericTextBox;
        //w.Width = Unit.Pixel(60);
        //TextBox x = (PersonnelHistory.MasterTableView.GetBatchColumnEditor("QuantityPerUnit") as GridTextBoxColumnEditor).TextBoxControl;
        //x.Width = Unit.Pixel(120);
    }
]
    private void NotifyUser(string message)
    {
        RadListBoxItem commandListItem = new RadListBoxItem();
        commandListItem.Text = message;
        SavedChangesList.Items.Add(commandListItem);
    }

    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void PropertyHistories_Deleting(object sender, SqlDataSourceCommandEventArgs e)
    {
        // NOT BEING HIT!
        var x = e;
    }
    protected void PropertyHistories_Inserting(object sender, SqlDataSourceCommandEventArgs e)
    {
         // NOT BEING HIT!
        var x = e;
    }
    protected void PropertyHistories_Updating(object sender, SqlDataSourceCommandEventArgs e)
    {
         // NOT BEING HIT!
        var x = e;
    }








Konstantin Dikov
Telerik team
 answered on 13 Jun 2014
1 answer
49 views
Hello,

I am trying to get the item count in each group and display the count in the group footer and the total grid items count in the grid footer.

I tried several ways using the aggregate function which works fine at the grid footer level but at the group level it only displays the number of items in the page. Any help will be appreciated.

Thanks in Advance

Chaitanya Vemulapalli
Radoslav
Telerik team
 answered on 13 Jun 2014
6 answers
581 views
Hello everybody,

I already searched for the solution of my problem but did not find anything to work. I Build a RadGrid an bind it to a SQL Datasource. Now I want to fill the Dropdownlists in the Radgrid with values from a different code behind stored procedure. Somehow I can not access the two DropDownLists from my code behind. I would be very thankful if someone could help me out. Here is my code:

<telerik:RadGrid runat="server" ID="gridFktWipoHague" Culture="de-DE">
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn DataField="LAND_KZ" ReadOnly="true">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn DataField="PMMA_Add">
                <EditItemTemplate>
                    <telerik:RadDropDownList runat="server" ID="PMMA_Add_DropDown">
                    </telerik:RadDropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridDateTimeColumn DataField="HAGUE_DATUM">
            </telerik:GridDateTimeColumn>
            <telerik:GridTemplateColumn>
                <EditItemTemplate>
                    <telerik:RadDropDownList runat="server" ID="HAGUE_Add_DropDown">
                    </telerik:RadDropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="HAGUE_DELETE">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn ReadOnly="true" DataField="Counter_pm">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn ReadOnly="true" DataField="Counter_ps">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="TMVIEW">
            </telerik:GridCheckBoxColumn>
        </Columns>
    </MasterTableView>
    <ExportSettings>
        <Pdf PageWidth="">
        </Pdf>
    </ExportSettings>
 
</telerik:RadGrid>

Thank you very much,

Max
Max
Top achievements
Rank 1
 answered on 13 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?