Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
73 views
Hello All,
I have a rad ribbon bar having Application menu. Some of the menu items are disabled on page load(in client side). We can change the disabled menu to an enabled one in client side using fire bugger (remove rmDisabled from class="rmLink rmDisabled rmDisabled").My question is - Is there any possible way to enable a menu item which is actually in disabled mode and perform its server action.

Thank you
Abhilash
Bozhidar
Telerik team
 answered on 13 Mar 2013
12 answers
313 views

Hi all,
To save a round trip to the database, I would like to be able to filter radgrid items client side for speed purposes. I have a grid that will contain anywhere from 500-2500 items in  columns representing Departments in a database. The grid has client paging on as well as drag and drop columns. I would prefer to keep the paging at least.

<telerik:RadCodeBlock runat="server" ID="radCodeBlock">
            <script type="text/javascript">
function CustFilter() {
                    var chk = document.getElementById('<%=CheckBox1.ClientID %>');
  
                    if (chk.checked == true) {
                        var radG = $find("<%=RadGrid1.ClientID %>");
                        var DataItems = radG.get_masterTableView().get_dataItems();
                        var masterTableView = radG.get_masterTableView();
  
                        for (i = 0; i < DataItems.length; i++) {
                            var row = DataItems[i].get_element();
                            //var row = masterTableView.get_dataItems()[i];
                            var checkBox = row.children[5].children[0];
                            //var checkBox = row.get_cell("Approved")
  
                            if (!checkBox.checked) {
                                radG.get_masterTableView().hideItem(i);    
                            }
                            else {
                                radG.get_masterTableView().showItem(i);
                            }
                        }   
  
                    }
                    else {
                        alert("unchecked");
                    }
                }
</script>
 </telerik:RadCodeBlock>
<telerik:RadGrid ID="RadGrid1" runat="server" PageSize="50" Height="600px" AllowFilteringByColumn="True" 
        AllowPaging="True" AllowSorting="True" DataSourceID="SqlDsGetRetDepts" 
        GridLines="None" ShowGroupPanel="True" Skin="Windows7" 
        AutoGenerateColumns="false" EnableLinqExpressions="false">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" 
            ReorderColumnsOnClient="True">
            <ClientEvents OnRowContextMenu="RowContextMenu" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
        <MasterTableView DataSourceID="SqlDsGetRetDepts" ClientDataKeyNames="DeptID, CustomerID" DataKeyNames="DeptID">
            <Columns>
                <telerik:GridBoundColumn DataField="DeptID" FilterControlWidth="50px" ItemStyle-Width="100px" HeaderText="DeptID" SortExpression="DeptID" UniqueName="DeptID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustID" ItemStyle-Width="100px" AutoPostBackOnFilter="false" SortExpression="CustID" UniqueName="CustomerID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DeptName" FilterControlWidth="100px" ItemStyle-Width="100px" HeaderText="Name" SortExpression="Name" UniqueName="DeptName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DeptPhone" FilterControlWidth="50px" ItemStyle-Width="100px" HeaderText="DeptPhone" SortExpression="DeptPhone" UniqueName="DeptPhone">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="BillDeptID" HeaderText="Bill DeptID" SortExpression="Bill DeptID" UniqueName="BillDeptID">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="Approved" HeaderText="Approved" SortExpression="Approved" UniqueName="Approved">                
                </telerik:GridCheckBoxColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

One of those columns is a boolean field called "Approved" in a gridcheckboxcolumn . I woudl like the user to be able to check a checkbox and filter out all those that are not "Approved". I cant quite glean from other posts how to do this, my client-side code is not quite there. I am missing something, as I am hiding all the data on the page, and when I page the data is all there. Any help would be appreciated! Thanks in advance,

Nimesh Jagota

Shinu
Top achievements
Rank 2
 answered on 13 Mar 2013
0 answers
167 views
i am trying to use client template(from the< toolstipApperance/>) for my radhtmlchart (type:pie) but i am unable to do it because i am using a dataset from the DB.
i tried using this 
  //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
it is also not working.
please help me i have to submit the project and i have very less time

here is a piece of code :
 DataSet ds = DbHelper.ReadTable(sql1);
    
        if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0)
        {
            //string[] arr = new string[15];
           
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                SeriesItem si = new SeriesItem();
                si.YValue = (decimal)ds.Tables[0].Rows[i]["VoteShare"];
                si.Name = (string)ds.Tables[0].Rows[i]["PartyName"];
                 
                si.BackgroundColor = System.Drawing.ColorTranslator.FromHtml((string)ds.Tables[0].Rows[i]["PartyColor"]);
                PieChart1.PlotArea.Series[0].Items.Add(si);
                //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = (string)ds.Tables[0].Rows[i]["PartyName"];
                //arr[i]=si.Name.ToString();
                
            }

            //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
            
        

attaching my project files

also there are other related columns in the db like fullnames of the abbreviation.
i want to display that through client template.
regards
@nnu shah
punjab lok sujag
Qurat
Top achievements
Rank 1
 asked on 13 Mar 2013
2 answers
101 views
Hi,
 I.m trying to load the RadAjaxLoadingPanel while waiting for data to be returned from db that has been queried through the autocompletebox.
  Any ideas on how to do this?
Regards
Richard
Top achievements
Rank 1
 answered on 12 Mar 2013
