Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
112 views
Good day

I have a rad datetime picker on a asp website

I have to create the control dynamically.
I added an event handler to the control, but  the event is not firing at all.

Also i added an ID to the control which is not showing when i try and find that control trough firefox debugger.

 RadDateTimePicker dt = new RadDateTimePicker();
                    dt.SelectedDateChanged += new Telerik.Web.UI.Calendar.SelectedDateChangedEventHandler(dt_SelectedDateChanged);
                    dt.ID = "datetimepicker007";
                    Cell.Controls.Add(dt);


   void dt_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
        {
          //  throw new NotImplementedException();
            Response.Redirect("www.google.com");
        }

Tiaan
Top achievements
Rank 1
 answered on 28 Mar 2014
2 answers
331 views
I would like to have an event fired from a image map hotspot on a multi-page layout with associated tab strip.

Currently I have this working where I open a LightBox control via a script I picked up from that forum.

For one of the hot-spots I would rather have it change tabs, i.e. just as if the user clicked on another tab.

I've tried the following, but 99% of what I know is server-side, so assume I know NOTHING about how this works on the client.
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
<script type="text/javascript">
    function OpenAboutLightBox(index)
    {
        var lightBox = $find('<%= AboutLightBox.ClientID %>');
        lightBox.set_currentItemIndex(index);
        lightBox.show();
    }
    function switch_tab(index)
    {
        var tabstrip = $find('<%= RadTabStrip1.ClientID%>');
        tabstrip.index = index;
 
        var multipage = $find('<%= RadMultiPage1.ClientID%>');
        multipage.index = index
    }
</script>
 
</telerik:RadCodeBlock>

Tomica
Top achievements
Rank 2
 answered on 27 Mar 2014
3 answers
153 views
I would like to Add/Edit RadGrid items in a RadWindow that would be launched via the CommandItemTemplate buttons.  How would I do this?

