Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
375 views
-edit- nevermind I was reviewing outdated documentation.
Pavlina
Telerik team
 answered on 02 Sep 2010
2 answers
191 views
We have a RadGrid and when a row is clicked we want to make an ajax call to the database and populate some textboxes.

We tried using the RadAjaxManager but we only ever got a postback anyways.

We are now using an Updatepanel with a trigger. This makes the ajax part work but the Grid paging is now broken.

Could any1 give me a simple example, preferably step by step what is necessary to fill our needs?

Lars Thorén
Top achievements
Rank 1
 answered on 02 Sep 2010
3 answers
150 views
Hello Everyone,
First of all thanking for the great support from the Telerik team.

I have a problem with RadGrid when I'm using it with GridDropDownColumn.

My scenario:

I have a grid with GridDropDownColumn column. I load the values of  the ComboBox during ItemDataBound event and and select the values from it if I'm in edit mode. In this situation I don't see the text of this column in the grid table.
So I added in the ItemDataBound event a check if the item is GridDataItem and then set the GridDataItem.Text  to the right value (The text should be a little bit different from the text used in the ComboBox). It works OK now and showing the text in the Grid table.
Now I face another problem, I have NestedTemplate in this grid. When I expand the column the text of the GridDropDownColumn column disapears... How can I resolve this problem?

My code:
protected void AttributesRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            GridEditManager editMan = editedItem.EditManager;
  
            GridDropDownListColumnEditor fieldTypeEditor = editMan.GetColumnEditor("FieldType") as GridDropDownListColumnEditor;
            GridDropDownListColumnEditor attributeCategoryIDEditor = editMan.GetColumnEditor("AttributeCategoryID") as GridDropDownListColumnEditor;
              
            fieldTypeEditor.ComboBoxControl.Items.Add(new RadComboBoxItem("Text", "0"));
            fieldTypeEditor.ComboBoxControl.Items.Add(new RadComboBoxItem("Yes/No", "1"));
            fieldTypeEditor.ComboBoxControl.Items.Add(new RadComboBoxItem("Multi Yes/No", "2"));
            fieldTypeEditor.ComboBoxControl.Items.Add(new RadComboBoxItem("Select", "3"));
  
            FillAttributeCategoriesComboBox(attributeCategoryIDEditor.ComboBoxControl);
  
            if (e.Item.RowIndex != -1)
            {
                CellphonesCL.Database.attributes attr = (CellphonesCL.Database.attributes)e.Item.DataItem;
  
                fieldTypeEditor.ComboBoxControl.SelectedValue = attr.FieldType.ToString();
                attributeCategoryIDEditor.ComboBoxControl.SelectedValue = attr.AttributeCategoryID.ToString();
            }
        }
        else if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = e.Item as GridDataItem;
            CellphonesCL.Database.attributes attr = (CellphonesCL.Database.attributes)e.Item.DataItem;
  
            dataItem["AttributeCategoryID"].Text = attr.attributecategories.Title;
            dataItem["FieldType"].Text = attributes.GetAttributeFieldTypeStr((AttributeFieldType)attr.FieldType);
        }
    }


Regards,
Alex.
Alex Vr
Top achievements
Rank 1
 answered on 02 Sep 2010
3 answers
125 views
I am looking for a server-side equivalent of the client-side function IsPinned().  I am setting my windows to be invisible each time a page is posted back; however, if they have been pinned then I want to keep them visible.
Georgi Tunev
Telerik team
 answered on 02 Sep 2010
1 answer
82 views
Hello Sir,

i want to Preserve Template Colomn Value When Pagging is Allow in grid view.

For example if i have 2 Column in grid view.
   a). Id
   b). Name (It is Template Column Use Text box For Showing Data)

Now When I change Page 1 Data And When change Page 2 Data Again when i come back to Page 1 Then i want to See my changes
So Please Help me.

Thanks
Chandan Kumar.
Pavlina
Telerik team
 answered on 02 Sep 2010
3 answers
915 views
Hi There,

When I was trying to export an "number-like" text column, Excel (HTML) automatically treat it as a number.
For example: column "UserID" with data "000579" will be truncated to "579" in Excel.

