Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
207 views
I have a RadGrid set up with the column widths I want in View mode.  When I click on Edit, all of the column widths change, and the RadGrid runs off the page.  How can I set this so that the columns in Edit mode are the same as my custom column sizes in View mode?

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="ds_MainGrid" GridLines="None"  Skin="WebBlue" Width="1025px" AutoGenerateColumns="False" AllowAutomaticUpdates="True" ShowStatusBar="true" ShowFooter="true" >
<HeaderContextMenu EnableAutoScroll="True">
</HeaderContextMenu>
<MasterTableView DataSourceID="ds_MainGrid" DataKeyNames="ID" ClientDataKeyNames="ID" EditMode="InPlace" >
<Columns>
<telerik:GridTemplateColumn UniqueName="TemplateColumn">
<ItemTemplate >
<input id="btn_SelectRow" type="button" value="Select" onclick="openSelectRow();" />
</ItemTemplate>
<HeaderStyle Width="10px" ForeColor="White" />
<ItemStyle Width="10px" ForeColor="White" />
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn ButtonType="PushButton">
<HeaderStyle Width="10px" />
<ItemStyle Width="10px" />
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="ID" HeaderText="ID"  SortExpression="ID"
UniqueName="ID">
<HeaderStyle Width="20px" ForeColor="White" />
<ItemStyle ForeColor="Black" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Orgnum" HeaderText="DEALER NUMBER"  SortExpression="Orgnum"
UniqueName="Orgnum">
<HeaderStyle Width="20px" ForeColor="White" />
<ItemStyle ForeColor="Black" Width="20px"/>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Org" HeaderText="DEALER"  SortExpression="Org"
UniqueName="Org">
<HeaderStyle Width="20px" ForeColor="White" />
<ItemStyle ForeColor="Black" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Last_Name" HeaderText="LAST NAME"  SortExpression="Last_Name"
UniqueName="Last_Name">
<HeaderStyle Width="20px" ForeColor="White" />
<ItemStyle ForeColor="Black" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="First_Name" HeaderText="FIRST NAME"  SortExpression="First_Name"
UniqueName="First_Name">
<HeaderStyle Width="20px" ForeColor="White" />
<ItemStyle ForeColor="Black" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="UserName" HeaderText="USER NAME" SortExpression="UserName"
UniqueName="UserName">
<HeaderStyle Width="20px" ForeColor="White" />
<ItemStyle ForeColor="Black" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Password" HeaderText="PASSWORD" SortExpression="Password"
UniqueName="Password">
<HeaderStyle Width="20px" ForeColor="White" />
<ItemStyle ForeColor="Black" />
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn HeaderText="STATUS" UniqueName="Status">
<HeaderStyle Width="20px" ForeColor="White" />
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn HeaderText="DMS" UniqueName="DMS">
<HeaderStyle Width="20px" ForeColor="White" />
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn HeaderText="LEASE" UniqueName="Lease">
<HeaderStyle Width="20px" ForeColor="White" />
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn HeaderText="ONLINE RATING" UniqueName="OnlineRating">
<HeaderStyle Width="20px" ForeColor="White" />
</telerik:GridCheckBoxColumn>
<telerik:GridTemplateColumn>
</telerik:GridTemplateColumn>

</Columns>
</MasterTableView>
<ClientSettings AllowColumnsReorder="True">
</ClientSettings>
</telerik:RadGrid>

Richard M
Top achievements
Rank 1
 answered on 20 May 2010
2 answers
92 views
Hello,
I am using Q3 2008 versions of RadControls and and now trying to upgrade them to the newer version. I am using Vista skin for RadGrid and after the upgrade, it is not looking the same. To keep the same look, I am trying to use custom skins which I have downloaded from this forum. Using the instructions from this forum, I have been able to do this successfully for some controls like RadMenu and RadPanelBar but having trouble with the RadGrid. I am not very good at skins and CSS stuff but one thing I have noted is that other controls have two files like Menu.css and Menu.Vista.css but for Grid control I only see the Grid.Vista.css but don't see the Grid.css. Could this be the reason?

Also I have noted that when the grid don't have any rows then it seems that the old Vista skin is applied but when there are some rows then it does not show the old look. Any idea what I might be missing here?

Here is the forum I downloaded the skins and used instructions from

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/all-radcontrols-q3-2008-skins-are-now-compatible-with-the-q1-2009-release.aspx

Your help in this regard is much appreciated.

Thanks,

