Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
122 views
I've purchased and implemented the 2010.Q3 controls.  Everything seems to be working fine in my project except for one thing:

I've implemented a RadSlidingPane in this fashion in a User Control:

<asp:Panel ID="panelMain" runat="server" style="padding-top:10px"><br>  <telerik:RadSplitter ID="radSplitter" runat="server" LiveResize="false" Height="449" OnClientLoaded="radSplitter_Load"><br>    <telerik:RadPane ID="radPaneLeft" runat="server" Scrolling="None"><br>      <telerik:RadSlidingZone ID="radSlidingZone" runat="server" Width="22" Height="0" ClickToOpen="true" DockedPaneId="radSlidingPane"><br>        <telerik:RadSlidingPane ID="radSlidingPane" runat="server" Width="240" BackColor="#F0F8FF" CssClass="slidingPane" TabView="TextAndImage" IconUrl="~/Images/hierarchy.gif" <br>                                DockOnOpen="true" OnClientBeforeExpand="radSlidingPane_BeforeExpand" OnClientUndocked="radSlidingPane_Undocked"><br>          <asp:Panel ID="panelTree" runat="server" Width="90%" Height="400px" BorderColor="DarkGray" BorderStyle="Groove" BorderWidth="1" style="margin-left:10px; margin-top:10px"><br>            <asp:PlaceHolder ID="placeHolderHierarchy" runat="server" /><br>          </asp:Panel><br>        </telerik:RadSlidingPane><br>      </telerik:RadSlidingZone><br>    </telerik:RadPane>

But when my code tries to load the user control, I get this error message:

Microsoft JScript runtime error: 'radSlidingPane_BeforeExpand' is undefined

I assure you that this Javascript function does exist!  A further clue is that if I remove OnClientBeforeExpand="radSlidingPane_BeforeExpand" then I get an error informing me that 'radSlidingPane_Undocked' is undefined .  It's as if these Javascript functions are somehow not yet loaded at the time they're needed.

What's even more frustrating is that all of this code used to work perfectly!  But clearly I've changed something [somewhere] and only now am discovering that this bug has arisen.

I'm hoping that I've given you enough info to help me pinpoint what the issue is here.  Any help you could provide would be much appreciated!

Sincerely,

Robert Werner
Vancouver, BC
Dobromir
Telerik team
 answered on 11 Jan 2011
2 answers
100 views
I am using a RadGrid and doing group by with jobstateName but when I bind the data my last stage comes first with users.
For example:

I have four stages (stage1, stage2, stage3, stage4)
and i want that when i bind the data my stage1 appears first with their respective users but right now it is appearing in the descending order like
stage4, stage3, stage2 and stage1

I also don't want that my jobStateName appears at the header of the grid  ....

  <telerik:RadGrid ID="gvUserJobMapping" runat="server" PageSize="10" AllowSorting="True"
            GroupingEnabled="true" AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="False"
            GridLines="None" CssClass="gridviewSpacing gvJobStates">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView Width="50%" GroupLoadMode="Client" TableLayout="Fixed">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="JobStateName" FieldAlias="JobStateName" HeaderText="Job Stages"
                                FormatString="{0:D}"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="JobStateName" FieldAlias="JobStateName" HeaderText="Job Stages"
                                ></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <telerik:GridBoundColumn SortExpression="JobID" HeaderText="JobID" HeaderButtonType="TextButton"
                        DataField="JobID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="JobStateID" HeaderText="JobStateID" HeaderButtonType="TextButton"
                        DataField="JobStateID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="JobID" HeaderText="JobID" HeaderButtonType="TextButton"
                        DataField="JobID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="UserID" HeaderText="UserID" HeaderButtonType="TextButton"
                        DataField="UserID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="RoleID" HeaderText="RoleID" HeaderButtonType="TextButton"
                        DataField="RoleID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="UserName" HeaderText="User Name" HeaderButtonType="TextButton"
                        DataField="UserName">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSendEmail" runat="server"></asp:CheckBox>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="False"
                AllowColumnsReorder="True">
            </ClientSettings>
        </telerik:RadGrid>
Muhammad
Top achievements
Rank 1
 answered on 11 Jan 2011
0 answers
65 views
We have two MOSS wfe servers, one of the servers the editor works fine, on the other it does not save changes.  What should I check?
Shon Miles
Top achievements
Rank 1
 asked on 11 Jan 2011
3 answers
45 views
Say I have the same appointment between 8AM -> 10AM, on sunday, monday, and tuesday
In weekly view, It is nice to have a big box spanning on hours and days, to fill the whole area instead of having 3 boxes for each day. Is it available now ? Is there a way to get this done ?

Thanks
Peter
Telerik team
 answered on 11 Jan 2011
5 answers
133 views
I have a Heierarchy RadGrid with one detail table and when I perform an insert on the detail table I perform an insert into the datasource of the parent table and everything works fine until I try to rebind the grid using " e.Item.OwnerTableView.ParentItem.OwnerTableView.DataBind()" in the RadGrid1_InsertCommand. I get an error "Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object." I tried to step through and it seems as if maybe it's erroring when trying to populate a control although I'm not sure. If I remove the rebind line it does the insert and I see the change after refreshing the grid which leads me to believe the data is good. Thanks for any help.
AkAlan
Top achievements
Rank 2
 answered on 11 Jan 2011
4 answers
252 views
Hi,

is there a possibility how I can hide directories displayed in right side (grid) of fileexplorer ?

I just want to display directories on left side.

I tried this:

 

