| If (TypeOf e.Item Is GridEditFormItem) AndAlso (e.Item.IsInEditMode) Then |
| Dim item As GridEditFormItem = CType(e.Item, GridEditFormItem) |
| Dim txtID As RadTextBox = CType(item.FindControl("txtID"), RadTextBox) |
| txtID.ToolTip = LookUpDesc(txtID.Text) |
| End If |
Hi,
I am having issue with Telerik Radgrid when placed with in asp:Loginview control.
The grid has Radmenu items as template column. Grid is ajaxified using RadAjaxManager. Grid allows sorting.
The problem is, when I sort a column, the radmenu items do not show.
If I don't place the grid in Loginview, everything works fine.
I would apperciate help on this.
Thanks,
Manisha
Here is the code...
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGridTesting.aspx.cs" Inherits="RadGridTesting"%> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <br /> |
| <asp:LoginView ID="LoginView1" runat="server"> |
| <LoggedInTemplate> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="rgCustomers"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="rgCustomers" LoadingPanelID="rlpDefault" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="rlpDefault" runat="server" Skin="Web20" /> |
| <telerik:RadGrid ID="rgCustomers" runat="server" Width="100%" AutoGenerateColumns="false" |
| Skin="Web20" DataSourceID ="SqlDSCustomers" |
| AllowPaging="true" PageSize="10" PagerStyle-AlwaysVisible="false" PagerStyle-Position="TopAndBottom" |
| PagerStyle-Mode="NextPrevAndNumeric" AllowSorting="true" AllowMultiRowSelection="true" |
| OnItemDataBound="rgCustomers_ItemDataBound" OnNeedDataSource="rgCustomers_NeedDataSource"> |
| <MasterTableView Width="100%" GridLines="Both" DataKeyNames="CustomerID"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridTemplateColumn HeaderText="PD Action" Visible="true" HeaderStyle-Width="55px" ItemStyle-Width="55px"> |
| <ItemTemplate> |
| <telerik:RadMenu ID="rmPDAction" runat="server" ItemClick="rmPDAction_ItemClick"> |
| <Items> |
| <telerik:RadMenuItem ImageUrl="~/App_Themes/Images/RAD/Menu/down.png" Width="30px" Height="24px"> |
| <Items> |
| <telerik:RadMenuItem Text="View" Value="View" /> |
| <telerik:RadMenuItem Text="Edit" Value="Edit" /> |
| <telerik:RadMenuItem Text="Continue Edit" Value="ContinueEdit" /> |
| <telerik:RadMenuItem Text="Finish Edit" Value="FinishEdit" /> |
| </Items> |
| </telerik:RadMenuItem> |
| </Items> |
| </telerik:RadMenu> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField ="CustomerID" HeaderText ="ID" UniqueName ="CustomerID" DataType="System.Int32" AllowSorting="true" SortExpression="CustomerID" ></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText ="First Name" DataField ="FirstName" UniqueName ="FirstName" DataType="System.String" AllowSorting="true" SortExpression="FirstName"></telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="SqlDSCustomers" runat="server" |
| ConnectionString="<%$ ConnectionStrings:AdventureWorksLT2008R2cnn %>" |
| SelectCommand="SELECT [CustomerID], [FirstName], [LastName], [CompanyName], [EmailAddress], [Phone] FROM [vw_Customers]"></asp:SqlDataSource> </LoggedInTemplate> |
| <AnonymousTemplate> |
| <asp:Literal ID="litLoginMsg" runat="server" Text="Please login"></asp:Literal> |
| </AnonymousTemplate> |
| </asp:LoginView> |
| </form> |
| </body> |
| </html> |
Hello,
I need to change dataSource in DropDownList(ddl1) in RadGrid when the client choosed value in other dropDownList(ddl2) in RadGrid.
In ItemCreated I registered to event selectIndexChanged of ddl2
And in the event I changed the dataSource of ddl1(as I saw on your instructions)
Here's the code:
protected void Grid_ny_ParticipationStatus_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is Telerik.Web.UI.GridEditableItem && e.Item.IsInEditMode || e.Item is Telerik.Web.UI.GridEditableItem && e.Item.OwnerTableView.IsItemInserted)
{
ddlActive = (e.Item as Telerik.Web.UI.GridEditableItem)["iActiveId"].Controls[0] as Telerik.Web.UI.RadComboBox;
if (ddlActive != null)
{
ddlActive.AutoPostBack = true;
ddlActive.SelectedIndexChanged += new Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventHandler(ddlActive_SelectedIndexChanged);
{
}
}
protected void ddlActive_SelectedIndexChanged(object sender, System.EventArgs e)
{
int active;
int.TryParse(ddlActive.SelectedValue, out active);
Telerik.Web.UI.GridEditableItem editableItem = (sender as Telerik.Web.UI.RadComboBox).NamingContainer as Telerik.Web.UI.GridEditableItem;
Telerik.Web.UI.RadComboBox ddl = editableItem["iParticipationStatusId"].Controls[0] as Telerik.Web.UI.RadComboBox;
ddl.DataSource = codeTablesMng.GetCodeTable("tbl_code_ParticipationStatus", "iActiveId", active);
ddl.DataBind();
}
The problem that in update it's work and in Insert it's not work.
Please your help.
Thank you.
Chaya
Hello All,
I have two DropBownBoxes in a Modal Pop Up extender. But when I click to see the dropdown contents, the list is put behind the pop up how do I change this?
Thank you in advance
<telerik:RadTreeView ID="RadTreeView1" runat="server" DataFieldID="emailid"
DataTextField="name" DataSourceID="SqlDataSource1" Skin="Sitefinity" >
<DataBindings>
<telerik:RadTreeNodeBinding Expanded="true" />
</DataBindings>
</telerik:RadTreeView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
cs page code is....
protected void Page_Load(object sender, EventArgs e)
{
connectionString = System.Configuration.
ConfigurationSettings.AppSettings["connstring"];
SqlDataSource1.ConnectionString = connectionString;
SqlDataSource1.SelectCommand =
"select * from chat_status where tempstatus='online'";
}
from this i can able to get the names from my table but its not look like treeview structure...
i am getting only the root node.. whats wrong with this code... plz help me...
thanks..in advance...