Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
150 views
Hi friend,

I have used Radio button in Gridtemplate column.This radio button is correctly working only in IE and firefox and its not working in Chrome.
This my code for grid template column...
 <telerik:GridTemplateColumn UniqueName="TemplateEditColumn" AllowFiltering="false">
             <ItemTemplate>
                    <asp:RadioButton ID="chkAdd" ToolTip="Use Location as billing address" EnableViewState="true"
                                                                                    Height="18px" BorderWidth="0px" runat="server" GroupName="RegularMenu" AutoPostBack="True"
                                                                                    OnCheckedChanged="chkAdd_CheckedChanged" Checked="False" />
                </ItemTemplate>
  </telerik:GridTemplateColumn>

observe the image i have attached here..so that you can get some idea..
please help me.


Best Regards & Thanks
Anwar
Maria Ilieva
Telerik team
 answered on 01 Dec 2011
1 answer
203 views
I have several RadGrids which I'm modifying programatically so that....
 
If the user clicks "Edit", ShowAddNewRecordButton is set to 'False' and I rebind the grid.
If the user clicks "Add New Record", e.Item.Edit is set to 'False' and I rebind the grid.

In effect, this means that the user cannot access the 'edit' and 'add new' forms at the same time.  Only one can ever be open.  I do this for a couple of reasons. 

Firstly, if the user tries to add a record AND edit a record (both the 'add new' and 'edit' forms are open simultaneously), if the user tries to submit the edited record first, the validation on the 'add new record' form fires - preventing the edit from occuring. 

Secondly, I have controls which I want to appear when the user adds a new record, but I want hidden when they edit a record.  I've been able to program the grid to hide the controls If the user edits a record, BUT if the user edits a record THEN clicks the 'adds new' button (whilst the edit form is still expanded), the controls show in both the add new AND - unfortunately - the edit forms.

By controlling access to the "Edit" and "Add New" forms so only one can be open at any one time, this resolves the above issues.  Unfortunately, I have a DetailTable which I'm also trying to program to behave the same way but I don't know how to reference the ShowAddNewRecordButton value when it's within a DetailTable.  Also, when I rebind the grid, it loses the expanded row (which you'd expect).  Any ideas?  My code is below...

Protected Sub rdgRiskType_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rdgRiskType.ItemCommand

    'If user inserts a new Risk Type record, set 'edit' mode to false and rebind (all 'edit' forms will be minimised).
    If e.CommandSource.Text = "Add New Risk Type" Then
        e.Item.Edit = False
        rdgRiskType.Rebind()
    End If

    'If user edits a Risk Type record, hide the 'Add New xxx' button (user can't then add a new record whilst an edit form is maximised).
    If e.CommandSource.Text = "Edit" Then
        rdgRiskType.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = False
        rdgRiskType.MasterTableView.IsItemInserted = False
        rdgRiskType.Rebind()
    End If

    'If user inserts a new Risk record, set 'edit' mode to false and rebind (all 'edit' forms will be minimised).
    If e.CommandSource.Text = "Add New Risk" Then

    End If

    'If user edits a Risk record, hide the 'Add New xxx' button (user can't then add a new record whilst an edit form is maximised).
    If e.CommandSource.Text = "Edit Risk" Then

    End If

End Sub

Antonio Stoilkov
Telerik team
 answered on 01 Dec 2011
5 answers
149 views
Hi all,

Very simple.  I am binding the RadCombo in markup and code-behind as follows.  So, when the user selects a value in the RadComboBox that contains an apostrophe, some javascript exception is thrown and the server-side postback event handler is never invoked.  We are using version 2011.2.712.35.

Please help.

Thank you,

Dan

 Markup:

 

<td>

 

 <telerik:RadComboBox ID="request__place_id" CssClass="LabelValue" AutoPostBack="true"

OnSelectedIndexChanged="request__place_idSelectedIndexChanged"

runat="server">

 

</telerik:RadComboBox>

 

 </td>


Code-behind:

 

var values = from info in result.Descendants("place")

 

select new