4 answers
859 views
This is probably very elementary question but I'm just starting using Telerik RadGrid and while it was very easy to deploy and setup, I'm having a problem to set the grid not to open the edit form the first time it loads. The form always opens up with the first record already in editing mode (file 1), while what I want to set it to is to display the data first and let the end user click on Edit when necessary (file 2). Thanks for any assistance I could get.

Martin
Top achievements
Rank 1
 answered on 12 Mar 2013
0 answers
176 views
I see to have an issue using a RadWindow, where by I set a S\session variable in PageA, then use javascript to call the RadWindow's .SetUrl() function to goto PageB (both pages are within the same application). When arriving at PageB the session variable set in PageA is no longer available... is this supposed to happen? If I redirect from PageA to PageB I get the session variable just fine, it's only after using .SetUrl() on the clientside that I seem to lose it.

Can anyone confirm this for me?


Edit - Oops, looks like I was just looking at the wrong data. The sessions do indeed persist. Sorry.
Xorcist
Top achievements
Rank 1
 asked on 12 Mar 2013
1 answer
100 views
I'm using a RadTreeList using a series of bound columns to display a self-referential DataSet. The binding appears to work fine, and the data shows up correctly, but on the client side after the page has rendered I cannot click on anything in the RadTreeList. However, if I use another control on the page to cause a postback, immediately thereafter the RadTreeList is fully functional. I can see in the console that some Java errors are being thrown on the initial page load and not thereafter - complaining that the helpfully-named variables 'a' and 'b' are not initialized. The postback does not even need to cause a rebind; it appears that any sort of postback will make the RadTreeList functional.

Has anyone else seen this behavior, or have any ideas on how to fix it? The RadTreeList is currently inside an ASP UpdatePanel, but I have already tried removing all of the UpdatePanels from the page and I still get the same behavior. I have also tried removing every bit of custom CSS from the project and had no change in behavior there either.
Peter
Top achievements
Rank 1
 answered on 12 Mar 2013
1 answer
94 views
I add a GridTemplateColumn to my grid and set the text of the header but the style of that text is different than the other columns.

Anyone else run into this problem?  Ia m not doing anything fancy and I am not styling the other columns, just assigning a skin.

<telerik:GridTemplateColumn UniqueName="chkDelete" HeaderText="Delete" HeaderTooltip="Delete">
  <ItemTemplate>
    <asp:CheckBox ID="chkItemDelete" runat="server" />
  </ItemTemplate>
  <HeaderStyle  HorizontalAlign="Center" Width="50px" />
  <ItemStyle />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="From_Name" HeaderText="Origin" UniqueName="From_Name"
  HeaderTooltip="Sort By Origin">
  <ItemStyle HorizontalAlign="Left" />
  <HeaderStyle HorizontalAlign="Left" Width="150px" />
</telerik:GridBoundColumn>
Robert
Top achievements
Rank 1
 answered on 12 Mar 2013
0 answers
96 views
Hello

I'm using set_selected() to select many rows from a RadGrid in a loop similar to this:

mtv = grid.get_masterTableView();

dataItems = mtv.get_dataItems();

for (z; z < AllAvailablePipes; z++) {

    dataItem = dataItems[z];

    var item = dataItem.set_selected(true);

    SelectedPipes = SelectedPipes + 1

    if (SelectedPipes == PipesToBeSelected) break

}


Telerik.Web.UI assembly version is 2011.1.519.40

The problem is the speed. It takes about 5 to 10 seconds for this to run for about 80 rows. In some old slow computers where I need this to run, it takes more than 25 seconds!!!

The grid has a column GridClientSelectColumn:

 

<telerik:GridClientSelectColumn ConfirmDialogType="RadWindow" UniqueName="ClientSelectColumn">
     <HeaderStyle Width="50px" /> 
</telerik:GridClientSelectColumn>

 

Removing that column reduces the time by half. But that is still too much and I need that column. ClientEvents like OnRowSelected or OnRowSelecting are not used at all.

Any suggestion?

Thanks, Francisco.
Francisco
Top achievements
Rank 1
 asked on 12 Mar 2013
3 answers
134 views
I have a form with a RadGrid set to use the Outlook skin and a RadPanelBar also set to use the Outlook skin.  This has been working without issue until I followed the code example on how to force all rows in a RadGrid into edit mode.  When this happens, the RadGrid.Rebind() causes the RadPanelBar to loose styling.  I have isolated it to just the Rebind() on the RadGrid's PreRender.

Private Sub rgScripts_PreRender(sender As Object, e As EventArgs) Handles rgScripts.PreRender
    If Not IsPostBack Then
        For Each item As GridItem In rgScripts.MasterTableView.Items
            If TypeOf item Is GridEditableItem Then
                Dim editableItem As GridEditableItem = CType(item, GridDataItem)
                editableItem.Edit = True
            End If
        Next
        rgScripts.Rebind()
    End If
End Sub

My RadGrid and RadPanelBar are defined as followed:

<telerik:RadGrid ID="rgScripts" runat="server" Skin="Outlook" AllowMultiRowEdit="true">
...
</telerik:RadGrid>
 
<telerik:RadPanelBar ID="pbAddNewDrug" runat="server" Width="100%" Skin="Outlook" EnableEmbeddedSkins="true">
...
</telerik:RadPanelBar>

This works perfectly if rgScripts.Rebind() isn't called.

Thanks,
William
William
Top achievements
Rank 1
 answered on 12 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?