Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
Hi Telerik Team,

I have hide\ make uneditable\ uncheckable the base parent node of RadTreeView DragnDrop.
If there is any way please suggest me.


Thanks in advance.
Robin
Princy
Top achievements
Rank 2
 answered on 05 Mar 2012
3 answers
91 views
Hello,

I still have a few problems with the grid:
- the GridBoundColumns column are display, but the only contain blank values while they should not.
- the GridButtonColumn is not showing at all.

<telerik:RadGrid ID="OrderDetail_RadGrid" runat="server" AllowFilteringByColumn="True" AllowSorting="True" CellSpacing="0"
GridLines="None" AutoGenerateColumns="False" DataSourceID="TemporaryOnlineOrdersLines_SqlDataSource">
    <ClientSettings AllowColumnsReorder="True">
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
    <MasterTableView AllowFilteringByColumn="True" AllowSorting="True" DataSourceID="TemporaryOnlineOrdersLines_SqlDataSource">
    <CommandItemSettings ExportToPdfText="Export to PDF"/>
    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        <HeaderStyle Width="20px"/>
    </RowIndicatorColumn>
    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        <HeaderStyle Width="20px"/>
    </ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="p_Name" FilterControlAltText="Product"
            UniqueName="Product" HeaderText="Product"/>
        <%--<telerik:GridBoundColumn DataField="p_Description" FilterControlAltText="Description" UniqueName="p_Description" HeaderText="Description"/>--%>
        <telerik:GridNumericColumn DataField="tool_Quantity" DecimalDigits="2" FilterControlAltText="Quanity" HeaderText="Qantity"/>
        <telerik:GridBoundColumn DataField="unit_Name"  FilterControlAltText="Unit" UniqueName="unit_Name"  HeaderText="Unit"/>
        <telerik:GridButtonColumn FilterControlAltText="Filter column column" UniqueName="Remove"/>
    </Columns>
 
    <EditFormSettings>
        <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="false"/>
</telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 05 Mar 2012
1 answer
78 views
I have a wizard, Regular ASP.NET for a custom sign up process as the Membership version did not fit the bill. One of the last steps includes a process to register several contacts to associate with the primary account. I wrote a User Control with basic fields for gather Name, Address, City and regular drop down for the State which utilizes a RequiredFieldValidator. This user control utilizes the RadInputManager for controlling the validation.

Here is the User Control markup:
<asp:Panel ID="pnlClient" runat="server">
    <asp:TextBox ID="tbClientName" runat="server"></asp:TextBox>
    <span class="width500">
        <asp:TextBox ID="tbAddress1" runat="server"></asp:TextBox>
    </span>
    <br />
    <span class="width250">
        <asp:TextBox ID="tbAddress2" runat="server"></asp:TextBox>
    </span>
    <br />
    <span class="width250">
        <asp:TextBox ID="tbCity" runat="server"></asp:TextBox>
    </span>
    <br />
    <asp:DropDownList ID="ddlState" runat="server" DataSourceID="EntityDS_StateProvince"
        DataTextField="Name" DataValueField="Id" AppendDataBoundItems="true">
        <asp:ListItem Text="[Resident State]" Value="ZZ"></asp:ListItem>
    </asp:DropDownList>
    <asp:RequiredFieldValidator ID="rfvStateProvince" runat="server" EnableViewState="true" EnableClientScript="true"
        ControlToValidate="ddlState" Display="Static"
        Enabled="true" ErrorMessage="Valid State is required." InitialValue="ZZ" />
    <br />
    <span class="width125">
        <asp:TextBox ID="tbZip" runat="server"></asp:TextBox>
    </span><span class="width300">
        <asp:TextBox ID="tbLetterName" runat="server"></asp:TextBox>
    </span>
    <br />
    <span class="width500">
        <asp:TextBox ID="tbEmail" runat="server">
        </asp:TextBox></span>
    <telerik:RadInputManager ID="rimClient" runat="server">
        <telerik:TextBoxSetting BehaviorID="tbbClientName" EmptyMessage="Name" ErrorMessage="Name required."
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbClientName" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbAddress1" EmptyMessage="Address 1" ErrorMessage="Address is required."
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbAddress1" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbAddress2" EmptyMessage="Address 2" Validation-IsRequired="false">
            <TargetControls>
                <telerik:TargetInput ControlID="tbAddress2" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbCity" EmptyMessage="City" ErrorMessage="City is required"
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbCity" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbZip" EmptyMessage="Zip" ErrorMessage="Zip is required"
            Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbZip" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="tbbContactName" EmptyMessage="Contact Client"
            ErrorMessage="Contact Client required" Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbLetterName" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:RegExpTextBoxSetting BehaviorID="tbbEmail" EmptyMessage="Email" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
            ErrorMessage="Invalid Email" Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbEmail" />
            </TargetControls>
        </telerik:RegExpTextBoxSetting>
    </telerik:RadInputManager>
    <asp:EntityDataSource ID="EntityDS_State" runat="server" ConnectionString="name=LUEntities"
        DefaultContainerName="LUEntities" EnableFlattening="False" EntitySetName="StateProvinces"
        Where="s.ID != 'ZZ'">
    </asp:EntityDataSource>
