Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
111 views
Hi All,

I have a radwindow with content overflowing its width making horizontal scroll bars visible.bars are visible. Is it possible to wrap the contents of rad window so that horizontal scroll-bar is removed.

I have to do some process on click of button and then have to show rad window after post-back? How can this be achieved.

Thanks in advance for helping...
Georgi Tunev
Telerik team
 answered on 25 Oct 2010
1 answer
155 views
Hello,

i want to create a very simple filter in the headercontextmenu of a radgrid.
The filter should consist of one textbox.
If the "enter"-key is pressed, the grid-content should be filtered.
The filter should be work per column.

Is this possible?
Can you explain me, how i can realize this?

I've attached two files (screenshots).
FilterIst.jpg = this is the filter in my current grid.
FilterSoll.jpg = this is the filter, i want to have.

kind regards
Karsten
Marin
Telerik team
 answered on 25 Oct 2010
1 answer
59 views
Hi all,

we were doing the following before the service pack and we were able to get the related information, we add the attibutes from code-behid.

editor._rootElement.attributes["clientID"].value;


but after the latest service pack we run into the following error, can someone help?

Message: 'editor._rootElement.attributes' is null or not an object


Thanks
-Nen
Dobromir
Telerik team
 answered on 25 Oct 2010
1 answer
97 views

    Hi,

    Could you please clarify the following query:-   

    How to refresh child record of the hierarchial grid without making the  child to be closed.

    Thanks.
  

 


Princy
Top achievements
Rank 2
 answered on 25 Oct 2010
1 answer
148 views
I'm using a radgrid with a gridbuttoncolumn as the last column in the grid. It has a delete command. 

How would I prevent the button from appearing for a single row? The data is sorted by PK "id" field. It's the first item in the grid (id=1) that I do not want anyone to delete. Is there any way to hide the delete button for this particular row? Thanks.

Princy
Top achievements
Rank 2
 answered on 25 Oct 2010
1 answer
104 views
Hello

I'm trying to access GridBoundColumns data. It is returning ' ' when that cell is blank. Is something wrong in the code?

Thanks
Neelima

Private Sub RadgridDestination_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadgridDestination.SelectedIndexChanged
  
        Dim row As GridDataItem = RadgridDestination.Items(RadgridDestination.SelectedIndexes(0))
  
With uc_Addr 'uc_Addr is a UserControl
 .Addr2  = row("Address2").Text     ' here .Addr2 =    when Address2 columnis blank 
End With
End Sub
  <telerik:RadGrid ID="RadgridDestination" runat="server" 
     AllowSorting="True"  ShowGroupPanel="True" 
     AutoGenerateColumns="False"
          Skin="Sunset" AllowPaging="True" GridLines="None">
  
        <GroupingSettings ShowUnGroupButton="True"  />
        <ClientSettings AllowDragToGroup="True" allowcolumnsreorder="True" 
            columnsreordermethod="Reorder" reordercolumnsonclient="True" >
        </ClientSettings>
          
  
<MasterTableView EditMode="InPlace" DataKeyNames="Destination_ID" GroupLoadMode="Client" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
  
    <Columns>
<telerik:GridBoundColumn DataField="Addr2" HeaderText="Address2" UniqueName="Address2" ReadOnly="true"></telerik:GridBoundColumn>
'
'
'
'
'
</Columns>
           <EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
</MasterTableView>
  
  
    </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 25 Oct 2010
5 answers
156 views

hi,

I have created a dynamic tab function. When i click button1 it will create dynamic tab and pageview for that tab. But when i deleted that tab that pageview is not deleting. Can any one help me to fix this

HERE IS MY SAMPLE CODE

using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using Telerik.WebControls; 
using Telerik; 
 