<telerik:RadGrid ID="_gridContacts" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None"
                                     OnItemDeleted="_gridContacts_ItemDeleted">
                                    <MasterTableView CommandItemDisplay="Top" DataKeyNames="Contact_ID">
                                        <CommandItemTemplate>
                                            <div style="padding: 5px 5px;">
                                                <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# _gridContacts.EditIndexes.Count = 0%>' OnClientClick="ShowEditForm();"><img style="border:0px;vertical-align:middle;" alt="" src="/Images/Edit.png"/>Edit selected</asp:LinkButton>  
                                                <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# _gridContacts.EditIndexes.Count > 0%>'><img style="border:0px;vertical-align:middle;" alt="" src="/Images/Update.gif"/>Update</asp:LinkButton>  
                                                <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# _gridContacts.EditIndexes.Count > 0 Or _gridContacts.MasterTableView.IsItemInserted%>'><img style="border:0px;vertical-align:middle;" alt="" src="/Images/Cancel.png"/>Cancel editing</asp:LinkButton>  
                                                <asp:LinkButton ID="LinkButton2" runat="server" Visible='<%# Not _gridContacts.MasterTableView.IsItemInserted%>'><img style="border:0px;vertical-align:middle;" alt="" src="/Images/AddRecord.png"/>Add new</asp:LinkButton>  
                                                <asp:LinkButton ID="LinkButton3" runat="server" CommandName="PerformInsert" Visible='<%# _gridContacts.MasterTableView.IsItemInserted%>'><img style="border:0px;vertical-align:middle;" alt="" src="/Images/Insert.gif"/>Add this customer</asp:LinkButton>  
                                                <asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('Delete all selected contacts?')"
                                                    runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="/Images/Delete.png"/>Delete selected contacts</asp:LinkButton>  
                                                <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="/Images/Refresh.png"/>Refresh contact list</asp:LinkButton>
                                            </div>
                                        </CommandItemTemplate>
                                        <Columns>
                                            <%--<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                                                <HeaderStyle Width="20px"></HeaderStyle>
                                            </telerik:GridEditCommandColumn>
                                            <telerik:GridButtonColumn ConfirmText="Delete this Contact?" ButtonType="ImageButton"
                                                 CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                                 <HeaderStyle Width="20px"></HeaderStyle>
                                                 <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                                            </telerik:GridButtonColumn>
                                            <telerik:GridHyperLinkColumn DataTextFormatString="[More...]"
                                                DataNavigateUrlFields="Contact_ID" UniqueName="Contact_ID" DataNavigateUrlFormatString="contacts.aspx?ContactID={0}"
                                                HeaderText=" " DataTextField="Contact_ID">
                                                <HeaderStyle Width="40px"></HeaderStyle>
                                            </telerik:GridHyperLinkColumn>--%>
                                            <telerik:GridButtonColumn DataTextFormatString="Select {0}"
                                                ButtonType="ImageButton" UniqueName="column" HeaderText=" "
                                                ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                                ImageUrl="/images/vcard-icon.png">
                                                <HeaderStyle Width="40px"></HeaderStyle>
                                            </telerik:GridButtonColumn>
                                            <telerik:GridBoundColumn HeaderText="Name" UniqueName="column" FilterControlAltText="Filter column column" DataField="first_name">
                                                <ColumnValidationSettings>
                                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                                </ColumnValidationSettings>
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn HeaderText="Title" UniqueName="column" FilterControlAltText="Filter column column" DataField="Title">
                                                <ColumnValidationSettings>
                                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                                </ColumnValidationSettings>
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn HeaderText="Phone" UniqueName="column" FilterControlAltText="Filter column column" DataField="Phone1">
                                                <ColumnValidationSettings>
                                                    <ModelErrorMessage Text=""></ModelErrorMessage>
                                                </ColumnValidationSettings>
                                            </telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn UniqueName="Contact_Email" HeaderText="Contact Email">
                                                <ItemTemplate>
                                                    <a href="mailto:<%# DataBinder.Eval(Container.DataItem, "Contact_Email")%>"><%# DataBinder.Eval(Container.DataItem, "Contact_Email")%></a>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                        <EditFormSettings UserControlName="Contacts.ascx" EditFormType="WebUserControl">
                                            <EditColumn UniqueName="EditCommandColumn1">
                                            </EditColumn>
                                        </EditFormSettings>
                                    </MasterTableView>
                                    <ClientSettings>
                                        <ClientEvents OnPopUpShowing="PopUpShowing" />
                                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="False"></Selecting>
                                    </ClientSettings>
                                </telerik:RadGrid>
                                <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                                    <Windows>
                                        <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="300px"
                                            Width="300px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                                            Modal="true">
                                        </telerik:RadWindow>
                                    </Windows>
                                </telerik:RadWindowManager>
Kurt Kluth
Top achievements
Rank 1
 answered on 27 Mar 2014
1 answer
114 views
Hi,
I was checking Telerik UI for ASP.NET AJAX Q1 2014 trial version for feasibility.
I found that it generates lots of JavaScript for single control.
for example, i attached javascript code generated for a RadGrid with 10 row and single column. but it generated so many JSON properties. its size is more than 2 kb.

Is it possible to reduce it?
I mean most of the properties value are default. they can be prevented.
Konstantin Dikov
Telerik team
 answered on 27 Mar 2014
1 answer
38 views
Hi,

how to export the all nested grid footer item values .

We are using radgrid,in radgrid we took detailstable and in detailstable we have taken gridtableview for nested grid results.

Thanks in advance.



Kostadin
Telerik team
 answered on 27 Mar 2014
12 answers
346 views
Hello,

i cancelled Rad Grid Filter, Sort, PageIndexChanged events in 'ItemCommand' event (e.Canceled= true). But i unable to cancelled PageSizeChanged event. How can i achieve this?
Eyup
Telerik team
 answered on 27 Mar 2014
17 answers
232 views
Hi everyone, i have tried to create a web site asp.net including a radgrid (client side filtering), where databinding has made through a WCF service.
Project include a WcfService and the method GetDataAndCount of this WcfService is called for databinding by .aspx page with:  

<DataBinding Location="TelerikWcfService.svc" SelectMethod="GetDataAndCount"  SortParameterType="Linq" FilterParameterType="Linq"/>

