Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
215 views
I  can "Creat Custom Field Editors" and "Add Field Editors Dynamically" separately in asp.net radFilter
Can we add custom field editor dynamically?  It seems we have to make html tag for custom field editor in aspx page as shown in below:

 <FieldEditors>      
                <Custom:RadFilterRuleTextFieldEditor FieldName="Dimension"  />
                <Custom:RadFilterRuleTextFieldEditor FieldName="Dimension(and children)"  />
               
                 <telerik:RadFilterTextFieldEditor  FieldName="MyText"     TextBoxWidth="333"     />
                 <telerik:RadFilterBooleanFieldEditor  FieldName="MyBoolean" />
 </FieldEditors>

My requirement is I want to add custom field editors dynamically for RadFilter control using c# without html tag. Please advise.
Thanks,

Jim Chen
Angel Petrov
Telerik team
 answered on 07 May 2013
1 answer
89 views
Hi,
What is the easiest way to add round edges to ASP.NET AJAX tooltoolbar.
I only want the most right and most left edges to be rounded
Thanks
Shinu
Top achievements
Rank 2
 answered on 07 May 2013
3 answers
130 views

Requirements

RadControls version
 WeUIVSExtensions 2013.1.222.0
.NET version
Visual Studio version 2012
programming language
VB
browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
How to set a Text of a Cell in the rad Callendar; in other words I Need to set a String "X" in a given date.
Maria Ilieva
Telerik team
 answered on 07 May 2013
1 answer
178 views

Story:

I'm trying to do some filtering with JavaScript I'have a grid and in this grid I want to filter some values using Combo Boxes . So far the values are displayed in the Combo Boxes etc.. and it is already working for one .

Question:

My problem is don't get it why is it not working for my second example.. I always get this strange error

The argument types 'Edm.Int32' and 'Edm.String' are incompatible for this operation. Near equals expression, line 6, column 19.

This example works fine

                <telerik:GridTemplateColumn DataField="ActivityId" FilterControlAltText="Filter ActivityId column"
                    HeaderText="Activity" SortExpression="ActivityId" UniqueName="ActivityId">
                    <ItemTemplate>
                        <asp:Literal runat="server" Text='<%# Eval("Activity.FullActivity") %>' />
                    </ItemTemplate>
                    <FilterTemplate>
                        <telerik:RadComboBox runat="server" DataSourceID="dsActivity" DataTextField="FullActivity" DataValueField="ActivityId"
                            SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ActivityId").CurrentFilterValue %>'
                            Height="200px" AppendDataBoundItems="true" OnClientSelectedIndexChanged="TitleIndexChanged">
                            <Items>
                                <telerik:RadComboBoxItem Value="0" Text="- All -" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="rsbActivity" runat="server">
                            <script type="text/javascript">
                                function TitleIndexChanged(sender, args) {
                                    //alert(args.get_item().get_value());
                                    if (args.get_item().get_value() > 0) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("ActivityId", args.get_item().get_value(), "EqualTo");
                                    } else {
                                        tableView.filter("ActivityId");
                                    }
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridTemplateColumn>

And in this one its not working ...

   <telerik:GridTemplateColumn DataField="Dossier.LBUId" HeaderText="LBU" FilterControlAltText="Filter Dossier.LBUId column"
                            SortExpression="LBUId" UniqueName="LBUId">
                            <ItemTemplate>
                                <asp:Literal ID="Literal3" runat="server" Text='<%# Eval("Dossier.LBU.Code") %>' />
                            </ItemTemplate>
                            <FilterTemplate>
                                <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="dsLBU" DataTextField="Code" DataValueField="LBUId"
                                    SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("LBUId").CurrentFilterValue %>'
                                    Height="200px" AppendDataBoundItems="true" OnClientSelectedIndexChanged="ChangeLbuCode">
                                    <Items>
                                        <telerik:RadComboBoxItem Value="0" Text="- All -" />
                                    </Items>
                                </telerik:RadComboBox>
                                <telerik:RadScriptBlock ID="ChangeLbuCode" runat="server">
                                    <script type="text/javascript">

                                        function ChangeLbuCode(sender, args) {
                                            if (args.get_item().get_value() > 0) {
                                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                tableView.filter("LBUId", args.get_item().get_value(), "EqualTo");
                                            } else {
                                                tableView.filter("LBUId");
                                            }
                                        }
                                    </script>
                                </telerik:RadScriptBlock>
                            </FilterTemplate>
                        </telerik:GridTemplateColumn>

Thanks for help and fast answer !!

Maria Ilieva
Telerik team
 answered on 07 May 2013
1 answer
44 views
as my title, I have some tables with n - n relationship. WHen i bind to treeview , i want a node can show more than once on a treeview.
can i do it? please to help me.