public partial class Radstrip2 : System.Web.UI.Page 
    protected System.Web.UI.WebControls.Label PageContent; 
    protected System.Web.UI.WebControls.Repeater BuildingSummary; 
    protected Telerik.WebControls.PageView PageView1; 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            Tab tab = new Tab(); 
            tab.Text = string.Format("New Page {0}", 1); 
            RadTabStrip1.Tabs.Add(tab); 
 
            PageView pageView = new PageView(); 
            RadMultiPage1.PageViews.Add(pageView); 
 
            BuildPageViewContents(pageView, RadTabStrip1.Tabs.Count); 
            RadTabStrip1.SelectedIndex = 0
 
        } 
    } 
 
    private void BuildPageViewContents(PageView pageView, int index) 
    { 
        pageView.ID = "Page " + index.ToString(); 
        pageView.Controls.Add(new LiteralControl(" <B>New page</B>" + (index).ToString())); 
    } 
 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
 
        Tab tab = new Tab(); 
        tab.Text = string.Format("New Page {0}", RadTabStrip1.Tabs.Count + 1); 
        RadTabStrip1.Tabs.Add(tab); 
 
        PageView pageView = new PageView(); 
        pageView.ID = "Page " + pageView.Index.ToString(); 
        RadMultiPage1.PageViews.Add(pageView); 
 
        BuildPageViewContents(pageView, RadTabStrip1.Tabs.Count); 
        RadTabStrip1RadTabStrip1.SelectedIndex = RadTabStrip1.SelectedIndex + 1; 
        RadMultiPage1.SelectedIndex = RadTabStrip1.SelectedIndex; 
 
    } 
 
    protected void Button2_Click(object sender, EventArgs e) 
    { 
        Tab currentTab = RadTabStrip1.InnerMostSelectedTab; 
 
        if (currentTab != null) 
        { 
            ITabContainer owner = currentTab.Owner; 
            owner.Tabs.Remove(currentTab); 
            //RadMultiPage1.PageViews.Remove(currentTab.PageView); 
            if (owner.Tabs.Count > 0) 
            { 
                owner.SelectedIndex = 0
            } 
        } 
    } 
 
    protected void RadMultiPage1_PageViewItemCreated1(PageView view, int viewIndex) 
    { 
        BuildPageViewContents(view, viewIndex + 1); 
    } 
 
CWT
Top achievements
Rank 1
 answered on 25 Oct 2010
1 answer
323 views
I have a very simple Grid with a template field containing a radio button:

<telerik:RadGrid ID="rg_VehicleImages" runat="server" 
                  AllowAutomaticDeletes="True" AutoGenerateDeleteColumn="True" CssClass="radgrid" 
                  DataSourceID="sds_ImagesVehicle" GridLines="None" Width="220px">
                  <mastertableview autogeneratecolumns="False" datakeynames="IDImages" 
                  datasourceid="sds_ImagesVehicle">
                      <rowindicatorcolumn>
                          <HeaderStyle Width="20px" />
                      </rowindicatorcolumn>
                      <expandcollapsecolumn>
                          <HeaderStyle Width="20px" />
                      </expandcollapsecolumn>
                      <Columns>
                          <telerik:GridBoundColumn DataField="IDimages" DefaultInsertValue="" 
                              HeaderText="" ItemStyle-ForeColor="White" ItemStyle-Width="2px" 
                              SortExpression="True" Visible="True">
                              <HeaderStyle Width="2px" />
                              <ItemStyle ForeColor="White" Width="2px" />
                          </telerik:GridBoundColumn>
                          <telerik:GridImageColumn AlternateText="Thumbnail" 
                              DataImageUrlFields="FilePath, ThumbnailName" DataImageUrlFormatString="{0}/{1}" 
                              DataType="System.String" FooterText="ImageColumn footer" HeaderText="" 
                              ImageAlign="Middle" UniqueName="vehicleimage">
                              <HeaderStyle Width="75px" />
                          </telerik:GridImageColumn>
                          <telerik:GridBoundColumn DataField="ThumbnailName" DefaultInsertValue="" 
                              HeaderText="ThumbnailName" SortExpression="ThumbnailName" 
                              UniqueName="ThumbnailName" Visible="False">
                          </telerik:GridBoundColumn>
                          <telerik:GridTemplateColumn DefaultInsertValue="" UniqueName="rbt_VehicleImage">
                              <ItemTemplate>
                                  <asp:RadioButton ID="rbt_VehicleImage" GroupName="MyGroup"
                                  onclick="MyClick(this,event)" runat="server" />
                              </ItemTemplate>
                          </telerik:GridTemplateColumn>
                      </Columns>
                  </mastertableview>
                  <clientsettings>
                      <clientevents onrowdblclick="RowClick" />
                  </clientsettings>
              </telerik:RadGrid>