{

    PlaceId = info.Element(

"place_id"),

    Name = info.Element(

"name")

};

 

this.request__place_id.Items.Clear();

 

this.request__place_id.Items.Add(new RadComboBoxItem(string.Empty, string.Empty));

 

foreach (var value in values)

    this.request__place_id.Items.Add(new Telerik.Web.UI.RadComboBoxItem(value.Name.Value, value.PlaceId.Value));

}

Ivana
Telerik team
 answered on 01 Dec 2011
1 answer
114 views
I want to know a Telerik's scaffold control. I have seen Subsonic's scaffold control that has TableName property and it displays form according to that database table, it creates  list/edit/add/delete forms at runtime. 
Please note I don't want to use MVC.
Sebastian
Telerik team
 answered on 01 Dec 2011
6 answers
2.5K+ views
My colleague started on Telerik a few weeks ago. I am about to try and get up to speed. He gave me a project which I have set up with data on my workstation. We got Telerik, MM.NET and its Telerik subclasses installed, and figured out how to manually browse to the Telerik.Web.UI file i the Telerik install location.

However, I had downloaded a slightly later version of Telerik, Version=2010.2.929.35, from our shared account. The SP.NET app still had one reference error, and if we tried run it it would barf on the web.config file saying it could not find the Telerik.Web.UI.

My colleague showed me an email or exchange on forum from Telerik saying that for a the version in question, you could get the PublicKeyToken from the xml file.

We are using .NET 3.5 version, so in the \35 folder, I verified the version number in the properties of the Telerik.Web.UI.dll as 2010.2.929.35.

However, in the Telerik.Web.UI.XML, the only reference to a PublicKeyToken was in these two lines:

            <example>
                <code lang="CS" title="C#">
            spell1.CustomDictionarySourceTypeName = "RadSpellExtensions.CustomDictionarySource, RadSpellExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b5e57ccb698eab8e";
                </code>
                <code lang="VB" title="VB">
            spell1.CustomDictionarySourceTypeName = "RadSpellExtensions.CustomDictionarySource, RadSpellExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b5e57ccb698eab8e"
                </code>
            </example>


Naturally, the value there when placed in the web.config file did NOT solve the problem.

On another thread here

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/telerik-web-ui-radchart-is-not-defined.aspx

we found a reference to the version number, and a PublicKeyToken:

add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI, Version=2010.2.929.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>


so for the heck of it, we tried it in the web.config, and the program fired up.

So the question is, where are we SUPPOSED to be able to get the correct PublicKeyToken for a version of the .dll??

It is clearly not in the xml file in the \35 folder with this version.
Peter
Top achievements
Rank 1
 answered on 01 Dec 2011
1 answer
146 views
Hello all,

I setup a vertical CoverFlow RadRotator in a user control bound to a generic List<> but i cant seem to get the rotator to "wrap" using WrapFrames="true" and i only get 1 cycle of the items in the List<>. I've tried changing the binding to IEnumerables and string[].
For this example, the List<> is just List<string> vpaths.

Heres the markup for the rotator.

<

telerik:RadRotator ID="rotatorVerticalMediaItems" runat="server" Height="400px" Width="400px" CssClass="ucCoverArtRotatorV_RotatorStyle" RotatorType="CoverFlow" PauseOnMouseOver="false" Skin="Black" ScrollDuration="2000" ScrollDirection="Down,Up" FrameDuration="1" ItemHeight="300px" ItemWidth="202px" WrapFrames="true">

 

<ItemTemplate>

 

<div title='<%# Container.DataItem %>'>

<a href='<%# Container.DataItem %>'><img class="ucCoverArtRotatorV_CoverArtStyle" alt="" 
    
src='<%# Container.DataItem %>' /></a>

</div>

</ItemTemplate>

</telerik:RadRotator>

 
Thanks in advance.

Slav
Telerik team
 answered on 01 Dec 2011
1 answer
98 views
Hello,
I'm using the telerik grid but when I try to update any of the information, the grid disappears completely. Following are the steps I follow:
1. Click on the 'Edit' button for any of the row and update any information.
2. Press Update button.

