Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 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
132 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
85 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
113 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
2 answers
136 views
Hi,
      I am working with an application in ASP.NET Framework 4.0 in VS 2012 and am using Telerik 2010.3.1109.40 version . My application is working fine in Firefox,Chrome but it is not working properly in IE 10.
My application having problems with IE10 are It doesn't open Radwindows(Popup) and Dropdownlist can't access. When I click on link button it will shows loading image(AjaxLoadingPanel image). Actually it will open the radwindow.
can any one tell me the solution of these problems in IE10 using telerik 2010.3.1109.40 version. Please tell me the solution as soon as possible.

Thanks,
Harikrishna

Iana Tsolova
Telerik team
 answered on 07 May 2013
1 answer
102 views
I'm trying to use fo:table-and-caption withTelerik.Apoc.ApocDriver (Render)

Without the "<fo:table-and-caption>" tag, my table generate.
But with it, I get nothing (no error and no table)

Is this tag not supported by the generator?

(I need a table title that will stick on the same page)

Thanks

<fo:table-and-caption>
        <fo:table border="1pt solid black">
             
            <fo:table-column column-width="25mm"/>
            <fo:table-column column-width="25mm"/>
             
            <fo:table-header>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block font-weight="bold">title</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-header>
             
            <fo:table-body>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>val 1</fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>val 2</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
             
          </fo:table>
</fo:table-and-caption>
Daniel
Telerik team
 answered on 07 May 2013
1 answer
65 views
Hi,

I dont see the maxlength property on RadFilterNumericFieldEditor and RadFilterTextFieldEditor.
Is there a way we can set the maxlength on these items?

Thanks
Antonio Stoilkov
Telerik team
 answered on 07 May 2013
1 answer
130 views
Hi,

I have some problems to stop RadGrid row change because radConfirm don't stop like command confirm to wait response.

I check if my row is dirty and if is the case, i want to radconfirm this row changed to advice user for lost of data not saved.

Script OnRowSelecting and OnRowSelected
function OnRowSelecting(sender, eventArgs) {
    return eventArgs.set_cancel(!confirm("Confirm navigation?"));
}
 
function OnRowSelected(sender, eventArgs) {
     // Make action...
}

with this script, OnRowSelected fired only if response is True from confirm, but with radConfirm OnRowSelected fired before response.

How can implement this with radConfirm?

Thank's

Antonio Stoilkov
Telerik team
 answered on 07 May 2013
3 answers
280 views
Hi,

I am quite not able to figure out the following:

I have a tree view that has context menus on each tree node. One of the items in the menu is an option to allow user to export all the nodes from the root to the last of the current nodes children, is there a way to do that without having to loop through all the nodes in the tree?

Any help is appreciated.

Thanks,
Harisha
Bozhidar
Telerik team
 answered on 07 May 2013
7 answers
148 views
We have the following template column on one of our grids. When we export to Excel, the three values in the ItemTemplate show up in the right order in Excel, but the three columns of the HeaderTemplate are reversed. Can anyone offer a solution as to why and how to stop this? 

<telerik:GridTemplateColumn UniqueName="TemplateColumn" SortExpression="Approvals"
                        InitializeTemplatesFirst="false">
                        <HeaderTemplate>
                            <table id="tblApproval" cellspacing="0" style="width:100px;" class="myTable">
                                <tr>
                                    <td colspan="3" align="center">
                                        Approved By</td>
                                </tr>
                                <tr>
                                    <td style="width: 33%">
                                        <asp:LinkButton CssClass="Button" ID="btnEmployee" Text="Emp." ToolTip="Sort by Employee Approval"
                                        CommandName='Sort' CommandArgument='EmployeeApproved' runat="server" /></td>
                                    <td style="width: 34%">
                                        <asp:LinkButton CssClass="Button" ID="btnClient" Text="Client" ToolTip="Sort by Client Approval"
                                        CommandName='Sort' CommandArgument='ClientApproved' runat="server" /></td>
                                    <td style="width: 33%">
                                        <asp:LinkButton CssClass="Button" ID="btnPayroll" Text="Acct." ToolTip="Sort by Accounting Approval"
                                        CommandName='Sort' CommandArgument='PayrollApproved' runat="server" /></td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table cellspacing="0" width="100%" class="myTable">
                                <tr>
                                    <td style="width: 33%">
                                        <%# ((bool)Eval("EmployeeApproved") == true) ? "Yes" : "No"%>
                                    </td>
                                    <td style="width: 34%">
                                        <%# ((bool)Eval("ClientApproved") == true) ? "Yes" : "No"%>
                                    </td>
                                    <td style="width: 33%">
                                        <%# ((bool)Eval("PayrollApproved") == true) ? "Yes" : "No"%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>
Kostadin
Telerik team
 answered on 07 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?