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

Is there any ways that allow one user to override or accept the changes made by the previous users?

Please advise. Thanks.
Rumen
Telerik team
 answered on 01 Oct 2012
7 answers
172 views

I have a RadGrid where one of the columns is a GridTemplateColumn with a RadComboBox:

<telerik:RadGrid ID="EmployeeRadGrid" runat="server" Width="96%" GridLines="None"
            AutoGenerateColumns="False" PageSize="13" AllowSorting="True" 
            AllowPaging="True" ShowStatusBar="true" Visible="False"
            OnUpdateCommand="EmployeeRadGrid_UpdateCommand" 
            OnNeedDataSource="EmployeeRadGrid_NeedDataSource"
            OnInsertCommand="EmployeeRadGrid_InsertCommand" 
            OnDeleteCommand="EmployeeRadGrid_DeleteCommand" 
            onitemdatabound="EmployeeRadGrid_ItemDataBound"            
            >
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
            <MasterTableView DataKeyNames="EmployeeID" AllowMultiColumnSorting="True" Width="100%"
                CommandItemDisplay="Top" EditMode="InPlace">
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Name" SortExpression="Name" HeaderText="Navn"
                        DataField="Name" />
                    <telerik:GridTemplateColumn UniqueName="EmployeeID" HeaderText="Departement">
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem, "DepartementName")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox runat="server" ID="RadComboBox1" Width="200" 
                                DataTextField="Name" DataValueField="DepartementID" DataSourceID="DepartementDataSource"
                                AllowCustomText="False" EnableAutomaticLoadOnDemand="true" OnClientLoad="OnClientLoadHandler">
                            </telerik:RadComboBox>                              
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>

The RadComboBox1 is populated through the ItemDataBound event of the EmployeeRadGrid:

protected void EmployeeRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.IsInEditMode)
        {
             GridEditableItem item = (GridEditableItem)e.Item;
            if (!(e.Item is IGridInsertItem))
            {
                RadComboBox combo = (RadComboBox)item.FindControl("RadComboBox1");
                combo.Items.Clear();
  
                List<DepartementResult> deps = getDepartements();
  
                foreach (DepResult dep in deps)
                {
                    RadComboBoxItem newItem = new RadComboBoxItem();
                    newItem.Text = dep.Name;
                    newItem.Value = dep.DepartementID.ToString();
                    newItem.Attributes.Add("DepartementName", dep.Name);
  
                    combo.Items.Add(newItem);
                    newItem.DataBind();
                }
                combo.SelectedValue = ((DepartementResult)e.Item.DataItem).DepartementID.ToString();
            }
        }
    }

I also have another RadGrid, where all the departements are listed, and the user can make changes to them.

What I want is that the departements listed in RadComboBox1 are updated after changes are made in the DepartementRadGrid. Now what happens is that the RadComboBox1 is disabled in a way, - nothing happens if I click on it. The other column in the EmployeeRadGrid is editable.

If I open my page and go straight to the EmployeeRadGrid, I can access the RadComboBox1, and change the departement. But if I make changes in the EmployeeRadGrid, the RadComboBox is not responsive.

Any help is appreciated.

Marin
Telerik team
 answered on 01 Oct 2012
1 answer
89 views
Hi

I need a RadComboBox that when I click on it and it opens its DropDown, a RadMenu opens too (simultaneously)

Is it possible??

Can you guide me?
Ivana
Telerik team
 answered on 01 Oct 2012
1 answer
60 views

I did customized the radgrid so as to get the grid according to the requirement. But the Calendar Filter and pager button is not getting displayed properly.
Even after customizing, I can see the WebResource CSS in the firebug. I disabled the EmbeddedStyleSheetClass. I like to get some help on this. I will attach the screenshot for the reference. Thanks in advance.
Eyup
Telerik team
 answered on 01 Oct 2012
3 answers
116 views
I am trying to set up a grid with automatic crud operations and the date field is crashing my app.  Seems the date is getting entered as 00-00-0000 on update or insert.

Everything displays fine in the grid.

Any idea how to correct?
Andrey
Telerik team
 answered on 01 Oct 2012
1 answer
105 views
I'm a little stuck trying to figure out the best way to do this.

Scenario: Using the TreeView to allow a user to create, edit, and sort menu items. It's going to allow an end user to build the menu of their web site.

The data table is simple, an ID, Parent ID, Display Text, and a Sort column (Int).

I am connecting the data table to a LinqDataSource which is then attached to the TreeView. I have the data source ordering by the sort column.

I have everything set up to allow drag and drop and I'm using the NodeDrop event to handle the dragging and dropping of nodes. However, I'm running into a problem trying to get to the data in the Node. I need to access the Sort column of that row so I can resort the list. DataItem is null, which the documentation says it will be and to use custom properties or the value property. I don't use Value for anything, but even if I saved the ID to that, I would still need the sort property. Plus, since the data source orders by the sort column, I wouldn't be able to just put the sort column in as a custom property as that won't properly sort the list.

Is there a way to get and change the underlying data that is attached to that node?
Plamen
Telerik team
 answered on 01 Oct 2012
1 answer
89 views
I am getting Access Denied on the following line of code, within the Telerik.Web.UI.WebResource.axd file only when using IE
    g=e.screenLeft-top.screenLeft-top.document.documentElement.scrollLeft+2

My site is hosted in an IFrame, the main site is https://www.somesite.com/page.aspx this hosts an IFrame which points to my pages at https://www.mysite.com/default.aspx 