As soon as I press 'Update' button, grid disappears. And when I reload the page, it appears again.
Following is the html code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
  <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="tgLicenseInfo">
      <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="tgLicenseInfo" LoadingPanelID="RadAjaxLoadingPanel1" />
      </UpdatedControls>
    </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="tgLicenseInfo" runat="server" AutoGenerateColumns="false" AllowSorting="true"
                                                            AllowPaging="true" AllowFilteringByColumn="true" OnNeedDataSource="tgLicenseInfo_NeedDataSource"
                                                            OnUpdateCommand="tgLicense_UpdateCommand">
  <EditItemStyle BackColor="AliceBlue" />
  <PagerStyle Mode="NextPrevAndNumeric" />
  <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" CommandItemDisplay="TopAndBottom" EditFormSettings-PopUpSettings-Modal="true">
    <Columns>
    <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-HorizontalAlign="Center"
                                                                        UniqueName="EditCommandColumn" HeaderText="Edit" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="false" />
    <telerik:GridBoundColumn DataField="LNumber" HeaderText="License #" SortExpression="LNumber"
                                                                        UniqueName="LNumber" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="StateDesc" HeaderText="State" SortExpression="StateDesc"
                                                                        UniqueName="StateDesc" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LType" HeaderText="Type" SortExpression="LType"
                                                                        UniqueName="LType" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LHolder" HeaderText="Holder" SortExpression="LHolder"
                                                                        UniqueName="LHolder" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LExpireDate" HeaderText="ExpireDate" SortExpression="LExpireDate"
                                                                        UniqueName="LExpireDate" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LicenseStatus" HeaderText="Status" SortExpression="LicenseStatus"
                                                                        UniqueName="LicenseStatus" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="VerifiedByUserID" HeaderText="Verified By" SortExpression="VerifiedByUserID"
                                                                        UniqueName="VerifiedByUserID" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridButtonColumn Text="Delete" CommandName="Delete" HeaderText="Delete"
                                                                        ButtonType="ImageButton" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    </Columns>
    <EditFormSettings EditFormType="Template">
      <EditColumn UniqueName="EditColumn"> </EditColumn>
      <FormTemplate>
        <table border="0" cellpadding="2">
          <tr>
            <td> License #:  </td>
            <td><asp:TextBox ID="txtLNumber" Width="150px" Text='<%# Bind( "LNumber") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> State:  </td>
            <td><asp:TextBox ID="txtState" Width="150px" Text='<%# Bind( "StateDesc") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Type:  </td>
            <td><asp:TextBox ID="txtLType" Width="150px" Text='<%# Bind( "LType") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Holder:  </td>
            <td><asp:TextBox ID="txtLHolder" Width="150px" Text='<%# Bind( "LHolder") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Exp Date:  </td>
            <td><asp:TextBox ID="txtLExpireDate" Width="150px" Text='<%# Bind( "LExpireDate") %>'
                                                                                        runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Status:  </td>
            <td><asp:TextBox ID="txtStatus" Width="150px" Text='<%# Bind( "LicenseStatus") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Verified By:  </td>
            <td><asp:TextBox ID="txtVerifiedByUserID" Width="150px" Text='<%# Bind( "VerifiedByUserID") %>'
                                                                                        runat="server"></asp:TextBox>
            </td>
          </tr>
        </table>
        <asp:Button ID="Button3" CommandName="Update" Text="Update" runat="server" />
        <asp:Button ID="Button3a" CommandName="Cancel" Text="Cancel" runat="server" />
      </FormTemplate>
    </EditFormSettings>
  </MasterTableView>
</telerik:RadGrid>


