Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
Any help with this problem would be appreciated (it isn't really Telerik specific)

I have a RadListView with an sqlDataSource. I have two problems. First I want to calculate a column in the sqldatasource. I have a table with a column called Owner and want to create a bool which indicates whether the present user is the owner of that record. ie

Select *, (Owner=@User) as mine where....

But this doesn't work so how can you calculate a columnwithin a select statement?

Second problem which is more related to the Rad control is that I am using an itemTemplate in the listView and would like to have a button within that template where I control the "visible" based on the value of the calculated column ("mine"). I have tried

Visible='<%#Eval("mine")%>'

but get a cast error (to avoid the first problem I have just calculated mine as 'true' in the datasource).

Iana Tsolova
Telerik team
 answered on 09 Feb 2011
1 answer
169 views
Hi,

1. I can hide Axis Scale visibility by setting  property. Visible="False"   but i need to hide only axis scale and minor ticks  not the Axis Major ticks and label.   How this can i handle this rad chart ? 

2.   Another thing  I need to show only the legend marker text  and i wanted to hide Legend Marker Figure  only,   Is it possible in Radchart ?



Evgenia
Telerik team
 answered on 09 Feb 2011
3 answers
94 views
Hi Telerik team,First of all thanks for this wonderful Controls.
but i am disappointment that you don't have much information about sharepoint 2010 integration i mean there is some video but they are basic.
I have question like will telerik Scheduler control both silverlight and ajax will recognize Sharepoint Calendar list recurrence pattern.also if you have an y example please give me link.

Please advise i really love Scheduler control and would like to work with it.

Thanks
Ronak
George
Telerik team
 answered on 09 Feb 2011
3 answers
110 views
Hi

I have created a Radchart successfuly using the following code

Dim sqlDataSource As New SqlDataSource()
sqlDataSource.ID = "myDataSource"
sqlDataSource.ConnectionString = "data source=" & Session("Server").ToString & "; initial catalog=" & Session("Database").ToString & "; Connect Timeout=5000; " & System.Configuration.ConfigurationManager.AppSettings("Credentials")
sqlDataSource.SelectCommand = "SELECT rtrim(substring([partnumber],patindex('%-%',partnumber) + 1, 50)) AS Location ,[wt101 Customer Calender].[Date] AS Date ,isnull(sum([BufferInventory]),0) AS Buffer FROM [wt273FEPGroupResults] INNER JOIN [wt101 Customer Calender] ON [wt273FEPGroupResults].[Date] = [wt101 Customer Calender].[Date] WHERE [wt101 Customer Calender].[Date] >= (select min(date) from [wt273FEPGroupResults] where [item] = '" & RTrim(txtItem.Text) & "') and [wt101 Customer Calender].[Date] <= (select max(date) from [wt273FEPGroupResults] where [item] = '" & RTrim(txtItem.Text) & "') and [item] = '" & RTrim(txtItem.Text) & "' GROUP BY rtrim(substring([partnumber],patindex('%-%',partnumber) + 1, 50)),[wt101 Customer Calender].[Date] ORDER BY [Location],[Date]"
Me.Page.Controls.Add(sqlDataSource)
radChart1.DataGroupColumn = "Location"
radChart1.PlotArea.XAxis.DataLabelsColumn = "Date"
radChart1.Legend.Appearance.GroupNameFormat = "#NAME: #VALUE"
radChart1.SeriesOrientation = ChartSeriesOrientation.Vertical
radChart1.DefaultType = ChartSeriesType.Line
radChart1.DataSourceID = "myDataSource"
radChart1.ChartTitle.TextBlock.Text = "Buffer Inventory by Location"
radChart1.PlotArea.XAxis.AutoScale = True
radChart1.DataBind()

All very straight forwards. The problem I have is that the chart shows the value of each data point on the chart.
Is there any way to get rid of these values and just show the lines?

Thanks in Advance

Yavor
Telerik team
 answered on 09 Feb 2011
0 answers
32 views
hi Telerik team,
I have got an javascript error with the radgridview.The scenario is  that i have a radgridview,which have edit/delete/update option.The issue is that when i do some edit and then press update,i got an javascript error in ie.i have attached the screen short of this.please provide help why it is happening.
Kuldeep
Top achievements
Rank 1
 asked on 09 Feb 2011
1 answer
80 views
Hi I get a tooltip text on mousehover on grid as 'Grid' , I dont want to show this.
How can I remove tooltip on mousehover , Please help me.
Shinu
Top achievements
Rank 2
 answered on 09 Feb 2011
5 answers
191 views
I have a grid that when put in edit mode has a popup editform that has another grid containing records with checkboxes in the grid column edit template. I want to add a checkbox in the header that when selected will toggle the checkboxes in all the rows to checked or unchecked. Here is the column definition in my editforms child grid:
<telerik:GridTemplateColumn UniqueName="Resubmitted" DataField="Resubmitted" 
                                        HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="20%" >
                                        <HeaderTemplate>
                                         <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="true" runat="server" Text=" resubmitted" ></asp:CheckBox>
                                        </HeaderTemplate>
                                        <EditItemTemplate>
                                           <asp:CheckBox id="chkResubmittedEdit" runat="server" Checked='<%# Bind("Resubmitted") %>'/>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox id="chkResubmittedItem" runat="server" Checked='<%# Eval("Resubmitted") %>' />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>

I am getting a null value when trying to access the items in the ToggleSelectedState method for the grid items. Here is my code-behind in c#:
protected void ToggleSelectedState(object sender, EventArgs e)
        {
            CheckBox headerCheckBox = (sender as CheckBox);
            try
            {
               GridDataItemCollection items = (grdClaimHist.FindControl("grdClaimDetail") as RadGrid).MasterTableView.Items;
                foreach (GridDataItem dataItem in items)
                {
                    CheckBox chk = (dataItem.FindControl("chkResubmittedEdit") as CheckBox);
                    chk.Checked = headerCheckBox.Checked;
                }
            }
            catch (Exception ex)
            {
                //continue
            }
        }
grdClaimHist is the parent grid that contains the editform  while grdClaimDetail is the child grid. Is there another way I should be trying to implement this functionality since the ToggleSelectedState method is called on my header checkbox click?


Princy
Top achievements
Rank 2
 answered on 09 Feb 2011
1 answer
52 views
Hi,

I am using nestedviewtemplate in my application. i am using checkbox in this nestedview template. so i want validate if this checkbox checked or not. so how to get these control in client side and validate.

Please give me a tips for this one.


Thanks,
Dhamu
Princy
Top achievements
Rank 2
 answered on 09 Feb 2011
1 answer
108 views

Hello, I have following RadGrid containing nested GridTableViews. Every row has CheckBox and I would like to select and deselect them in ClientSide. I have following Javascript code.

function RowSelected(sender, eventArgs) {
  
    var dataItem = sender.get_masterTableView().get_dataItems()[eventArgs._itemIndexHierarchical];
    var str = eventArgs._itemIndexHierarchical; 
  
    if (typeof (dataItem) == "undefined") {
        dataItem = sender.get_detailTables()[0].get_selectedItems()[str];
    }
  
    if (typeof (dataItem) == "undefined") {
        dataItem = sender.get_detailTables()[1].get_selectedItems()[str];
    }
  
  
    if (isDeselecting) {
        if (id == dataItem._itemIndexHierarchical) {
            dataItem.set_selected(false);
            isDeselecting = false;
        }
        else
            id = dataItem._itemIndexHierarchical;
    }
    else if (isDeselecting == false) {
        id = dataItem._itemIndexHierarchical;
        isDeselecting = true;
    }
}

 My aspx Page is declared as followed.

<telerik:RadGrid ID="RadGridSubOrganizations" runat="server" BorderStyle="Solid" AllowFilteringByColumn="false"
 AutoGenerateColumns="false" Visible="true" Width="100%" OnItemCommand="RadGridSubOrganizations_ItemCommand"   
 Height="150px" OnDetailTableDataBind="RadGridSubOrganizations_DetailTableDataBind" 
 OnItemDataBound="RadGridSubOrganizations_ItemDataBound" SortingSettings-EnableSkinSortStyles="true" 
 MasterTableView-ExpandCollapseColumn-Display="true" AllowSorting="false" 
 ShowStatusBar="true" GridLines="None" HeaderStyle-BackColor="#BDBDBD">
  
<MasterTableView CellSpacing="-1" AllowNaturalSort="false" TableLayout="Fixed" Name="Organization" 
  DataKeyNames="ParentOrganizationId,ChildOrganizationId,SubChildOrganizationId"
  ItemStyle-BackColor="#B0C4DE" GridLines="None">                                                                                       
 <HeaderStyle CssClass="HeaderColor" /> 
  
 <DetailTables>
    <telerik:GridTableView DataKeyNames="ParentOrganizationId,ChildOrganizationId" Width="100%" 
    GridLines="None" HeaderStyle-BackColor="#BDBDBD" HeaderStyle-ForeColor="Black" ItemStyle-BackColor="#ADD8E6">                                                                                   
    <DetailTables>                                              
    <telerik:GridTableView DataKeyNames="ParentOrganizationId,ChildOrganizationId,SubChildOrganizationId" Width="100%" 
     ItemStyle-BackColor="#DEF3FA" GridLines="None" HeaderStyle-BackColor="#BDBDBD" HeaderStyle-ForeColor="Black">                                                                                                                          

When event comes to javascript function index of row is in variable eventArgs._itemIndexHierarchical.
But if Row in GridTableView is selected eventArgs._itemIndexHierarchical contains mystic index like: 1:0_0:0_0_0 and exception is thrown when trying to get dataItem from GridTableView. How should I reference to index? Couldn't find any samples or documentation considering this.

How to do this?

Br

Michael

Princy
Top achievements
Rank 2
 answered on 09 Feb 2011
1 answer
128 views
How would I get the selected row on an outside event?

Much like the RowDblClick function below but I dont have sender or args.

Here is my user control.  I want to call OpenRow from a button click outside a grid event.
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Grid.ascx.vb" Inherits="WebDBMS.Grid" %>
  
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
  
<telerik:RadScriptManager ID="ScriptManager" runat="server" />
<telerik:RadGrid ID="RadGrid" runat="server" Width="100%" Height="100%"
    Font-Names="Verdana" GridLines="Both" AllowSorting="True" ShowGroupPanel="True" 
    Skin="Office2007" AllowPaging="True" PageSize="50" AutoPostBack="True"
    <MasterTableView>
        <HeaderStyle Wrap="false" />
    </MasterTableView>
    <ClientSettings AllowDragToGroup="True"
        <Selecting AllowRowSelect="True" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
        </Scrolling
        <Resizing AllowResizeToFit="True" AllowColumnResize="True" />
        <ClientEvents OnRowDblClick="RowDblClick" />
    </ClientSettings>
    <ExportSettings ExportOnlyData="true" IgnorePaging="true"/>
</telerik:RadGrid>
<script type="text/javascript">
    function RowDblClick(sender, args) {
        var grid = sender;
        var MasterTable = grid.get_masterTableView();
        var row = MasterTable.get_dataItems()[args.get_itemIndexHierarchical()];
        var cell = MasterTable.getCellByColumnUniqueName(row, "ID");
        var value = cell.innerHTML;
  
        var url = "../Forms/getEditForm.aspx?key=" + __name + "&id=" + value;
        winopen(url, null, "toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1");
    }
  
    function OpenRow() {
        /*
        Need something here
        */
        var url = "../Forms/getEditForm.aspx?key=" + __name + "&id=" + value;
        winopen(url, null, "toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1");
    }
</script>
Princy
Top achievements
Rank 2
 answered on 09 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?