</asp:Panel>


Step 1 of the wizard uses this control and works fine since only 1 instance of the user control is used. Validation occurs as it should.
Step 2 has an optional step to gather up a contact's beneficiary information. It is optional in the sense that some users choose to set it up later or can choose from a list of supplied Trust Attorneys. if they opt in then I enabled the User control and its subsequent validations. This works fine too.
Step 3 has an optional step to gather secondary beneficiaries information. This is where I am scratching my head. (See Markup)

Somewhere along the line one (or more) of these is failing/doing something unintentional. During Page Load I disable all of the radpanelitems featuring this User Control (ClientUC). I also parse the controls and disabled the RadInputManager as well as the RequiredFieldValidator within them.
<asp:WizardStep ID="Step_SecondBen" StepType="Step" Title="Secondary Beneficiaries">
    <telerik:RadAjaxPanel ID="rapBeneficiaries" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:RadButton ID="AddBen" runat="server" Text="Add" OnClick="AddBen_Click" AutoPostBack="true"
            CausesValidation="false">
        </telerik:RadButton>
        <telerik:RadPanelBar runat="server" ID="rpbBenList" ExpandMode="FullExpandedItem"
            OnItemClick="rpbBenList_ItemClick" Width="100%" Height="300px" CausesValidation="false">
            <Items>
                <telerik:RadPanelItem Text="Beneficiary 1" Expanded="true">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary1" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 2">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary2" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 3">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary3" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 4">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary4" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Beneficiary 4">
                    <Items>
                        <telerik:RadPanelItem>
                            <ItemTemplate>
                                <uc1:clientuc id="Beneficiary4" runat="server" />
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    </telerik:RadAjaxPanel>
</asp:WizardStep>

The Result I get is that I am unable to navigate forward even if i add (basically enable the user control) 0 beneficiaries. The Next button does not postback. I have added to the user control client side "OnError" functions to the RadInputManager however all 5 RIMs never hit the event (not sure why). I need a method that will tell me which validator is locking up the postback and how to properly address it. I can however postback using the previous button.

What am I missing?
Johnathan
Top achievements
Rank 1
 answered on 05 Mar 2012
4 answers
263 views
Hi:
No question.  Just sharing a code snippet.  I decreased the size of the font...

Dim _fontSize As Single = RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Size - 2.0F
RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font =
    New System.Drawing.Font( _
        RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Name, _
        _fontSize, _
        RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Unit)

Phil
Joan
Top achievements
Rank 1
 answered on 04 Mar 2012
1 answer
94 views
I have textbox that directly has nothing to do with radgrid on the same page.
Textbox has this:
$('#" + filterControl.ClientID + @"').live('keydown', function(event) {
                                                if (event.keyCode && event.keyCode == '13') {
                                                    return jsApplyFilterAction" + ParameterSetHolder.Group + @"();
                                                }
                                                else {
                                                    return true;
                                                }
                                            });
jsApplyFilterAction**** - method, that calls webservice for filling the grid and making some other things.

For some strange reason when I press Enter being inside this textbox, after executing mentioned method, jsApplyFilterAction, that is ok,

_OnCommand grid event is fired! And command name there is 'Sort'!

As a result, I get unpredictable results and double call of webservice.

I tried to disable _OnCommand event firing with different grid properties, but vain.

How to get rid of this OnCommand triggering and why, after all, it's triggered?

UPDATE: it happens in Firefox, not in IE(9). Chrome is also ok.
Alexander
Top achievements
Rank 1
 answered on 03 Mar 2012
0 answers
119 views
Hello,

"The Map control failed to load, Your browser is not Supported."

I got this error in safari while using bingmap and telerik grid on same page, error resolved and can display map
properly if i remove telerik grid from the page.

Please help to resolve this issue in safari

Thank you,

Devang
Devang
Top achievements
Rank 1
 asked on 03 Mar 2012
4 answers
395 views
How to find a RadGrid EditFormSettings form template inside control names using javascript