Zafar
Zafar
Top achievements
Rank 1
 answered on 20 May 2010
4 answers
124 views
I am very happy so far with the RadGrid and this sample.

But, I am also trying to have a cascading drop down work within this framework as well... I am finding problems populating the 2nd drop down with values from the first. The AJAX call works and I can step through it populating the drop down but, the values aren't showing up. Only on Postback does this seem to work.

How would I get this to work?
Ian Welsh
Top achievements
Rank 1
 answered on 20 May 2010
2 answers
276 views
I would like to replace args.set_cancel(!confirm('Delete all selected customers?')) as in the example located at http://demos.telerik.com/aspnet-ajax/toolbar/examples/applicationscenarios/gridcommanditem/defaultcs.aspx?product=toolbar with a radconfirm window. I have spent hours trying different methods to achieve this and have run out of ideas.

I am using a radtoolbar as a radgrid commanditem and my code is as follows:

Javascript:
            function onToolBarClientButtonClicking(sender, args) { 
                var button = args.get_item(); 
                if (button.get_commandName() == "DeleteSelected") { 
                    if (document.getElementById('hdn_Hosp').value) { 
                    args.set_cancel(!confirm('Delete ' + document.getElementById('hdn_Hosp').value + '?')); 
                    } 
                } 
            } 
 

