Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
114 views
I have a RadGrid with a FormTemplate for editing the grid rows.  In one case the grid is populated with multiple rows and the user clicks the 'Edit' button on the row to invoke the editing form.  In another case the grid is populated by a single row.  In the later case, how can I instruct the grid to automatically open the editing form for the single row record when the grid is initially rendered?
Dan
Top achievements
Rank 2
 answered on 12 May 2010
3 answers
147 views
In my case the Clear(); method throws an ArgumentOutOfRangeException.
.Remove() and RemoveAt() are the same.
What can be the reason?

I use toolbar to programmatically create and remove grouping.

Full code is below.

Thanks in advance


    GridGroupByExpression expr1 = new GridGroupByExpression(RadGrid1.Columns[1]);
RadGrid1.MasterTableView.GroupByExpressions.Add(expr1);
//this is fine.
But 
RadGrid1.MasterTableView.GroupByExpressions.Clear() .RemoveAt() throws the error.

Pavlina
Telerik team
 answered on 12 May 2010
5 answers
734 views
Hello Friends,

I have one page in that i created dynamically bound column and bind it to radgrid.

I need to apply grouping dynamically.

When i try to apply grouping than i got the below error.jpg(attachment) error.

Below is my .aspx code

<radG:RadGrid ID="dgVendorLists" runat="server" AllowSorting="True" AllowPaging="true"
            GroupPanel-Text="Drag and Drop Column Header To Regroup Column. " EnableAJAX="False"
            AllowFilteringByColumn="True" ShowGroupPanel="True" ExportSettings-ExportOnlyData="true"
            ExportSettings-IgnorePaging="true" ExportSettings-OpenInNewWindow="true" ShowFooter="false"
            Skin="Monochrome" BorderStyle="None" MasterTableView-CellPadding="0" EnableAJAXLoadingTemplate="False"
            GridLines="both" ClientSettings-ApplyStylesOnClient="true" Width="100%" PageSize="19" GroupingEnabled="true">
            <PagerStyle Mode="NumericPages" />
            <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" GroupLoadMode="Server"
                EnableColumnsViewState="true" TableLayout="Fixed">
                <ExpandCollapseColumn Visible="False">
                    <HeaderStyle Width="19px" />
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <Columns>
                </Columns>
            </MasterTableView>
            <ClientSettings EnableClientKeyValues="True" ReorderColumnsOnClient="True" AllowColumnsReorder="True"
                AllowGroupExpandCollapse="True" AllowDragToGroup="True">
                <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="405px">
                </Scrolling>
            </ClientSettings>
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
        </radG:RadGrid>



