Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
327 views
I have a standard RadWizard. It is within an RadUpdatePanel. On page load I have a chunk of code.... Product is a global Object

If Not IsPostBack Then
    'do something
*   Session("Product") = Product
Else
    'do something else
*   If Not isNothing(Session("Product")) Then
        Product = Session("Product")
    End If
End

* = Breakpoint

I have placed a breakpoint within 'do something' and one within 'do something else'.

When I run the page the 'do something' code runs as expected. The 'do something else' is not run - as it's not a postback this is correct.

Whenever I click the Next button of the RadWizard the 'do something' code runs - hovering over IsPostback shows that it's value is FALSE... but it should surely be TRUE. If I continue from this breakpoint the 'do something else' code runs - hovering over IsPostback now shows it's value to be TRUE.

Why are both the Not IsPostback and the IsPostback code executed when the Next button is fired?
Plamen
Telerik team
 answered on 16 Feb 2015
3 answers
111 views
hi all,
I am using RadScheduler in monthview. I made the appointment editable, clickable on clientside ( using clientside event, I am familiar with those).... But I am not able to make the appointment Resizable, Moveable.
( it is Resizable and Moveable in TimelineView).

I examine the HTML that being rendered, I notice that the Appoinments HTML does not have the DIV rsAptResize as it does in Timelineview. (refer to the attachment)

What could possibly caused this ? Can someone shed a light. May be someone from Telerik is familiar with the way the control is being rendered...
( I customize the RadScheduler and Appointment template, can this be a reason why? But it work find in TimeLine view? And in MonthView, I apply the same process. In MonthView the Appointments are clickable but note moveable...)

regards.

Hien Lam
Top achievements
Rank 1
 answered on 16 Feb 2015
1 answer
332 views
How do I add a onclick handler to my DocumentManager control? I can alter the href or URL property from a ExtendedFileProvider to add "javascript:clickHandler()". But this isn't good practice.

I have both a LinkManager and a DocumentManager. How do I add an onClick to the <a> tags that get generated by these controls?

Thank you!
Ianko
Telerik team
 answered on 16 Feb 2015
2 answers
131 views
I am getting an error:
'ddlWebPages' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value


This happens only when I click the Add New Record button on the grid. the ddlWebPages has no issues when I am in edit mode.
I believe this has to do the the snippet SelectedValue='<%# Bind("security_webpage_id") %> of the dropdownlist. 
I searched for solutions but none of them worked. There was one suggestion for SelectedValue='<%# Eval("security_webpage_id") == null ? null :  Eval("security_webpage_id") %>'. That didnt work for me. Has anyone dealt with this issue? HELP! I am so close to finishing my grid.



<telerik:RadGrid ID="RadGridwebpagemanagement" CssClass="webpageManagementGrid" MasterTableView-DataKeyNames="ID" runat="server"
            AllowFilteringByColumn="True" AllowSorting="True"
            GroupPanelPosition="Top" 
            OnNeedDataSource="RadGridwebpagemanagement_NeedDataSource"
            OnUpdateCommand="RadGridwebpagemanagement_UpdateCommand" OnItemDataBound="RadGridwebpagemanagement_ItemDataBound" OnDeleteCommand="RadGridwebpagemanagement_DeleteCommand" OnInsertCommand="RadGridwebpagemanagement_InsertCommand">
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New Webpage" 
                 InsertItemPageIndexAction="ShowItemOnCurrentPage">
 
                <columns>
                     
                    <telerik:GridBoundColumn DataField="webpage_name" HeaderText="Web Page" UniqueName="webpage_name" ItemStyle-Font-Names="Arial" ItemStyle-Font-Bold="true"
                                FilterControlWidth="200px">
                                <HeaderStyle Width="230px" Font-Names="Arial" />
                                <ItemStyle Width="230px" />
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridCheckBoxColumn DataField="add_privledge" HeaderText="Allow Adds" UniqueName="add_privledge"
                                FilterControlWidth="120px">               
                                <HeaderStyle Width="120px" Font-Names="Arial" />
                                <ItemStyle Width="120px" />
                    </telerik:GridCheckBoxColumn>
                     
                    <telerik:GridCheckBoxColumn DataField="edit_privledge" HeaderText="Allow Edits" UniqueName="edit_privledge"
                                FilterControlWidth="120px">               
                                <HeaderStyle Width="120px" Font-Names="Arial" />
                                <ItemStyle Width="120px" />
                   </telerik:GridCheckBoxColumn>
 
                     <telerik:GridCheckBoxColumn DataField="delete_privledge" HeaderText="Allow Deletes" UniqueName="delete_privledge"
                              FilterControlWidth="120px">               
                                <HeaderStyle Width="120px" Font-Names="Arial" />
                                <ItemStyle Width="120px" />
                    </telerik:GridCheckBoxColumn>                  
 
                   <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit" CancelText="Cancel" ItemStyle-Width="50px" HeaderStyle-Width="50px" FilterControlWidth="50px" />
                   <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="LinkButton" Text="Delete" CommandName="Delete" ItemStyle-Width="50px" HeaderStyle-Width="50px" FilterControlWidth="50px" />
                     
                </columns>
                
                <EditFormSettings EditFormType="Template">
                <FormTemplate>   
                    
                   
                    <div id="divGridEdit" class="divGrid">
                            <b>Add New Role to Webpage Association</b>
                            <br /><br />
                            <table>
 
                                <tr>
                                    <td><asp:Label Text="Web Page:" runat="server"></asp:Label></td>
                                    <td>
                                         <asp:DropDownList ID="ddlWebPages"  DataSourceID="sqlDataSourceWebpages" AppendDataBoundItems="True"
                                                DataTextField="webpage_name" DataValueField="ID" SelectedValue='<%# Bind("security_webpage_id") %>'
                                                runat="server"> 
                                          
                                         </asp:DropDownList>
 
                                    </td>
                                </tr>
                                <tr>
                                     <td><asp:Label Text="Allow Add:" runat="server"></asp:Label></td>
                                     <td><asp:CheckBox ID="chkboxAllowAdd" Checked='<%# Bind("add_privledge") %>' runat="server" /></td>
                                </tr>
                                <tr>
                                     <td><asp:Label Text="Allow Edit:" runat="server"></asp:Label></td>
                                     <td><asp:CheckBox ID="chkboxAllowEdit" Checked='<%# Bind("edit_privledge") %>' runat="server" /></td>
                                </tr>
                                <tr>
                                     <td><asp:Label Text="Allow Delete:" runat="server"></asp:Label></td>
                                     <td><asp:CheckBox ID="chkboxDelete" Checked='<%# Bind("delete_privledge") %>' runat="server" /></td>
                                </tr>
                                <tr>
                                    <td><br /></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td><asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                        CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'  runat="server" /></td>
                                    <td><asp:Button ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" /></td>
                                </tr>
                            </table>
                        </div>            
 
                </FormTemplate>
            </EditFormSettings>
 
 
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowDblClick="rowDblClick" />
            </ClientSettings>
                
        </telerik:RadGrid>
 
 
    </div>
 
    <asp:SqlDataSource ID="sqlDataSourceWebpages" runat="server" SelectCommand="SELECT * FROM dbo.security_webpage" ConnectionString="<%$ ConnectionStrings:GATEConnectionString %>"></asp:SqlDataSource>
 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