ASPX:
    <form id="form1" runat="server"
    <asp:HiddenField ID="hdn_Hosp" runat="server" /> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"
    </telerik:RadFormDecorator> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
    </telerik:RadWindowManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid_Hospitals"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid_Hospitals" /> 
                    <telerik:AjaxUpdatedControl ControlID="hdn_Hosp" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadToolBar_HospitalCMD" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="btnSubmit"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnSubmit" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <div> 
        <asp:SqlDataSource ID="ds_Hospitals" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            DeleteCommand="DELETE FROM [Sub_Hospitals] WHERE [HospID] = @HospID" InsertCommand="INSERT INTO [Sub_Hospitals] ([UserID], [Hospitalname]) VALUES (@UserID, @Hospitalname)" 
            SelectCommand="SELECT * FROM [Sub_Hospitals] WHERE ([UserID] = @UserID) ORDER BY [Hospitalname]" 
            UpdateCommand="UPDATE [Sub_Hospitals] SET [UserID] = @UserID, [Hospitalname] = @Hospitalname WHERE [HospID] = @HospID"
            <SelectParameters> 
                <asp:CookieParameter CookieName="UserID" Name="UserID" Type="Int32" /> 
            </SelectParameters> 
            <DeleteParameters> 
                <asp:Parameter Name="HospID" Type="Int32" /> 
            </DeleteParameters> 
            <UpdateParameters> 
                <asp:Parameter Name="UserID" Type="Int32" /> 
                <asp:Parameter Name="Hospitalname" Type="String" /> 
                <asp:Parameter Name="HospID" Type="Int32" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:CookieParameter CookieName="UserID" Name="UserID" Type="Int32" /> 
                <asp:Parameter Name="Hospitalname" Type="String" /> 
            </InsertParameters> 
        </asp:SqlDataSource> 
        <asp:Panel ID="pnlhosplist" runat="server" CssClass="pnlmodallist"
            <table class="tblmodallist"
                <tr> 
                    <td class="tblmodallistheading_hosp"
                        &nbsp; 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        <asp:Panel ID="pnlHospChoices" runat="server" ScrollBars="Vertical" CssClass="pnlModalChoices"
                            <telerik:RadGrid ID="RadGrid_Hospitals" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" 
                                DataSourceID="ds_Hospitals" Width="97%" AllowSorting="True" AutoGenerateColumns="false" 
                                GridLines="None" runat="server" AllowMultiRowSelection="False" BorderStyle="None" OnCancelCommand="DisableGridCommandButtons" 
                                OnSelectedIndexChanged="RadGrid_Hospitals_SelectedIndexChanged" OnEditCommand="DisableGridCommandButtons" OnInsertCommand="DisableGridCommandButtons" 
                                AllowMultiRowEdit="False" HorizontalAlign="NotSet" OnItemDeleted="RadGrid_Hospitals_ItemDeleted"
                                <MasterTableView Width="100%" GridLines="None" CommandItemDisplay="Top" DataSourceID="ds_Hospitals" 
                                    ShowFooter="false" ShowHeader="false" EditMode="InPlace" HorizontalAlign="NotSet" 
                                    DataKeyNames="HospID" AllowAutomaticInserts="True" ClientDataKeyNames="Hospitalname"
                                    <NoRecordsTemplate> 
                                        <div style="width: 200px; margin: 0 auto;"
                                            <br /> 
                                            <br /> 
                                            <b>You currently have no favourites.</b><br /> 
                                            <br /> 
                                            To create a favourite click <b>Add new</b>
                                        </div> 
                                    </NoRecordsTemplate> 
                                    <Columns> 
                                        <telerik:GridBoundColumn DataField="HospID" HeaderText="Hospital" Visible="false"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="UserID" HeaderText="Hospital" Visible="false"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Hospitalname" HeaderText="Hospital"
                                        </telerik:GridBoundColumn> 
                                    </Columns> 
                                    <CommandItemTemplate> 
                                        <telerik:RadToolBar ID="RadToolBar_HospitalCMD" OnButtonClick="RadToolBar_HospitalCMD_ButtonClick" 
                                            runat="server" OnClientButtonClicking="onToolBarClientButtonClicking" Width="100%" AutoPostBack="true"
                                            <Items> 
                                                <telerik:RadToolBarButton Text="Save" CommandName="PerformInsert" ImageUrl="~/images/toolbar/Insert.gif" 
                                                    Visible='<%# RadGrid_Hospitals.MasterTableView.IsItemInserted %>'
                                                </telerik:RadToolBarButton> 
                                                <telerik:RadToolBarButton Text="Update" CommandName="UpdateEdited" ImageUrl="~/images/toolbar/Update.gif" 
                                                    Visible='<%# RadGrid_Hospitals.EditIndexes.Count > 0 %>'
                                                </telerik:RadToolBarButton> 
                                                <telerik:RadToolBarButton Text="Cancel editing" CommandName="CancelAll" ImageUrl="~/images/toolbar/Cancel.gif" 
                                                    Visible='<%# RadGrid_Hospitals.EditIndexes.Count > 0 OrElse RadGrid_Hospitals.MasterTableView.IsItemInserted %>'
                                                </telerik:RadToolBarButton> 
                                                <telerik:RadToolBarButton Text="Edit" CommandName="EditSelected" ImageUrl="~/images/toolbar/Edit.gif" 
                                                    Enabled='<%# RadGrid_Hospitals.EditIndexes.Count = 0 AND Not RadGrid_Hospitals.MasterTableView.IsItemInserted AND hdn_Hosp.value<>"" %>'
                                                </telerik:RadToolBarButton> 
                                                <telerik:RadToolBarButton Text="Add new" CommandName="InitInsert" ImageUrl="~/images/toolbar/AddRecord.gif" 
                                                    Visible='<%# Not RadGrid_Hospitals.MasterTableView.IsItemInserted AND RadGrid_Hospitals.EditIndexes.Count = 0 %>'
                                                </telerik:RadToolBarButton> 
                                                <telerik:RadToolBarButton Text="Delete" CommandName="DeleteSelected" ImageUrl="~/images/toolbar/Delete.gif" 
                                                Enabled='<%# hdn_Hosp.value<>"" %>' Visible='<%# RadGrid_Hospitals.EditIndexes.Count = 0 %>'
                                                </telerik:RadToolBarButton> 
                                            </Items> 
                                        </telerik:RadToolBar> 
                                    </CommandItemTemplate> 
                                </MasterTableView> 
                                <ClientSettings EnablePostBackOnRowClick="true"
                                    <ClientEvents OnRowClick="RowSelected" /> 
                                    <Selecting AllowRowSelect="True" /> 
                                </ClientSettings> 
                            </telerik:RadGrid> 
                        </asp:Panel> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="center"
                     
                        <asp:Button ID="btnSubmit" runat="server" Text="Insert" OnClientClick="returnArg();" UseSubmitBehavior="false" Width="70px" /> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="center"
                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="closeWindow();" UseSubmitBehavior="false" Width="70px" /> 
                    </td> 
                </tr> 
            </table> 
        </asp:Panel> 
    </div> 
    </form> 
 
(there is some other javascript there, but nothing to do with the delete command).

I haven't posted what I've tried as i've tried 15 different ways to replace the delete method with a radconfirm, so thought it would be better to post what I currently have (which works).

If someone can assist with how to implement a radconfirm when using a radtoolbar in a radgrid I would be very grateful.
GlenB
Top achievements
Rank 1
 answered on 20 May 2010
