Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
157 views
Hi

How can I prevent a user to single click on a row (thereby changing the selected row). I only want the user to be able to double click on a row to change selected row.

I also want to programatically change row (I'm already doing this using set_selected(true);)

I have also changed the CSS for selected row (.rlbSelected) to show a background picture.

I've tried using some javascript to intercept SelectionIndexChanging and set_cancel(true); to prevent single click, but it still changes the focused row thereby causing other problems.

/Keivan

Peter Filipov
Telerik team
 answered on 18 May 2011
2 answers
55 views
Hello,
I have following layout;
1. 3 columns on page.
2. Each column contains its own asp:panel
3. When I press button on 1st panel I want to show loading on second on, when press on 2 want to show on 3.

<telerik:RadAjaxManagerProxy ID="rAjaxManagerProxy" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="pnlFullDescription">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlFullDescription" LoadingPanelID="ralMain" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="pnlShortDescription">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlFullDescription" LoadingPanelID="ralMain" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
But cannot make it work. Updating the same panel working. Ajax update is displaying. Updating the same and next one also working. But updating next one not.

Could you help me with configuration?
Kind Regards
Marcin

Marcin
Top achievements
Rank 1
Veteran
 answered on 18 May 2011
3 answers
732 views
I build my grid in code

RadGrid RadGrid1 = new RadGrid();
 
RadGrid1.ID = "RadGrid1";
RadGrid1.DataSourceID = "SqlDataSource1";
RadGrid1.MasterTableView.DataKeyNames = new string[] { "Jobnumber" };
RadGrid1.Skin = "WebBlue";
//RadGrid1.EnableEmbeddedSkins = false;
RadGrid1.Width = Unit.Percentage(100);
RadGrid1.PageSize = 15;
RadGrid1.AllowPaging = true;
RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrev;
RadGrid1.AllowSorting = true;
RadGrid1.AllowFilteringByColumn = false;
RadGrid1.AutoGenerateColumns = false;
RadGrid1.ClientSettings.Resizing.AllowColumnResize = true;
RadGrid1.ClientSettings.Resizing.ResizeGridOnColumnResize = true;
RadGrid1.ClientSettings.Resizing.ClipCellContentOnResize = true;
RadGrid1.ClientSettings.AllowColumnsReorder = true;
RadGrid1.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Reorder;
RadGrid1.GridLines = GridLines.Both;
RadGrid1.ItemCommand += new GridCommandEventHandler(RadGrid1_ItemCommand);
RadGrid1.PageIndexChanged += new GridPageChangedEventHandler(RadGrid1_PageIndexChanged);
 
//Add columns
 
GridButtonColumn buttonColumn = new GridButtonColumn();
buttonColumn.HeaderText = "Select File";
buttonColumn.CommandName = "Select";
buttonColumn.ButtonType = GridButtonColumnType.PushButton;
buttonColumn.Text = "Go";
buttonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
buttonColumn.HeaderStyle.Width = 50;
 
buttonColumn.HeaderStyle.BackColor = System.Drawing.Color.Crimson;
buttonColumn.HeaderStyle.BorderColor = System.Drawing.Color.Crimson;
 
RadGrid1.Columns.Add(buttonColumn);

I use the embedded Skin "WebBlue" However when I try to override the headerstyle color of the first column only half the header is changed.



Tsvetina
Telerik team
 answered on 18 May 2011
4 answers
515 views
Ihave a grid that is set to edit useing EditForms.  On the ItemDataBound I fill the dropdownlist in the EditForm this works great for Inserting records.  The issue is when I select and record from the grid to edit I use

<asp:DropDownList ID="ddState" runat="server" SelectedValue='<%# Bind("StateID") %>' />
So when I select the record the dropdownlist has not been populated yet.  How can I populate the dropdownlist so I can set the select value.

Thanks,
Eric
Eric Klein
Top achievements
Rank 1
 answered on 18 May 2011
0 answers
33 views

Hi Team,

 

I am using telerik[Version=2008.2.1001.35] radGrid with selectcolumn checkbox functionality. But when I checked header checkbox for selecting all rows it throws js error . The  screenshot of the js error is attached in the file "jserror.jpg".Previously I was using telerik [version 2009.2.826.20] & it was working fine.I debug the code and it got stuck to a line the screenshot of which i have attached in the file "debug.jpg". Kindly refer these two files in the attachment.

 

 Thanks and Regards
Ganesh

ganesh g
Top achievements
Rank 1
 asked on 18 May 2011
1 answer
277 views
I am trying to have the Excel export of my grid show the title from the header without expanding the first column of the data.
See attached screenshot

It is making my ID column very wide even though the column itself in the grid is defined to be narrow. 
Is there anyway for my header title to appear in the export but not cause that first real data column to be so wide?
It does seem to work in the PDF because the PDF won't show my header title - I have only been able to show it as a Title of the page and not as an item in the grid header (which is a seperate issue).

The following is the code that I have tried to use to suggest that the title row should take two columns instead of just one.
I've set the title cell to use colspan="2" hoping that would transfer into the Excel file... but no luck as you can see.

<MasterTableView DataKeyNames="Id" DataSourceID="ClientDataSource" EditMode="PopUp"
                CommandItemDisplay="Top" HeaderStyle-CssClass="grid_header">
                <CommandItemTemplate>
                    <table width="100%">
                        <colgroup>
                            <col width="35px" />
                            <col />
                            <col />
                            <col />
                        </colgroup>
                        <tr>
                            <td colspan="2" style="font-size: 13px; padding: 10px 10px; text-align: left; white-space: nowrap; font-weight: bold">
                                <asp:Label runat="server" ID="lbl_reportName" Text="none">Client List</asp:Label>
                            </td>
                            <td class="flow_no_print">
                                <telerik:RadButton ID="btnAddNewClient" runat="server" ButtonType="LinkButton" BorderStyle="None" AutoPostBack="true"
                                    CommandName="InitInsert" Text="Add Client">
                                    <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4" />
                                </telerik:RadButton>
  
                            </td>
                            <td class="flow_no_print" style="width: 160px; text-align: right;">
                                <asp:ImageButton Height="32" ID="ExportToPdfButton" CommandName="ExportToPdf" ImageUrl="~/images/icons/pdf.png" runat="server" ToolTip="Export to PDF" AlternateText="Export to PDF" /> 
                                <asp:ImageButton Height="32" ID="ExportToExcelButton" CommandName="ExportToExcel" ImageUrl="~/images/icons/excel.png"  runat="server" ToolTip="Export to Excel"  AlternateText="Export to Excel" /> 
                                <asp:ImageButton Height="32" ID="ExportToWordButton" CommandName="ExportToWord" ImageUrl="~/images/icons/word.png" runat="server" ToolTip="Export to Word" AlternateText="Export to Word" /> 
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 35px;"></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </table>
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridEditCommandColumn UniqueName="EditColumn" ButtonType="ImageButton">
                    <ItemStyle Width="20" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="ID" SortExpression="Id"
                        UniqueName="Id" Visible="true" ReadOnly="true">
                        <ItemStyle Width="35px" />
                        <HeaderStyle width="35px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" MaxLength="45" SortExpression="Name"
                        UniqueName="Name">
                        <ItemStyle Width="260px" />
                        <HeaderStyle width="260px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Active" SortExpression="Active" UniqueName="ActiveMark" ReadOnly="true">
                       <ItemTemplate>
                       <%# ShowActiveInd(DataBinder.Eval(Container.DataItem, "Active"))%>
                       </ItemTemplate>
                       <ItemStyle Width="20px" HorizontalAlign="Left" />
                       <HeaderStyle width="200px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridCheckBoxColumn DataField="Active" DataType="System.Boolean" HeaderText="Active"
                        SortExpression="Active" UniqueName="Active" ReadOnly="false" Display="false" DefaultInsertValue="true" >
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="ActiveColumn" HeaderText="Active" Display="false">
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridButtonColumn>
                </Columns>


Thanks for your help,

Jonathan
Princy
Top achievements
Rank 2
 answered on 18 May 2011
2 answers
88 views
Sum Aggregate function not working on column with dataype long . Any idea ?
AG
Top achievements
Rank 1
 answered on 18 May 2011
1 answer
556 views
Hi everyone, i've been using radgrid for a couple of days now and i'm suppose to make an application using a radgrid with detailsview on each line. When i'll be clicking on an item from the grid, there will open the detailsview inside the grid. Actually i would like to make something similar to this application.

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

The only thing is that i would like to do it programmatically not from asp file.

So can you please tell me what do i need to do to make it work.
Vasil
Telerik team
 answered on 18 May 2011
6 answers
118 views
Hi

I have had to add some custom values to the available languages in the dictionary drop down list, however I need to make the drop downs width much wider as the descriptions I have used for the languages look squashed.

I've been unable to find any help topics on this apart from trying to apply the popup width property to the control itself but this did not change the width.

I have attached a picture with an example of the drop down I am using and ideally would like the width to match the longest description.

Regards,
Jonathan

 
Rumen
Telerik team
 answered on 18 May 2011
2 answers
61 views
Hi

I have a page with three grid et I want to associate to them a differente contextMenu. In fact, I want the first grid to add the item "add", "Edit" and "Delete" and the two others grid to contain "Edit" and "Delete". Seem pretty easy to do to me, but I'm unable to know wich grid had been clicked. I alreary tried this demo, but it didn't help this much, cause this demo work with only one grid. May someone help me ? Thanks

David
David
Top achievements
Rank 1
 answered on 18 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?