I have tride some of the solutions here but none of them seem to make any difference. One post had an answer that there is no solution for this issue, as i think this is a cross domain issue is that still the case?

Julian
Tsvetina
Telerik team
 answered on 01 Oct 2012
1 answer
107 views

I want to display Line Chart Programmatically. I do not want to display anything on X-Axis. I want to display some integer values on Y-Axis. By using the below code Line chart is getting displayed but some series are not fully getting displayed.

I am using dataTable (dt) to bind the chart.
Below are the two different approaches.

With first approach, i am getting the series in chart, but which is not using full length of x-axis irrespective of series item data for each series.

With second approach, i am not able to view the series in the chart. In order to resolve the issue with first approach, i also tried this second approach.

if (dt != null && dt.Rows.Count > 0)
{
    //First approach STARTS
    RadChartBiddingLineGraph.DefaultType = Telerik.Charting.ChartSeriesType.Line;
    RadChartBiddingLineGraph.PlotArea.YAxis.AutoScale = false;
    RadChartBiddingLineGraph.PlotArea.YAxis.AddRange(Convert.ToInt32(dt.Rows[0][3]), Convert.ToInt32(dt.Rows[0][4]), 10);
    RadChartBiddingLineGraph.DataGroupColumn = "Hotel";
    RadChartBiddingLineGraph.DataManager.ValuesYColumns = new String[] { "RateValue" };
    RadChartBiddingLineGraph.DataSource = dt;
    RadChartBiddingLineGraph.DataBind();
    foreach (Telerik.Charting.ChartSeries series in RadChartBiddingLineGraph.Series)
    {
        series.Appearance.LabelAppearance.Visible = false;
        RadChartBiddingLineGraph.PlotArea.XAxis.Appearance.LabelAppearance.Visible = false;
    }
    //First approach ENDS
 
 
    //Second approach STARTS
    DataTable dt2 = new DataTable();
    // Get the distinct records. HERE dt1 is the table in which there are all records(which are retrieved from SP)
    dt2 = dt.DefaultView.ToTable(true, dt.Columns[0].ColumnName);
    int s = 0;
    RadChartBiddingLineGraph.PlotArea.YAxis.AutoScale = false;
    RadChartBiddingLineGraph.PlotArea.YAxis.AddRange(120, 185, 5);
    foreach (DataRow item in dt2.Rows) //dt2 is the datatable in if have now distinct AuctionInviteIDs
    {
        //just get the data on basis of AuctionInviteId
        //if want the result in datatable
        DataTable dtFilteredTable = (from a in dt.AsEnumerable()
                                     where a.Field<Int32>("AuctionInviteID").Equals(item["AuctionInviteID"])
                                     select a).CopyToDataTable();
        ChartSeries chartSeries = new ChartSeries();
        chartSeries.Name = s.ToString();
        RadChartBiddingLineGraph.AddChartSeries(chartSeries);
        chartSeries.Type = ChartSeriesType.Line;
 
        foreach (DataRow item2 in dtFilteredTable.Rows)
        {
            chartSeries.AddItem(Convert.ToInt32(item2["RateValue"]));
            //RadChartBiddingLineGraph.Series[s].AddItem(Convert.ToInt32(item2["RateValue"]));
        }                                       
        RadChartBiddingLineGraph.Series.Add(chartSeries);
        s = s + 1;                                   
    }
    RadChartBiddingLineGraph.DataGroupColumn = "Hotel";
    RadChartBiddingLineGraph.DataSource = dt;
    RadChartBiddingLineGraph.DataBind();
 
    foreach (Telerik.Charting.ChartSeries series in RadChartBiddingLineGraph.Series)
    {
        series.Appearance.LabelAppearance.Visible = false;
        RadChartBiddingLineGraph.PlotArea.XAxis.Appearance.LabelAppearance.Visible = false;
    }
    //Second approach ENDS
 
}

With first approach, i am getting the graph "Result.jpg" as in the attachment, which is not using the full length of x-axis for each series.
I need the graph to be displayed as in "Approach-1.jpg" attachment, which uses the full length of x-axis for each series.

Your help would be appreciated.

Peshito
Telerik team
 answered on 01 Oct 2012
4 answers
75 views
I am looking for some way to display a progress bar for a survey.  The progress would increase with each question completed.  I see a RadProgressArea tool in the list but I can't figure out how to use it for this purpose.  Any suggestion to point me in the right direction would be greatly appreciated.
Peter Filipov
Telerik team
 answered on 01 Oct 2012
1 answer
156 views
Hi, I have a problem when I try to use the radwindow (confirm or alert) with javascript, please help me!

Here is my code:

function ShowOverCash() {
  var strOver = "";
  strOver = $("#<%=hdMsg.ClientID%>").attr("innerHTML");
  //alert(strOver);
  //var oConfirm = radconfirm(strSobreGiro, "aprSobreGiro", 700, 350, null, "La solicitud presenta Sobregiro");
 
  var oConfirm = radalert("hello", "aprSobreGiro");
}
 
function aprSobreGiro(arg) { 
  alert(arg);
  return false;
}

I have commented thr original code for test, but doesn't work.

when the program call the function ShowOverCash, fire a Error like this:
 Microsoft JScript runtime Error: can´t get the property value from '_visibilityMode': the object is undefined or null 

Marin Bratanov
Telerik team
 answered on 01 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?