4 answers
220 views
I would like to replace args.set_cancel(!confirm('Delete all selected customers?')) as in the example located at http://demos.telerik.com/aspnet-ajax/toolbar/examples/applicationscenarios/gridcommanditem/defaultcs.aspx?product=toolbar with a radconfirm window. I have spent hours trying different methods to achieve this and have run out of ideas.

I am using a radtoolbar as a radgrid commanditem and my code is as follows:

Javascript:
            function onToolBarClientButtonClicking(sender, args) {  
                var button = args.get_item();  
                if (button.get_commandName() == "DeleteSelected") {  
                    if (document.getElementById('hdn_Hosp').value) {  
                    args.set_cancel(!confirm('Delete ' + document.getElementById('hdn_Hosp').value + '?'));  
                    }  
                }  
            }  
  

ASPX:
    <form id="form1" runat="server">  
    <asp:HiddenField ID="hdn_Hosp" runat="server" />  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager>  
    <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all">  
    </telerik:RadFormDecorator>  
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
    </telerik:RadWindowManager>  
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings>  
            <telerik:AjaxSetting AjaxControlID="RadGrid_Hospitals">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="RadGrid_Hospitals" />  
                    <telerik:AjaxUpdatedControl ControlID="hdn_Hosp" />  
                    <telerik:AjaxUpdatedControl ControlID="RadToolBar_HospitalCMD" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="btnSubmit">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="btnSubmit" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
        </AjaxSettings>  
    </telerik:RadAjaxManager>  
    <div>  
        <asp:SqlDataSource ID="ds_Hospitals" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"  
            DeleteCommand="DELETE FROM [Sub_Hospitals] WHERE [HospID] = @HospID" InsertCommand="INSERT INTO [Sub_Hospitals] ([UserID], [Hospitalname]) VALUES (@UserID, @Hospitalname)"  
            SelectCommand="SELECT * FROM [Sub_Hospitals] WHERE ([UserID] = @UserID) ORDER BY [Hospitalname]"  
            UpdateCommand="UPDATE [Sub_Hospitals] SET [UserID] = @UserID, [Hospitalname] = @Hospitalname WHERE [HospID] = @HospID">  
            <SelectParameters>  
                <asp:CookieParameter CookieName="UserID" Name="UserID" Type="Int32" />  
            </SelectParameters>  
            <DeleteParameters>  
                <asp:Parameter Name="HospID" Type="Int32" />  
            </DeleteParameters>  
            <UpdateParameters>  
                <asp:Parameter Name="UserID" Type="Int32" />  
                <asp:Parameter Name="Hospitalname" Type="String" />  
                <asp:Parameter Name="HospID" Type="Int32" />  
            </UpdateParameters>  
            <InsertParameters>  
                <asp:CookieParameter CookieName="UserID" Name="UserID" Type="Int32" />  
                <asp:Parameter Name="Hospitalname" Type="String" />  
            </InsertParameters>  
        </asp:SqlDataSource>  
        <asp:Panel ID="pnlhosplist" runat="server" CssClass="pnlmodallist">  
            <table class="tblmodallist">  
                <tr>  
                    <td class="tblmodallistheading_hosp">  
                        &nbsp;  
                    </td>  
                </tr>  
                <tr>  
                    <td>  
                        <asp:Panel ID="pnlHospChoices" runat="server" ScrollBars="Vertical" CssClass="pnlModalChoices">  
                            <telerik:RadGrid ID="RadGrid_Hospitals" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"  
                                DataSourceID="ds_Hospitals" Width="97%" AllowSorting="True" AutoGenerateColumns="false"  
                                GridLines="None" runat="server" AllowMultiRowSelection="False" BorderStyle="None" OnCancelCommand="DisableGridCommandButtons"  
                                OnSelectedIndexChanged="RadGrid_Hospitals_SelectedIndexChanged" OnEditCommand="DisableGridCommandButtons" OnInsertCommand="DisableGridCommandButtons"  
                                AllowMultiRowEdit="False" HorizontalAlign="NotSet" OnItemDeleted="RadGrid_Hospitals_ItemDeleted">  
                                <MasterTableView Width="100%" GridLines="None" CommandItemDisplay="Top" DataSourceID="ds_Hospitals"  
                                    ShowFooter="false" ShowHeader="false" EditMode="InPlace" HorizontalAlign="NotSet"  
                                    DataKeyNames="HospID" AllowAutomaticInserts="True" ClientDataKeyNames="Hospitalname">  
                                    <NoRecordsTemplate>  
                                        <div style="width: 200px; margin: 0 auto;">  
                                            <br />  
                                            <br />  
                                            <b>You currently have no favourites.</b><br />  
                                            <br />  
                                            To create a favourite click <b>Add new</b>.  
                                        </div>  
                                    </NoRecordsTemplate>  
                                    <Columns>  
                                        <telerik:GridBoundColumn DataField="HospID" HeaderText="Hospital" Visible="false">  
                                        </telerik:GridBoundColumn>  
                                        <telerik:GridBoundColumn DataField="UserID" HeaderText="Hospital" Visible="false">  
                                        </telerik:GridBoundColumn>  
                                        <telerik:GridBoundColumn DataField="Hospitalname" HeaderText="Hospital">  
                                        </telerik:GridBoundColumn>  
                                    </Columns>  
                                    <CommandItemTemplate>  
                                        <telerik:RadToolBar ID="RadToolBar_HospitalCMD" OnButtonClick="RadToolBar_HospitalCMD_ButtonClick"  
                                            runat="server" OnClientButtonClicking="onToolBarClientButtonClicking" Width="100%" AutoPostBack="true">  
                                            <Items>  
                                                <telerik:RadToolBarButton Text="Save" CommandName="PerformInsert" ImageUrl="~/images/toolbar/Insert.gif"  
                                                    Visible='<%# RadGrid_Hospitals.MasterTableView.IsItemInserted %>'>  
                                                </telerik:RadToolBarButton>  
                                                <telerik:RadToolBarButton Text="Update" CommandName="UpdateEdited" ImageUrl="~/images/toolbar/Update.gif"  
                                                    Visible='<%# RadGrid_Hospitals.EditIndexes.Count > 0 %>'>  
                                                </telerik:RadToolBarButton>  
                                                <telerik:RadToolBarButton Text="Cancel editing" CommandName="CancelAll" ImageUrl="~/images/toolbar/Cancel.gif"  
                                                    Visible='<%# RadGrid_Hospitals.EditIndexes.Count > 0 OrElse RadGrid_Hospitals.MasterTableView.IsItemInserted %>'>  
                                                </telerik:RadToolBarButton>  
                                                <telerik:RadToolBarButton Text="Edit" CommandName="EditSelected" ImageUrl="~/images/toolbar/Edit.gif"  
                                                    Enabled='<%# RadGrid_Hospitals.EditIndexes.Count = 0 AND Not RadGrid_Hospitals.MasterTableView.IsItemInserted AND hdn_Hosp.value<>"" %>'>  
                                                </telerik:RadToolBarButton>  
                                                <telerik:RadToolBarButton Text="Add new" CommandName="InitInsert" ImageUrl="~/images/toolbar/AddRecord.gif"  
                                                    Visible='<%# Not RadGrid_Hospitals.MasterTableView.IsItemInserted AND RadGrid_Hospitals.EditIndexes.Count = 0 %>'>  
                                                </telerik:RadToolBarButton>  
                                                <telerik:RadToolBarButton Text="Delete" CommandName="DeleteSelected" ImageUrl="~/images/toolbar/Delete.gif"  
                                                Enabled='<%# hdn_Hosp.value<>"" %>' Visible='<%# RadGrid_Hospitals.EditIndexes.Count = 0 %>'>  
                                                </telerik:RadToolBarButton>  
                                            </Items>  
                                        </telerik:RadToolBar>  
                                    </CommandItemTemplate>  
                                </MasterTableView>  
                                <ClientSettings EnablePostBackOnRowClick="true">  
                                    <ClientEvents OnRowClick="RowSelected" />  
                                    <Selecting AllowRowSelect="True" />  
                                </ClientSettings>  
                            </telerik:RadGrid>  
                        </asp:Panel>  
                    </td>  
                </tr>  
                <tr>  
                    <td align="center">  
                      
                        <asp:Button ID="btnSubmit" runat="server" Text="Insert" OnClientClick="returnArg();" UseSubmitBehavior="false" Width="70px" />  
                    </td>  
                </tr>  
                <tr>  
                    <td align="center">  
                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="closeWindow();" UseSubmitBehavior="false" Width="70px" />  
                    </td>  
                </tr>  
            </table>  
        </asp:Panel>  
    </div>  
    </form>  