P/S:sorry for my english :(
Do Xuan
Top achievements
Rank 1
 answered on 07 May 2013
10 answers
474 views
Hi,

Is it possible to change the tooltip on the filtermenu image. I've tried to change it with RadGrid.FilterMenu.Tooltip but it keep saying "Filter".

I don't know if there's an other way to change it.

Thank you and have a nice day!

Guillaume
Daniel
Telerik team
 answered on 07 May 2013
1 answer
95 views
I have question that I have not been able to figure out, I have grid that displays records and also the "Add new record" button & buttonLink. when the grid is in edit mode and the elements for the new record are displayed I have a drop down with values and some static text fields and a dynamic text field that is displayed if a specific value in the drop down is chosen. the dynamic text field also has an  ASP RequiredFieldValidator

in the grid_ItemCommand()  method I would like to do some additional validation and make the dynamic text field and it's vaidator appear, and the edit screen stay active with it's current values in place.

I'm new to RadGrid and not sure how to properly leave the grid in edit mode and have all the fields appear that I would Like and the associated data too. here is the snippet of code that have just trying to get the dynamic text field and the validator to appear

specCert = value from the dropdown
specOther = value from the dynamic text field that should have appeared and required being populated.
txtSpecOther = id of the dynamic text field
rfvOther = id of the RequiredFieldValidator

                        if ((specCert.Equals("370")) && (String.IsNullOrEmpty(specOther)))
                        {
                            
                            //Get the currently open item's entries and assign them to the Add New Record form's fields
                            GridEditableItem insertedItem = e.Item.OwnerTableView.GetInsertItem();
                            String ucID = GridEditFormItem.EditFormUserControlID;
                            UserControl i_uc = insertedItem.FindControl(ucID) as UserControl;

                            ((TextBox)i_uc.FindControl("txtSpecOther")).Visible = true;
                            ((RequiredFieldValidator)i_uc.FindControl("rfvOther")).Visible = true;
                            
                            // show the validation error message
                            ((RequiredFieldValidator)i_uc.FindControl("rfvOther")).IsValid = false;

                            return;
                        }
                        //other code that I dont want to run
                        ......
                        ......
                        ......
                        ......
                        //other code that I dont want to run

thank you for any help I can get.
Andrey
Telerik team
 answered on 07 May 2013
1 answer
111 views
I am attempting to do a compare of values from three dropdowns in a grid edit form:
If the selected value from any of the dropdowns matches the dropdown from any other dropdown then I would like to be able to stop the update somehow.
This posts the message but I am not sure how to stop the update.
 
Here is the item created:
protected void gvEdit_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
   {
       if (e.Item is GridEditableItem && e.Item.IsInEditMode)
       {
           DropDownList list1 = (e.Item as GridEditableItem)["GridDropDownColumn999111"].Controls[0] as DropDownList;
           list1.AutoPostBack = true;
           list1.SelectedIndexChanged += new System.EventHandler(this.list1_SelectedIndexChanged);
 
           DropDownList list2 = (e.Item as GridEditableItem)["GridDropDownColumn9992"].Controls[0] as DropDownList;
           list2.AutoPostBack = true;
           list2.SelectedIndexChanged += new System.EventHandler(this.list2_SelectedIndexChanged);
 
           DropDownList list3 = (e.Item as GridEditableItem)["GridDropDownColumn9993"].Controls[0] as DropDownList;
           list3.AutoPostBack = true;
           list3.SelectedIndexChanged += new System.EventHandler(this.list3_SelectedIndexChanged);
       }
   }

Here is the index changed:
protected void list1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
        String x = "System 1, System 2, and System 3 must have different values";
        DisplayMessage(y);
     
    }
   protected void list2_SelectedIndexChanged(object sender, System.EventArgs e)
   {
       String x = "System 1, System 2, and System 3 must have different values";
       DisplayMessage(x);
 
   }
   protected void list3_SelectedIndexChanged(object sender, System.EventArgs e)
   {
       String x = "System 1, System 2, and System 3 must have different values";
       DisplayMessage(x);
 
   }

Jayesh Goyani
Top achievements
Rank 2
 answered on 07 May 2013
1 answer
74 views

 

 

I've implemented the grid google like filtering just find.  does what I need.  However, I need to add a checkbox column to allow the user to select which rows they want to save.

Once I include any type of MasterTableView with <column> the needdatasource overrides my column.  How can I add a custom column (checkbox) to the demo code at: 
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandcombo/defaultcs.aspx?product=grid#qsf-demo-source

<telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" Width="560px" runat="server" OnColumnCreating="RadGrid1_ColumnCreating" OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource" CellSpacing="0" GridLines="None">

<MasterTableView>

 <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

  <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">

 <HeaderStyle Width="20px"></HeaderStyle>

 </RowIndicatorColumn>

  <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">

 <HeaderStyle Width="20px"></HeaderStyle>

 </ExpandCollapseColumn>

  <Columns>

 <telerik:GridCheckBoxColumn DataType="System.Boolean" FilterControlAltText="Filter Allow" HeaderText="Allow" UniqueName="Allow">

 </telerik:GridCheckBoxColumn>

 </Columns>

  <EditFormSettings>

 <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>

 </EditFormSettings>

  <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

 </MasterTableView>

Marin
Telerik team
 answered on 07 May 2013
1 answer
88 views
Hi,
          The Css styles are not apply for Radcontrols in IE.if i put 2 grid controls the Css styles are applied perfectly.but if i add more than two grid, css styles are not  apply for other grids except first two grid.


To solve this i have searched in a  lots of forum.

some experts told to add a stylesheetmanager to Combine  the stylesheet requests into a single request.

After adding the stylesheetmanager  i am getting the javascript error like in the attachment file and also a  css problem is still not solved

Please help me to solve this issue.

Thanks.
Eyup
Telerik team
 answered on 07 May 2013
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?