Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
97 views
Hello Telerik,

Is there any possibility to apply image transparency in a row. I am having rad grid, i set the alternate color of row to Grey color. 
In my grid one my column have checkbox.gif image binded with <asp:image> control. Basically the image have white background.

My question is, if my alternate row is gray is there any way to set transparency to gif image, so that i can avoid white background of gif image when in alternate row in gray color.

Hope my question is understandable, if so kindly let us know the possibilities to overcome the issue.

I attached my image also to review..

Regards,
Chandran
Dimo
Telerik team
 answered on 21 May 2010
4 answers
157 views
Hey at Telerik

I have a problem with the RadGrid when i define a height and width and enable scrolling.

The column headers are not shown correctly. They are misaligned.

I included a screenshot of the problem.

Underneath is the RadGrid. Have tried numerous settings nothing seems to fix it.

Regards

Morten Bomholt

<

 

telerik:RadGrid ID="RadGridElever" runat="server" Width="800px" Style="height:600px;"

 

 

AllowMultiRowSelection="True" AllowSorting="True" GridLines="None" Skin="Office2007"

 

 

AllowPaging="True" PageSize="20" OnNeedDataSource="RadGridElever_NeedDataSource" >

 

 

<PagerStyle NextPagesToolTip="Nste sider" NextPageToolTip="Nste side" PagerTextFormat="Skift side: {4} &amp;nbsp;Viser side {0} af {1}, elever {2} til {3} af {5}."

 

 

PrevPagesToolTip="Forrige sider" PrevPageToolTip="Forrige side" FirstPageToolTip="Frste side"

 

 

LastPageToolTip="Sidste side" AlwaysVisible="True" />

 

 

<MasterTableView AllowMultiColumnSorting="True" AutoGenerateColumns="False" CellSpacing="-1"

 

 

NoMasterRecordsText="Ingen data at fremvise.">

 

 

<NoRecordsTemplate>

 

 

<table style="border-bottom: solid 1px #D0D7E5; width: 100%; height: 50px;">

 

 

<tr>

 

 

<td>

 

Der er ingen data at fremvise

 

</td>

 

 

</tr>

 

 

</table>

 

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="PersonID" HeaderText="PersonID" SortExpression="PersonID"

 

 

UniqueName="PersonID" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Fornavn" HeaderText="Fornavn" SortExpression="Fornavn"

 

 

UniqueName="Fornavn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Efternavn" HeaderText="Efternavn" SortExpression="Efternavn"

 

 

UniqueName="Efternavn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="PostNr" HeaderText="PostNr" SortExpression="PostNr"

 

 

UniqueName="PostNr">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Postdistrikt" HeaderText="Postdistrikt" SortExpression="Postdistrikt"

 

 

UniqueName="Postdistrikt">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CprNr" HeaderText="CprNr" SortExpression="CprNr"

 

 

UniqueName="CprNr" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Uddannelse" HeaderText="Uddannelse" SortExpression="Uddannelse"

 

 

UniqueName="Uddannelse">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Folkeskole" HeaderText="Folkeskole" SortExpression="Folkeskole"

 

 

UniqueName="Folkeskole">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Indmeldelsesdato" DataFormatString="{0:d}" DataType="System.DateTime"

 

 

HeaderText="Indmeldelsesdato" SortExpression="Indmeldelsesdato" UniqueName="Indmeldelsesdato">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

</ClientSettings>

 

 

<SortingSettings SortedAscToolTip="Sorteret stigende" SortedDescToolTip="Sorteret faldende"

 

 

SortToolTip="Klik her for at sortere" />

 

 

<StatusBarSettings LoadingText="Indlser..." ReadyText="Klar" />

 

 

</telerik:RadGrid>

 

Dimo
Telerik team
 answered on 21 May 2010
1 answer
218 views
Is there a way to cause an AJAX Request so that a RadAJAXPanel will fire an AJAX event on  Close of a RadWindow.. I know this is a very simple one, might just be the time of the day!!!
Shinu
Top achievements
Rank 2
 answered on 21 May 2010
4 answers
133 views
Hi,

I must be missing something in one of these exapmles but I can't work this out.

I have built a custom provider which is working fine. I have the advanced edit forms set up and working. What I need to be able to do is to get the selected resource, in my case a room id when the advanced edit/insert form is opened and then with that ID select a subset of data to populate the custom attributes with.

So for a selected room there is a set of available resources that you can select from. But I can't seem to capture this room ID anywhere so that I can do the query.

Surely this is very simple? Can you point me in the right direction?

Thanks.
Jacob
Top achievements
Rank 1
 answered on 21 May 2010
1 answer
213 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
101 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
127 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
286 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
234 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
670 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?