(there is some other javascript there, but nothing to do with the delete command).

I haven't posted what I've tried as i've tried 15 different ways to replace the delete method with a radconfirm, so thought it would be better to post what I currently have (which works).

If someone can assist with how to implement a radconfirm when using a radtoolbar in a radgrid I would be very grateful.
GlenB
Top achievements
Rank 1
 answered on 20 May 2010
6 answers
651 views
I am populating the RadComboBox in the $(document).ready method in MVC project. It shows RadComboBox object does not exist error when I access it like "$find("<%= combobox.ClientId%>"); If I use PageLoad function instead of (document).ready then it works but PageLoad is called twice.

I appreciate any sugesstion to solve this issue!

thanks

 

Kevin
Top achievements
Rank 1
 answered on 20 May 2010
2 answers
137 views
I'm using the RadControls v2010.1.309.35


With the rad editor is there a way to persist custom colors so that when a user comes back their custom colors are retained?  i'm fine with using a cookie approach if necessary so that the custom colors are user/browser specific.

Thanks!
-Mark

Mark Kucera
Top achievements
Rank 1
 answered on 20 May 2010
2 answers
892 views
Hi,

I am using RadControls for ASP.NET AJAX Q1 2010 SP1 in my current project.

Can you please tell me how to deselect the items in a ComboBox after it is initially loaded?