And following is the code behind:
protected void tgLicense_UpdateCommand(object source, GridCommandEventArgs e)
{
 try
  {
   if (e.CommandName == RadGrid.UpdateCommandName)
    {
      if (e.Item is GridEditFormItem)
       {
         GridEditFormItem item = (GridEditFormItem)e.Item;
         int iLID = Convert.ToInt32(item.GetDataKeyValue("ID"));
         if (iLID != 0)
          {
           TextBox txtLHolder = (TextBox)item.FindControl("txtLHolder");
           TextBox txtLType = (TextBox)item.FindControl("txtLType");
           TextBox txtLExpireDate = (TextBox)item.FindControl("txtLExpireDate");
           TextBox txtLicenseStatus = (TextBox)item.FindControl("txtStatus");
           TextBox txtVerifiedByUserID = (TextBox)item.FindControl("txtVerifiedByUserID");
           TextBox txtState = (TextBox)item.FindControl("txtState");
           //    DropDownList drdState = (DropDownList)item.FindControl("drdState");
           SaisUser oUser = (SaisUser)Cache[this.GUID + "User"];
           AgentLicense oLI = oUser.AgentInProcess.LicenseInfo[iLID];
           oLI.LExpireDate = txtLExpireDate.Text;
           oLI.LHolder = txtLHolder.Text;
           oLI.LicenseStatus = Convert.ToBoolean(txtLicenseStatus.Text);
           oLI.VerifiedByUserID = txtVerifiedByUserID.Text;
           oLI.LType = txtLType.Text;
           //      oLI.LState = drdState.SelectedItem.Value;
           oLI.LState = txtState.Text;
           //here license is saved
           ProcessResult oPR = oLI.Save(this.CnxnString, this.LogPath);
           if (oPR.Exception == null)
             {
              oUser.AgentInProcess.LicenseInfo[iLID] = oLI;
              Cache[this.GUID + "User"] = oUser;
              this.tgLicenseInfo.Rebind();
             }
            // else
            //   this.lblUpdate.Text = "Error:" + oPR.Exception.Message;
           }
       }
     }
   }
   catch (Exception Exc)
    {
      string script = "$(function(){initializedialog();showDialog(\"" + Exc.Message + "\");});";
      ScriptManager.RegisterStartupScript(this, this.Page.GetType(), "dialog", script, true);
    }
}

Can some one help me with this issue?
Iana Tsolova
Telerik team
 answered on 01 Dec 2011
2 answers
68 views
Hi,

We are working on a rich ASP.Net application using most of Telerik controls and we are facing a strange issue. Given below is the scenario:

1. User visits our site.
2. Navigates to different pages using different Menu options (RadMenu - on Top of page, RadPanelBar - on Left).
3. in the same browser window/tab, User opens any other website e.g. msn.com.
4. Now, user moves back to previous page (our website) using browser's back button.

Once user is back on our website, both left and top menu bars are not functional i.e. clicking on menu items performs no action. Clicking or double clicking a menu makes no difference. It start behaving in a way that if there is no Page linked to any of the menu.

What could be the reason? Any fixes/help?

We are using RAD Asp.Net AJAX Q2 2011

Thanks in acticipation!
DIT
Top achievements
Rank 1
 answered on 01 Dec 2011
5 answers
69 views
OK, I just inherited a project that uses these controls and I am not sure how to word this.  I have a page thatuse radtabstrip and multipage. I have several pages and when I click on to save, the tables are getting updated with all the values with the first tab and doesn't see anything else.  I also get the identity of the record and save it as a session variable for a child table and it doesn't see it either. Is it possible for me to see the controls on all the tabs? If so, how do I do it?
Genady Sergeev
Telerik team
 answered on 01 Dec 2011
5 answers
347 views
I have a RadDateTimePicker that needs to stay empty when the page loads. When the user selects a time from the TimePopupButton, the Date & Time are populated in the RadDateTimePicker.  The problem is the date portion that's populated is always today's date. How can I default this to another date, for example DateTime.Now.AddDays(1)?

If I set the "SelectedDate" property to DateTime.Now.AddDays(1), then the date that's populated works as expected. But setting "SelectedDate" causes the RadDateTimePicker to display this date when the page loads. I need it to be empty on page load and only populated if the user selects something from the PopUpButtons. 
Kevin
Top achievements
Rank 2
 answered on 01 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?