David
Top achievements
Rank 1
 answered on 13 Feb 2015
17 answers
1.4K+ views
Hello,
I'm have a RadGrid with 2 template columns. During ItemDataBound I'm dynamically creating a textbox and adding it to the Grid like this:

GridDataItem gdi = (GridDataItem)e.item

TextBox tb = new TextBox();
tb.ID = tbID;
tb.EnabeViewState = true;
gdi["column name"].controls.add(tb);

"Colum name" is a template column in the grid

I have another template column with a button in it that is created at design time. When I click that button I want to be able to find the dynamically created text box in the same row of the grid and read it's value.
How do I accomplish this?

Thanks in advance
Viktor Tachev
Telerik team
 answered on 13 Feb 2015
1 answer
248 views
Hi

This is My Telerik Grid Design. How to add Textbox control in my telerik Grid when i click one button i need add new textcontrol Created this grid but client side event firing for add new textbox how will do this

How to add controls to telerik grid using Client Side thats the concept

<telerik:RadGrid ID="Telerik1" runat="server" AutoGenerateColumns="false" Height="300px"   
                    ClientSettings-Scrolling-AllowScroll="true">
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="true"   />
                    </ClientSettings>
                    <MasterTableView DataKeyNames="ID">
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="ID" DataField="ID" ReadOnly="true" UniqueName="ID" />
                            <telerik:GridBoundColumn HeaderText="Name" DataField="NAME" ReadOnly="true" UniqueName="NAME">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
Viktor Tachev
Telerik team
 answered on 13 Feb 2015
3 answers
150 views
Radbutton using javascript and that 

 if (|| args.get_eventTarget().indexOf("RadButton") >= 0)
                    args.set_enableAjax(false);



protected void RadButton_Click(object sender, EventArgs e)
    {
       
            RadButton.Enabled = false;         // this is not working
    }
when ever click the button that button is disable pleas help me
Danail Vasilev
Telerik team
 answered on 13 Feb 2015
1 answer
77 views
it happened after updating the plugin and occurs only in WebKit browsers
Ianko
Telerik team
 answered on 13 Feb 2015
1 answer
44 views
In the ItemCommand event on my RadGrid I have the following section:
if (e.CommandName == RadGrid.ExpandCollapseCommandName || e.CommandName.Equals("RowClick",StringComparison.InvariantCultureIgnoreCase)) {
                e.Item.Expanded = true;
                e.Item.Selected = true;
   }

The e.Item.Expanded being set to true is taking 10-14 seconds to resolve, what could be happening that would cause such a large performance hit? 
Pavlina
Telerik team
 answered on 13 Feb 2015
3 answers
451 views
Hello, I am struggling getting the current url for the radwindow.  I always seem to obtain the original url. 

I have a radwindow hosting a webpage where I am able to perform searches internally,  Just as google, yahoo etc, the url is populated with a string of information identifying the performed search.  I need to pull the new url from the radwindow and pass it to a model popup I am using to save the string.

I have tried several options but none seem to get anything but the original url.
radwindow.get_NavigateUrl()
radwindow.Geturl() - doesn't work at all.
document.getElementById("radwindow").src

Please help,
thanks.
Marin Bratanov
Telerik team
 answered on 13 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?