Below is my .vb code.

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
        CreateTempUserTable()
         End If
    End Sub
    Private Sub CreateTempUserTable()
        ViewState("dtUser") = Nothing
        Dim dt As New DataTable
        dt.Columns.Add("name")
        dt.Columns.Add("Companyid")
        Dim dr As DataRow
        Dim i As Integer
        For i = 0 To 10
            dr = dt.NewRow()
            dr("name") = "Test" & i
            If i = 0 Or i = 2 Or i = 4 Or i = 8 Then
                dr("Companyid") = "10"
            Else
                dr("Companyid") = "20"
            End If
            dt.Rows.Add(dr)
        Next

        Dim boundName As New GridBoundColumn
        boundName.AllowFiltering = True
        boundName.DataField = "name"
        boundName.HeaderText = "name"
        boundName.HeaderText = "name"
        boundName.GroupByExpression = "name"
        boundName.Groupable = True

        dgVendorLists.MasterTableView.Columns.Add(boundName)
        Dim boundCompanyId As New GridBoundColumn

        boundCompanyId.AllowFiltering = True
        boundCompanyId.DataField = "Companyid"
        boundCompanyId.HeaderText = "Companyid"
        boundCompanyId.UniqueName = "Companyid"
        boundCompanyId.SortExpression = "Companyid"
        boundCompanyId.Display = True
        boundCompanyId.Groupable = True
        boundCompanyId.GroupByExpression = "Companyid"
        dgVendorLists.MasterTableView.Columns.Add(boundCompanyId)
        dgVendorLists.DataSource = dt
        dgVendorLists.DataBind()
        ViewState("dt") = dt
    End Sub
    Protected Sub dgVendorLists_NeedDataSource(ByVal source As Object, ByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles dgVendorLists.NeedDataSource
       Me.dgVendorLists.DataSource = ViewState("dt")
    End Sub
 
    Protected Sub dgVendorLists_Grouping(ByVal source As Object, ByVal e As Telerik.WebControls.GridGroupsChangingEventArgs) Handles dgVendorLists.GroupsChanging
        Dim expression As GridGroupByExpression = New GridGroupByExpression
        Dim gridGroupByField As GridGroupByField = New GridGroupByField
        gridGroupByField = New GridGroupByField
        gridGroupByField.FieldName = "Companyid"
        expression.GroupByFields.Add(gridGroupByField)
        dgVendorLists.MasterTableView.GroupByExpressions.Add(expression)
        dgVendorLists.Rebind()
    End Sub

Please help me where i am wrong and how to implement grouping dynamically with dynamic column.


Thanks & Regards
Jignesh Patel

Pavlina
Telerik team
 answered on 12 May 2010
1 answer
141 views
How to open multiple radwindows based on one definition of one radwindow?

If I open multiple radwindows in different position, how can I retrieve their current positions?

Thanks
Georgi Tunev
Telerik team
 answered on 12 May 2010
1 answer
85 views
Hi,

I am stuck on a project for a while. please give me some suggestion.

The requirement is that there is a radlistbox which contains buttons in a radwindow AAA. Once I click any button inside the radlistbox, a new radwindow BXX will show up in a designed position according to which button has been clicked.If the button has not been clicked before,a new radwindow BXX will be opened. That means if I clicked two different buttons, two new radwindow BXX will be opened in the window. If the button has been clicked, there is no need to open new radwindow.

Also, the radwinow AAA which contains the radlistbox could be repositioned in the window. If it is repositioned, when I click any button inside the radlistbox, a position of new radwindow BXX according to the reposition.

My question 1 is. how to open multiple new radwindows BXX in desgined position? I use the code below and only get a radwindow BXX instead of multiple radwindow BXX.
 

 

 

function ShowWindow(assetId){

 

 

 

var pos = GetTopLeftWidthPosition(assetId);

 

 

 

var oMan = GetWindowManager();

 

 

 

var oWnd = oMan.getWindowById("WIDGETcf0376226a6944999bc3269b48fbc4ac");

 

oWnd.setUrl(

 

"<%=GetWidgetURL(Settings.PAGE_ASSETMARKETVIEW)%>" + "?aid=" + assetId, "WID_AMV_ONE"+assetId.toString());

 

oWnd.moveTo(pos.left,pos.top);

oWnd.show();

oWnd.setActive();

 

}

My question 2 is. When I reposition the radwindow AAA using the code below, it only work after second reposition.

 

 

 

var oMan= GetWindowManager();

 

 

 

var oWnd=oMan.getWindowByName("WIDGET74ce09f36ebe4fffa45389e9303526f2");

 

oWnd.setUrl("<%=GetWidgetURL(Settings.PAGE_ASSETSELECTOR)%>","WID_AMV_ONE");

 

 

 

oWnd.add_dragEnd(OnClientDragEnd);

oWnd.show();

 

 

 

var oMan= GetWindowManager();

 

 

 

var oWnd=oMan.getWindowByName("WIDGET74ce09f36ebe4fffa45389e9303526f2");

 

 

 

 

oWnd.setUrl("<%=GetWidgetURL(Settings.PAGE_ASSETSELECTOR)%>","WID_AMV_ONE");

 

 

 



 

 

 

function OnClientDragEnd(sender, eventArgs)

 

{

window.setTimeout(

 

function () {

 

bounds = sender.getWindowBounds();

}, 20);

}

Georgi Tunev
Telerik team
 answered on 12 May 2010
1 answer
70 views
We are using the rad editor 2008/q3 and are having two issues.

First, the find/replace dialog often covers the text that you're trying to find/replace.  Is there a way to move the dialog box dynamically so that it does not obscure the text is has found?

Second, the find/replace dialog has no border to set if off from the background that it covers.  Can I add a border to that dialog?

Thanks,
Ken
Rumen
Telerik team
 answered on 12 May 2010
3 answers
201 views
Hello!

I would like to seek guidance on how to best approach custom filters using date ranges with Start and End date values. On my grid, I only have one "Date" column that I would like to filter by 5 date ranges (I'm using a RadComboBox for the filter):
  • This Month
  • Last Month
  • Last 3 Months
  • Last 6 Months
  • Older than 6 Months

I can retrieve the correct dates using a RowFilter, as well as get the current filter value, but am not successful in displaying the filter results on the grid.

In my  class GridBoundColumnWithComboBoxFiltering : GridBoundColumn, this is what I have:
private void list_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            GridFilteringItem filterItem = (GridFilteringItem)((RadComboBox)o).NamingContainer;
            filterItem.FireCommandEvent("Filter", new Pair("Contains", this.UniqueName));
        }




protected override string GetCurrentFilterValueFromControl(TableCell cell)
        {
            if (((RadComboBox)cell.Controls[0]).Text == "Show All")
                return "";
            else
            {
                return ((RadComboBox)cell.Controls[0]).Text;
            }
        }

Thanks for your help!






Yavor
Telerik team
 answered on 12 May 2010
1 answer
94 views
OUr company purchased Telerik ASP.Net Ajax product and I am learning to use the RadScheduler control.
I have a question concerning discussion about data binding in your documentattion
Controls > RadScheduler > Data Binding > Using the Data Source Property:
I have my data source for all appointments in a Data Table (selected from a database with a completed schema) with each row of the table representing an approintment, I do not seem to understand how I could associate my data table to the List object, Appointments, as defined in the above mentioned document.
Could you help me with this?  Thanks.
Peter
Telerik team
 answered on 12 May 2010
2 answers
169 views
How do I find the GridGroupHeaderItem in EventArgs e

protected void ButtonApprove_Click(object obj, EventArgs e)  
{           
 // loop through rows  
    foreach (GridDataItem item in RadGrid1.MasterTableView.Items)  
    {  
     // How do I access the GridGroupHeaderItem ?  
    }  
} 
Mike
Top achievements
Rank 1
 answered on 12 May 2010
4 answers
358 views
I am using the version of RadEditor that comes with Sitefinity 3.6.1936 and am having an issue when the content is just one line or paragraph long.

After entering a line of text, there will be no paragraph tags wrapping the text. If I use the HTML view to wrap the text in paragraph tags and then save, this will work. If I then edit the text again, even if no changes are actually made, the paragraph tags will be stripped out.

I am using IE8, this is because the editor in Firefox producing code like the following:

Paragraph number one.
<p></p>
Paragraph number two.



Is there a configuration option that I can stop the RadEditor from removing the paragraph tags? Is this a know bug?

Thanks
Dave Cooper
Stanimir
Telerik team
 answered on 12 May 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?