function OnFileExplorerClientLoad(oExplorer, args) {
var masterTable = oExplorer.get_grid().get_masterTableView();

var items = masterTable.get_dataItems();

for (var i = 0; i < items.length; i++) {

var row = items[i];

row.visible = row.isDirectory();
}

Thank you

Dobromir
Telerik team
 answered on 11 Jan 2011
1 answer
95 views
I have a link (lnkSearch) that is ajaxed, which populates a grid when its clicked.  (link is ajaxed using RadAjaxManager)
I also have a button (btnExport) in the grid's PagerTemplate, which when clicked does the telerik grid.masterview.ExportToExcel() command.
However, since lnkSearch is ajaxed, the ExportToExcel() command doesn't work.

The lnkSearch is outside of the grid, so the following suggested telerik workaround doesn't get fired off when the user
clicks lnkSearch.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnRequestStart="OnRequestStart"

<script type="text/javascript">
   function onRequestStart(sender, args)
   {
       if (args.get_eventTarget().indexOf("btnExport") >= 0)
           args.set_enableAjax(false);
   }
</script>  

I have also tried the following but it didn't help either.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        Button btnExport = (Button)e.Item.FindControl("btnExport");
        ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnExport);
    }
}

The ExportToExcel() does work when I disable ajax for the lnkSearch, which I want to avoid.

Thanks for your help!
- weezie

Mira
Telerik team
 answered on 11 Jan 2011
3 answers
79 views

i tried using this method in creating a Custom Filter Column

http://www.telerik.com/help/aspnet/grid/grdfilteringwithdropdownlist.html
and it works fine but when i tried using the radcombobox instead of MS DropDown List the selceted index changed doesn't works so can anyone help me in this

public class FilteringTemplateColumns : GridBoundColumn
   {
 
       string _dataSourceID;
 
       public string DataSourceID
       {
           get { return _dataSourceID; }
           set { _dataSourceID = value; }
       }
 
       string _dataTextField;
 
       public string DataTextField
       {
           get { return _dataTextField; }
           set { _dataTextField = value; }
       }
 
       string _dataValueField;
 
       public string DataValueField
       {
           get { return _dataValueField; }
           set { _dataValueField = value; }
       }
 
       protected override void SetupFilterControls(TableCell cell)
       {
           base.SetupFilterControls(cell);
           cell.Controls.RemoveAt(0);
           RadComboBox rcBox = new RadComboBox();
           rcBox.ID = "cmb" + this.DataField;
           rcBox.AutoPostBack = true;
           rcBox.DataTextField = DataTextField;
           rcBox.DataValueField = DataValueField;
           rcBox.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(rcBox_SelectedIndexChanged);
           rcBox.DataSourceID = DataSourceID;
           rcBox.AppendDataBoundItems = true;
           rcBox.Items.Insert(0, new RadComboBoxItem("", ""));
           rcBox.Items.Insert(1, new RadComboBoxItem("All", "All"));
           cell.Controls.AddAt(0, rcBox);
           cell.Controls.RemoveAt(1);
       }
 
       void rcBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
       {
           RadComboBox list = sender as RadComboBox;
           GridFilteringItem filterItem = (sender as RadComboBox).NamingContainer as GridFilteringItem;
           if (this.DataType == System.Type.GetType("System.Int32") ||
               this.DataType == System.Type.GetType("System.Int16") ||
               this.DataType == System.Type.GetType("System.Int64"))
           {
               filterItem.FireCommandEvent("Filter", new Pair("EqualTo", this.UniqueName));
           }
           else // treat everything else like a string
           {
               if (list.SelectedValue != "All")
                   filterItem.FireCommandEvent("Filter", new Pair("Contains", this.UniqueName));
               else
                   filterItem.FireCommandEvent("Filter", new Pair("NoFilter", this.UniqueName));
           }
 
 
       }
 
 
 
       protected override void SetCurrentFilterValueToControl(TableCell cell)
       {
           base.SetCurrentFilterValueToControl(cell);
           RadComboBox list = (RadComboBox)cell.Controls[0];
           if (this.CurrentFilterValue != string.Empty)
           {
               list.Items.Clear();
               list.AppendDataBoundItems = true;
               list.DataBind();
               list.SelectedItem.Text = this.CurrentFilterValue;
               list.Items.Insert(0, new RadComboBoxItem("", ""));
               list.Items.Insert(1, new RadComboBoxItem("All", "All"));
           }
       }
 
       protected override string GetCurrentFilterValueFromControl(TableCell cell)
       {
           RadComboBox list = (RadComboBox)cell.Controls[0];
           return list.SelectedItem.Text;
       }
       protected override string GetFilterDataField()
       {
           return this.DataField;
       }
 
   }

Nikolay Rusev
Telerik team
 answered on 11 Jan 2011
1 answer
145 views
I'm trying to handle a RadDock close command client side so that I can set some other booleans in javascript, but I can't figure it out. I tried doing:
<tel:DockCommand OnClientCommand="CloseEmail" />

then having a javascript function

function CloseEmail(sender, eventArgs) {
    if (sender.get_dockZoneID() != "") {
        showingEmailDetail = false;
        sender.set_closed(true);
    }
}

but that wasn't firing (I put an alert() in there that wasn't showing).
I also tried using
<tel:DockCloseCommand OnClientCommand="CloseEmail" />

but that didn't fire it either. The javascript function is declared globally. Any ideas?
Svetlina Anati
Telerik team
 answered on 11 Jan 2011
2 answers
81 views
I am having trouble getting my dock to save state when I move my panels.  Is there a way to make dock automatically trigger save state without clicking a button or something?  Also is there a way to make my controls auto refresh in my docks?  Like setup a timer in update panel. Thanks
Pero
Telerik team
 answered on 11 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?