I tried to do it by setting SelectedIndex to -1 as follows but it didn't work.

protected void Page_Load(object sender, EventArgs e) 
    if (!IsPostBack) 
    { 
        this.rcbCategory.DataSource = PublisherServer.Categories(); 
        this.rcbCategory.DataTextField = "Name"
        this.rcbCategory.DataBind(); 
        this.rcbCategory.SelectedIndex = -1; 
    } 

Regards,
Herman Gouw


Kalina
Telerik team
 answered on 20 May 2010
2 answers
115 views
On the client side, I'm having trouble retreiving the index from one rotator to assign it to another. I'm clicking on a rotator item to load it in another rotator. I've tried a few things but have been unsuccessful so far. Here's what I've tried:
 
function itemOnClick_handler(sender, args) {   
$find('<%= ActiveSlide.ClientID %>').InitialItemIndex = args.get_item().get_index();   
$find('<%= ActiveSlide.ClientID %>').InitialItemIndex = sender.CurrentItemIndex();   
$find('<%= ActiveSlide.ClientID %>').InitialItemIndex = sender.get_item().get_index();   
$find('<%= ActiveSlide.ClientID %>').InitialItemIndex = args.get_item().CurrentItemIndex();   
}  
 
Are any of the above close? Here's my rotator:  
   
<telerik:RadRotator ID="ThumbRotator" runat="server" RotatorType="FromCode" Width="628" Height="118px" ItemHeight="118" ItemWidth="157" ScrollDuration="500" FrameDuration="3000" ScrollDirection="Left" PauseOnMouseOver="false" 

OnClientItemShowing

 

="itemShowing_handler" OnClientItemClicked="itemOnClick_handler"

>  

<ItemTemplate>   
    <div class="itemTemplate">  
        <asp:Label ID="hlnkThumbTitle" runat="server" Font-Names="Arial" Font-Size="XX-Small" Text='<%# DataBinder.Eval(Container.DataItem, "thumbTitle") %>'></asp:Label> 
        <br /> 
        <img src=
'<%# DataBinder.Eval(Container.DataItem, "thumbImage") %>' alt='<%# DataBinder.Eval(Container.DataItem, "thumbTitle") %>' class="RotatorImage" width="85px" height="60" />  
    </div>   
</ItemTemplate>   
<ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />   
<SlideShowAnimation Type="Fade"></SlideShowAnimation>   
</telerik:RadRotator>   
 
 
 

 

 


Randy Douglas
Top achievements
Rank 1
 answered on 20 May 2010
4 answers
159 views
Like other developers, I'm using the Blueprint CSS framework for layout and to unify CSS across browsers. I'm having an odd display issue where the text inside the combobox is offset vertically (looks like it is bottom aligned rather than middle aligned), and I'm seeing a grey box below it that is about five pixels tall.

For the vertical align issue, I'm guessing that the solution has something to do with overriding either the "RadComboBox" or "RadComboBox_{SkinName}" styles, but I can't seem to get it to work. I also tried to apply a vertical-align on "rcbInputCellLeft" and "rcbInputCellLeft input" to no avail.

For the grey box issue (I'm using the "Default" skin), I guess it means overriding the "RadComboBoxDropDown_{SkinName}" styles, but again, I've hit a wall.

Any suggestions?
Andrew
Top achievements
Rank 1
 answered on 20 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?