Below are my functions. Is that any way to handle the cell format (force it to be TEXT) programmatically when it went to Excel?

' Add column to RadGrid1 Programmatically
Private Sub AddNewColumnToRadGrid(ByVal UniqueName As String, ByVal HeaderText As String,  ByVal DataField As String,  ByVal SortExpression As String)
        Dim boundColumn As New GridBoundColumn()
        RadGrid1.MasterTableView.Columns.Add(boundColumn)
        boundColumn.UniqueName = UniqueName
        boundColumn.HeaderText = HeaderText
        If DataField.Length > 0 Then boundColumn.DataField = DataField
        If SortExpression.Length > 0 Then boundColumn.SortExpression = SortExpression
End Sub
 
' Simple Export to Excel Function
Protected Sub btnExportToExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExportToExcel.Click
        RadGrid1.ExportSettings.FileName = "Report"
        RadGrid1.ExportSettings.ExportOnlyData = True
        RadGrid1.ExportSettings.IgnorePaging = True
        RadGrid1.ExportSettings.OpenInNewWindow = True
        RadGrid1.MasterTableView.ExportToExcel()
End Sub

Thanks in advance. :)

Regards,
waiwai
Wai Wai Chan
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
92 views
I've constructed a sliding pane inside of which is just a user control that contains a RadTreeView.  I've added code such that when a bottom-level node is clicked then the  RadSlidingPane collapses.  It works well except for one thing: When I then reopen the pane the height of it is suddenly much larger than before.  Please note that if I just open & close the pane without touching the treeview then this does not occur.  Here's a short video illustrating the problem: http://mwtech.com/downloads/public/ExcessiveHeight.zip

Here's the layout code:

  <telerik:RadSplitter ID="radSplitter" runat="server" LiveResize="false" Height="449">
    <telerik:RadPane ID="radPaneLeft" runat="server" Scrolling="None">
      <telerik:RadSlidingZone ID="radSlidingZone" runat="server" Width="22" ClickToOpen="true" DockedPaneId="radSlidingPane">
        <telerik:RadSlidingPane ID="radSlidingPane" runat="server" Title="Rates" Width="272" BackColor="#F0F8FF" TabView="ImageOnly" IconUrl="~/Images/hierarchy.gif">
          <asp:PlaceHolder ID="placeHolderHierarchy" runat="server" />
        </telerik:RadSlidingPane>
      </telerik:RadSlidingZone>
    </telerik:RadPane>

And here's the code to programmatically collapse the pane:

    public void CollapseHierarchyPane()
    {
      RadSlidingZone radSlidingZone = (RadSlidingZone)this.FindControl("radSlidingZone");
      if (radSlidingZone != null)
        radSlidingZone.DockedPaneId = null;
    }


Why is this occurring and how do I correct it?

Robert
Dobromir
Telerik team
 answered on 02 Sep 2010
2 answers
326 views
I am trying to achieve as shown in the attached images.
I did find this blog from one of the fellow Telerik guys
http://blogs.telerik.com/pavelpavlov/posts/09-12-04/adding_additional_power_to_radgridview_for_silverlight_with_attached_behaviors.aspx

but this done for winforms controls using silverlight.
Can i achive the same using asp.net ajax controls, i am using radGrid version version 2009.1.311.35 .
Waiting for someone to get me going.

Pavlina
Telerik team
 answered on 02 Sep 2010
3 answers
125 views
On my page I have telerik:radeditor control and few managers which configured within it. How can I change Behaviors property for that managers? I want make them not movable. Please help :)
<telerik:radeditor>
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="LinkManager" />
            <telerik:EditorTool Name="Unlink" />
            <telerik:EditorTool Name="ImageManager" />
            <telerik:EditorTool Name="DocumentManager" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:radeditor>
Ernesto
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
93 views
Hello everyone!! ok here is my case, i have my RadGrid, and if i want to add a new record, it shows my 3 textbox, so i can enter my data and save it. But when i want to edit data it shows my 3 textbox, how do i select wich textbox leave enabled or disabled, so the user cannot modify some of them.
Thank you very much for your help :)
Shinu
Top achievements
Rank 2
 answered on 02 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?