i have tried like this but it not working :(

    var masterTable = $find("<%=rgResting.ClientID %>").get_masterTableView();
    var Groupcombo = masterTable.get_dataItems()[0].findControl('ddlGroup');

In above code rgResting is my grid name and ddlGroup is my rad combobox name which i have added in my form template.


Thanks
Madhan
Madhan
Top achievements
Rank 1
 answered on 03 Mar 2012
1 answer
54 views
Hello,


Dynamically I have added radscheduler in the sharepoint 2010 application page. I have set  "Telerik" theme for radscheduler it's working fine but in the browser 12 CSS files are loading for this particular control. It affects the page response as well as in Internet Explorer(7,8,9) upto  31 individual stylesheets are supported. 


Refer the below link
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/ad1b6e88-bbfa-4cc4-9e95-3889b82a7c1d/ 


It affect the  page size and design.I have added the control in the page layout which resides inside master page. The CSS file count in the application page.


1. Master Page - 2 stylesheet 
2.
Sharepoint  - 4 stylesheet 
3.
Three RadTab and Radgrid controls - 15 stylesheet
4
. RadScheduler - 12 stylesheet


If I have added Radscheduler,RadTab,Radgrid controls in the page totally 27 stylesheets are loaded in the page.So how to reduce the css file of the scheduler control and telerik RadTab,RadScheduler controls ? 
We are in a highly critical situation where our product release is held up because of the issues. Please respond at your as soon as possible. 


Regards
Ramalingam S
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Mar 2012
3 answers
400 views
I have a page with a RadGrid on it that I've been testing with.  I do not have any kind of DataSource control on it, so I am manually wiring up a datasource to it on the NeedDataEvent and then, of course, wiring up the various command item events.  I had my test page all working with insert, update, and delete events until... I changed several columns from simple GridBoundColumn columns to GridTemplateColumn columns.

Using the GridBoundColumn type, the following code worked just fine:

    protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)  
    {  
        DataTable dt = GridSource;  
        GridEditableItem eeditItem = e.Item as GridEditableItem;  
 
        int rowkey = (int?)editItem.GetDataKeyValue(IDColumnName) ?? 0;  
 
        DataRow row = dt.Rows.Find(rowkey);  
        if (row != null)  
        {  
            row.BeginEdit();  
            try  
            {  
                editItem.UpdateValues(row);  
                row["EditAction"] = "update";  
                row.EndEdit();  
 
                TrackChange(rowkey, "update");  
            }  
            catch (Exception ex)  
            {  
                row.CancelEdit();  
                RadGrid1.Controls.Add(new LiteralControl("Unable to update record: " + ex.Message));  
                e.Canceled = true;  
            }  
        }  
        txtCommandInfo.Text = String.Format("ItemIndex {0} rowkey {1}", e.Item.ItemIndex.ToString(), rowkey);  
    }  
 

The code line of interest is inside the try block where it calls the editItem.UpdateValues method.  And it is this line that no longer seems to work if my columns are of the GridTemplateColumn type.  There is is no error that is thrown, it's just the row (a DataRow object) is not updated with new values from any template columns, only bound columns.

In both cases, I have the MasterTableView setup with "EditMode="EditForms", the only change is in the markup. 

for the bound column, I had this:

                    <telerik:GridBoundColumn HeaderText="FirstName" DataField="FirstName" UniqueName="FirstName" 
                        MaxLength="20" /> 
 

for the template column, I had this:
                    <telerik:GridTemplateColumn HeaderText="FirstName" UniqueName="FirstNameTemplate">  
                        <ItemTemplate> 
                            <%# Eval("FirstName") %> 
                        </ItemTemplate> 
                        <EditItemTemplate> 
                            <asp:TextBox ID="FirstName" runat="server" Text='<%# Eval("FirstName") %>' /> 
                            <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ErrorMessage="First name is required." 
                                ControlToValidate="FirstName"></asp:RequiredFieldValidator> 
                        </EditItemTemplate> 
                    </telerik:GridTemplateColumn> 
 

So when changing to the template column, I find that I can code something like
        
 
        string txt;  
        TextBox ctrl = (TextBox)editItem.FindControl("FirstName");  
        if (ctrl != null)  
            txt = ctrl.Text;  
 

and of course work on manually updating my DataRow object accordingly.  But... I'm trying to *understand* this, and quite frankly I'm not finding much documentation on it. 

So... could someone provide me pointers to documentation on the differences between Template and Bound columns?  Or even some more reference material on the ExtractValues, UpdateValues methods?

I realize I can work on coding up a scenario where I use the .FindControl method for every column I'm interested in, but I guess I'm after a little more education...

Any help would be greatly appreciated.  Thanks in advance.

Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Mar 2012
3 answers
119 views
The original design called for a filter (Telerik’s filter control) inside a pane to slide in and out the results grid.
I have a filter that would need to be slightly more advanced given the number of fields and objects that could be available.
I am not sure if this is possible, but have another drop down before the field to choose the object. So first you choose the object, and then the fields available within that object appear in the next drop down. Example Control (Object) and ControlEffectiveness (Control field):
******************************************************
AND + + x
|_Organization Location EqualTo [ North America ] x
|_ AND + + x
|_ Control v ControlEffectiveness EqualTo [Ineffective ]x
|Control|
|Organization|
|Process|
*******************************************************

In the above diagram, Control v is a field with drop down Control, Organization, Process etc... therefore here Control is an object and
ControlEffectiveness is the control field.
Is there a way we can have another drop down before the field to choose the object.
Please Suggest!! ASAP

Andrey
Telerik team
 answered on 02 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?