The grid displays images of a vehicle selected from a database on the key field IDVehicle where tbl_Images.IDVehicle = tbl_Vehicles.IDVehicle

There may be many images for the vehicle so I need to be able to allow the user to select one image as the 'default' or main image to use on reports. To do this I thought it would be simple to add a radio button to the grid so that when the user selectes the radio button the database would be updated so that the DefaultImage field (SQLDataType = BIT) would be set to True for the selected radio button and all of the other buttons with the same IDVehicle would be set to False. Something like:

Protected Sub rg_VehicleImages_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rg_VehicleImages.ItemDataBound
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim RadioBtn As RadioButton = DirectCast(item.FindControl("rbt_VehicleImage"), RadioButton)
        If RadioBtn.Checked = False Then
            Dim sql As String
            Dim strConnString As [String] = System.Configuration.ConfigurationManager.ConnectionStrings("CF_SQL_Connection").ConnectionString()
            sql = "UPDATE CF_Images SET DefaultImage = @Value WHERE IDImages = @IDImages"
            Dim connection As New SqlConnection(strConnString)
            Dim command As New SqlCommand(sql, connection)
            Dim IDImages As Int32 = DirectCast(item.GetDataKeyValue("IDImages"), Int32)
            command.Parameters.Add("@IDImages", SqlDbType.Int).Value = IDImages
            command.Parameters.Add("@Value", SqlDbType.Int).Value = "0"
            command.Connection.Open()
            command.ExecuteNonQuery()
            command.Connection.Close()
        Else
            Dim sql As String
            Dim strConnString As [String] = System.Configuration.ConfigurationManager.ConnectionStrings("CF_SQL_Connection").ConnectionString()
            sql = "UPDATE CF_Images SET DefaultImage = @Value WHERE IDVehicles = @IDVehicles AND IDImages = @IDImages"
            Dim connection As New SqlConnection(strConnString)
            Dim command As New SqlCommand(sql, connection)
            Dim IDImages As Int32 = DirectCast(item.GetDataKeyValue("IDImages"), Int32)
            Dim IDVehicles As String = Request.QueryString("IDVehicles")
            command.Parameters.Add("@IDVehicles", SqlDbType.Int).Value = IDVehicles
            command.Parameters.Add("@IDImages", SqlDbType.Int).Value = IDImages
            command.Parameters.Add("@Value", SqlDbType.Int).Value = "1"
            command.Connection.Open()
            command.ExecuteNonQuery()
            command.Connection.Close()
        End If
    End If
End Sub

Of course this does not work. I am not sure if it is because I am attempting this using the Grid ItemDataBound argument and not one associated with the radio button.

Any help much appreciated.


Allan
Top achievements
Rank 2
 answered on 25 Oct 2010
1 answer
63 views
Hello,

I have a code to set content of the editor when it get blur.

function OnClientLoad(editor, args) {
            var element = document.all ? editor.get_document().body : editor.get_document();
            $telerik.addExternalHandler(element, "blur", function(e) {
                if (editor.get_text() == "") {
                    editor.set_html("content");
                }     
           });
        }

but It set the focus back to editor.

I want to set the editor content without set it's focus.


Thanks,
Mohamed Ramadan
Rumen
Telerik team
 answered on 24 Oct 2010
0 answers
74 views
rtl
when I use radcombobox with rtl property, the values appears first left to right side and then the control has refresh and values appears as expected
efrat
Top achievements
Rank 1
 asked on 24 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?