I think I've correctly set up the web config with svc service data bindings.
Unfortunately, it doesn't work: on pageload, response is always 415 (Unsupported media type).

Any suggestions to solve the problem?
Thanks in advance

Regards
Vittorio
Viktor Tachev
Telerik team
 answered on 27 Mar 2014
2 answers
214 views
Hi,

I've found several other similar threads, but have not been able to get the color behind the buttons to change.
Check out the attached screenshot to see what I'm trying to accomplish.

I've tried:

div.RadToolBar .rtbOuter
 {
     background-color: white;
 }

but that affects the buttons as well.

I've also tried:

.rtbWrap
{
    background: white;
}

but with the same results.

Any suggestions?

Thanks in advance.

Jim
jlj30
Top achievements
Rank 2
 answered on 27 Mar 2014
1 answer
286 views
Hi,

I'm new to telerik products and fairly new to ASP.net AJAX.  I have a panel that displays textbook information and allows the user to Edit or Delete a book from the list.  When the user selects Edit, the window for that record expands and the user can change the status of the book.  They then hit either Update or Cancel.  When the user hits Update, it saves the new status and the display goes back to the form before the user hit Edit.

What I want to do is perform additional updates on other tables when the user updates the status.  I need to know how I can set the panel to perform the additional updates - the updates are different for the different statuses.

Thanks in advance,
Sharon

​ <asp:Panel runat="server" ID="pnlBooks" Visible="false">
<telerik:RadGrid ID="rgBooks" runat="server"
AllowFilteringByColumn="True"
AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False"
PageSize="20"
DataSourceID="ldsBooks"
AllowAutomaticUpdates="true"
AllowAutomaticDeletes="false"
>
<MasterTableView ShowFooter="False" DataKeyNames="barcode" ClientDataKeyNames="barcode"
DataSourceID="ldsBooks" EditMode="EditForms" HeaderStyle-Font-Bold="true">
<Columns>
<telerik:GridBoundColumn DataField="barcode" HeaderText="Barcode" UniqueName="barcode" ReadOnly="true" Visible="true" />
<telerik:GridBoundColumn DataField="tbtCatalog.isbn" HeaderText="ISBN" UniqueName="isbn" ReadOnly="true" Visible="true" />
<telerik:GridBoundColumn DataField="entityID" HeaderText="School" UniqueName="entityID" ReadOnly="true" Visible="false" />
<telerik:GridDropDownColumn DataField="entityID" DataSourceID="ldsSchools"
HeaderText="School" ListTextField="SCHABBRV" ListValueField="SchoolNum"
ReadOnly="true" SortExpression="INFO_SCH.SCHABBRV" UniqueName="SchAbbrv"
Visible="true">
</telerik:GridDropDownColumn>
<telerik:GridBoundColumn DataField="room" HeaderText="Room/Dept" UniqueName="room" ReadOnly="true" Visible="true" />
<telerik:GridBoundColumn DataField="tbtCatalog.Title" HeaderText="Title" UniqueName="title" ReadOnly="true" Visible="true" />
<telerik:GridBoundColumn DataField="tbtStatus.StatusName" HeaderText="Current Status" UniqueName="StatusName" ReadOnly="true" Visible="true" />
<telerik:GridBoundColumn DataField="StatusCode" UniqueName="StatusCode" ReadOnly="true" Visible="false" />
<telerik:GridDropDownColumn DataField="StatusCode" DataSourceID="ldsStatus"
HeaderText="Status" ListTextField="StatusName" ListValueField="StatusID"
ReadOnly="false" SortExpression="tbtStatus.StatusName" UniqueName="StatusID"
Visible="false" >
</telerik:GridDropDownColumn>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />
<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete" ConfirmText="Are you sure you want to delete this book?" ></telerik:GridButtonColumn>

</Columns>
</MasterTableView>
</telerik:RadGrid>
</asp:Panel>
Maria Ilieva
Telerik team
 answered on 27 Mar 2014
1 answer
82 views
Hi,

can a timeout be set for Telerik.Web.UI.GridItem tooltip?
Eyup
Telerik team
 answered on 27 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?