Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
879 views
Hi,

I'm using the following grid.  I need to get a reference to the combobox "cboGrdSysAppsFilter" that I have embedded in my filter template.  I'm not quite sure how to do it, nor can I find any articles/forum posts that directly reference this.  I've tried every way I know to access grid items, to no avail.  I'm sure it's easy, just need to be pointed in the right direction. 

Thanks,
Marty

<telerik:RadGrid OnDetailTableDataBind="GrdSysApps_DetailTableDataBind" ID="GrdSysApps" 
    runat="server" OnNeedDataSource="GrdSysApps_OnNeedDataSource" AllowMultiRowSelection="True" 
    ClientSettings-Scrolling-AllowScroll="true" AutoGenerateColumns="False" Width="99%" 
    ClientSettings-Scrolling-ScrollHeight="150" GridLines="None" ShowGroupPanel="true" 
    ClientSettings-Scrolling-SaveScrollPosition="true" ClientSettings-Scrolling-UseStaticHeaders="true" 
    AllowFilteringByColumn="true" AllowSorting="true" ClientSettings-AllowColumnsReorder="false">  
    <MasterTableView DataKeyNames="SystemApplicationID" ClientDataKeyNames="SystemApplicationID">  
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="SystemApplicationID" EmptyDataText="&amp;nbsp;" 
                UniqueName="column" Visible="False">  
            </telerik:GridBoundColumn> 
            <custom:CustomClientSelectColumn UniqueName="SelectedRows">  
                <FilterTemplate> 
                    <asp:DropDownList Font-Size="X-Small" ID="cboGrdSysAppsFilter" AutoPostBack="true" 
                        runat="server" OnSelectedIndexChanged="cboSelected_SelectedIndexChanged">  
                        <asp:ListItem>All</asp:ListItem> 
                        <asp:ListItem>Selected</asp:ListItem> 
                        <asp:ListItem>Not Selected</asp:ListItem> 
                    </asp:DropDownList> 
                </FilterTemplate> 
            </custom:CustomClientSelectColumn> 
            <telerik:GridBoundColumn DataField="Name" EmptyDataText="&amp;nbsp;" HeaderText="Name" 
                UniqueName="column2">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Description" EmptyDataText="&amp;nbsp;" HeaderText="Description" 
                UniqueName="column3">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="ManagerDel" EmptyDataText="&amp;nbsp;" HeaderText="Mgr Approver" 
                UniqueName="column5">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="DirectorDel" EmptyDataText="&amp;nbsp;" HeaderText="Dir Approver" 
                UniqueName="column9">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Director2Del" EmptyDataText="&amp;nbsp;" HeaderText="Dir2 Approver" 
                UniqueName="column6">  
            </telerik:GridBoundColumn> 
        </Columns> 
        <DetailTables> 
            <telerik:GridTableView DataKeyNames="SystemApplicationID" HierarchyLoadMode="ServerOnDemand" 
                AllowSorting="false" AllowFilteringByColumn="false" Name="OriginalOwners">  
                <ParentTableRelation> 
                    <telerik:GridRelationFields MasterKeyField="SystemApplicationID" DetailKeyField="SystemApplicationID" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridBoundColumn HeaderText="Default System Manager" HeaderButtonType="TextButton" 
                        DataField="Manager">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Default System Director" HeaderButtonType="TextButton" 
                        DataField="Director">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Default System 2nd Director" HeaderButtonType="TextButton" 
                        DataField="Director2">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
    </MasterTableView> 
    <ClientSettings AllowDragToGroup="true">  
        <Selecting AllowRowSelect="true" /> 
        <ClientEvents OnRowSelected="GrdSysApps_RowSelected" OnRowDeselected="GrdSysApps_RowDeselected" 
            OnRowCreated="GrdSysApps_RowCreated" OnCommand="RaiseCommand" /> 
    </ClientSettings> 
    <FilterMenu EnableTheming="True">  
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </FilterMenu> 
</telerik:RadGrid> 


Marty
Top achievements
Rank 1
 answered on 13 Mar 2009
2 answers
107 views
Hello Community !

I'd like to know how to destroy a RadDock when the user click the Close button.
The default behavior is to hide the RadDock. It is convenient when you need to reopen this RadDock for some reasons.
But in my case, when the user closes the RadDock I'd like to destroy the component and all the components that were inside the Dock.

BR, Laurent
lchesnais
Top achievements
Rank 1
 answered on 13 Mar 2009
1 answer
143 views

 

Hi, I am having a problem when trying to edit a parent table that has two details on the same level when I have the

 

 

HierarchyDefaultExpanded="True" . Everything works as expected when that is false. The problem is when I am going into editmode for the parent grid ("USERINFO") the detail tables are still trying to be drawn but in the case statment for USERPHONE the drv is pulling the row for the parent row and the column does not exist in the parent. I was expecting that the e.item.dataitem would be the detail rows. Any help would be appreciated. The parts in bold below are where I think the problem is occurring.

 

 

Protected

 

Sub radgridUser_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles radgridUser.ItemDataBound

 

 

Dim lbl As Label

 

 

Select Case e.Item.OwnerTableView.Name.ToUpper

 

 

Case "USERINFO"

 

 

If (TypeOf e.Item Is GridDataItem AndAlso Not e.Item.IsInEditMode) Then

 

 

Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)

 

lbl =

DirectCast(e.Item.FindControl("lblName"), Label)

 

lbl.Text = drv(

"FirstName") & IIf(drv("MiddleName") = "&nbsp;", " ", " " & drv("MiddleName") & " ") & drv("LastName")

 

 

End If

 

 

Case "USERPHONE"

 

 

'not in edit mode

 

 

If (TypeOf e.Item Is GridDataItem AndAlso Not e.Item.IsInEditMode) Then

 

 

Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)

 

lbl =

DirectCast(e.Item.FindControl("lblPhoneType"), Label)

 

lbl.Text = drv(

"PhoneTypeDesc")    <--- Blows up here because "phonetypedesc" does not belong to userinfo table

 

 

End If

 

 

If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode AndAlso Not TypeOf e.Item Is GridEditFormInsertItem) Then

 

 

Dim item As GridEditableItem = e.Item

 

 

Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView) 

 

 

'access/modify the edit item template settings here

 

 

Dim list As DropDownList = item.FindControl("ddlPhoneType")

 

list.DataSource = dvPhoneTypes

list.DataTextField =

"PhoneTypeDesc"

 

list.DataValueField =

"PhoneTypeId"

 

list.DataBind()

list.SelectedValue = (drv(

"PhoneTypeId")).ToString

 

 

End If

 

 

Case "USERADDRESS"

 

 

End Select

 

 

End Sub

 

Pavlina
Telerik team
 answered on 13 Mar 2009
1 answer
79 views
Hi,
  I  have a requirement where I need to hide the headers of grid. I don't need headers to be shown for my requirement. It be more precise the grid header is of self referential grid.
Daniel
Telerik team
 answered on 13 Mar 2009
1 answer
136 views
Hi
        I used the Rad text box with multiline property here my problem is I wrote the text with formated  like this
 Ramesh
balu
kumar
           "Welcome to all"

I stored the textbox values Sql server ... When i retrieve the data that time the data is showing like this  ramesh babu kumar "welcome to all" But i want to what i given that mean formatted output...

           Let me know the How can i store the formatted output and retrieve the formatted output

Regards
G.  Manikandan
Daniel
Telerik team
 answered on 13 Mar 2009
3 answers
66 views
Hi,
    I am using radUpload Control in my aspx page. I am working in .NET 2.0.
I want when user click on browse button and select any image and click on OK.
After this, there should be new row added below.
In other words, I want the functionality of the Add button shifted to the browse button after user selects file.

Please replay how can I achieve this?
Genady Sergeev
Telerik team
 answered on 13 Mar 2009
6 answers
159 views
Hi,

I have a radgrid that is created dynamically. But when i click on the rows in the grid.The grid is shaking and the column seem to adjust.
Any help on this would be greatly appreciated.

Below is the code for the radgrid

RadGrid

grid = new RadGrid();

 

grid.ID =

"radGridProducts";

 

grid.AutoGenerateColumns =

false;

 

grid.AllowSorting =

true;

 

grid.AllowMultiRowSelection =

true;

 

grid.AllowMultiRowEdit =

true;

 

grid.GridLines =

GridLines.None ;

 

 

//grid.Width = Unit.Percentage(100);

 

 

//grid.MasterTableView.TableLayout = GridTableLayout.Fixed;

 

grid.Height =

Unit.Pixel(380);

 

 

 

String htmlColor = "#EDEFF1";

 

 

Color backColor = ColorTranslator.FromHtml(htmlColor);

 

grid.AlternatingItemStyle.BackColor = backColor;

 

//grid.BorderColor = Color.Blue;

 

grid.MasterTableView.AllowPaging =

true;

 

grid.MasterTableView.PagerStyle.AlwaysVisible =

true;

 

grid.MasterTableView.PagerStyle.Position =

GridPagerPosition.TopAndBottom;

 

grid.MasterTableView.PagerStyle.Mode =

GridPagerMode.NextPrevNumericAndAdvanced;

 

grid.ClientSettings.AllowKeyboardNavigation =

true;

 

grid.ClientSettings.Selecting.AllowRowSelect=

true;

 

grid.ClientSettings.Scrolling.AllowScroll =

true;

 

grid.ClientSettings.Scrolling.UseStaticHeaders =

true;

 

grid.ClientSettings.Scrolling.ScrollHeight =

Unit.Pixel(300);

 

 

grid.FilterMenu.EnableTheming=

true;

 

grid.FilterMenu.CollapseAnimation.Duration = 200;

grid.FilterMenu.CollapseAnimation.Type =

AnimationType.OutQuint;

 

 

 

//Add Products Master table

 

grid.MasterTableView.Name =

"ProductParent";

 

grid.MasterTableView.PageSize = 30;

grid.MasterTableView.DataKeyNames =

new string[] { "Id", "ParentId","ProductLevel","Tag"};

 

grid.MasterTableView.EditMode =

GridEditMode.InPlace;

 

 

//grid.MasterTableView.TableLayout = GridTableLayout.Fixed;

 

 

 

GridEditCommandColumn col0 = new GridEditCommandColumn();

 

col0.ButtonType =

GridButtonColumnType.ImageButton;

 

col0.UpdateImageUrl =

"../images/Update.gif";

 

col0.EditImageUrl =

"../images/Edit.gif";

 

col0.InsertImageUrl =

"../images/Insert.gif";

 

col0.CancelImageUrl =

"../images/Cancel.gif";

 

col0.UniqueName =

"EditCommandColumn";

 

grid.MasterTableView.Columns.Add(col0);

 

//grid.MasterTableView.Columns[0].HeaderStyle.Width = Unit.Percentage(4);

 

 

//grid.MasterTableView.Columns[0].HeaderStyle.Width = Unit.Pixel(30);

 

 

GridButtonColumn col1 = new GridButtonColumn();

 

col1.Text =

"Delete";

 

col1.ConfirmText =

"Delete this product?";

 

col1.ButtonType =

GridButtonColumnType.ImageButton;

 

col1.ImageUrl =

"../images/Delete.gif";

 

col1.CommandName =

"Delete";

 

col1.UniqueName =

"DeleteColumn";

 

grid.MasterTableView.Columns.Add(col1);

 

//grid.MasterTableView.Columns[1].HeaderStyle.Width = Unit.Percentage(3);

 

 

//grid.MasterTableView.Columns[1].HeaderStyle.Width = Unit.Pixel(30);

 

 

GridClientSelectColumn col2 = new GridClientSelectColumn();

 

col2.UniqueName =

"checkBoxColumn";

 

grid.MasterTableView.Columns.Add(col2);

 

//grid.MasterTableView.Columns[2].HeaderStyle.Width = Unit.Percentage(4);

 

 

//grid.MasterTableView.Columns[2].HeaderStyle.Width = Unit.Pixel(30);

 

 

GridBoundColumn col3 = new GridBoundColumn();

 

col3.DataField =

"Tag";

 

col3.UniqueName = grid.MasterTableView.Name +

"colTag";

 

col3.HeaderText =

"Tag";

 

 

//col3.ReadOnly = true;

 

grid.MasterTableView.Columns.Add(col3);

 

//grid.MasterTableView.Columns[3].HeaderStyle.Width = Unit.Percentage(15);

 

 

GridBoundColumn col4 = new GridBoundColumn();

 

col4.DataField =

"ShortDescription";

 

col4.UniqueName = grid.MasterTableView.Name +

"colShortDescription";

 

col4.HeaderText =

"Short Description";

 

col3.MaxLength = 40;

grid.MasterTableView.Columns.Add(col4);

 

//grid.MasterTableView.Columns[4].HeaderStyle.Width = Unit.Percentage(15);

 

 

GridBoundColumn col5 = new GridBoundColumn();

 

col5.DataField =

"LongDescription";

 

col5.UniqueName = grid.MasterTableView.Name +

"colLongDescription";

 

col5.HeaderText =

"Long Description";

 

col5.MaxLength = 80;

grid.MasterTableView.Columns.Add(col5);

 

//grid.MasterTableView.Columns[5].HeaderStyle.Width = Unit.Percentage(25);

 

 

GridBoundColumn col6 = new GridBoundColumn();

 

col6.DataField =

"ShortDescription2";

 

col6.UniqueName = grid.MasterTableView.Name +

"colShortDescription2";

 

col6.HeaderText =

"Short Description 2";

 

col6.MaxLength = 40;

grid.MasterTableView.Columns.Add(col6);

 

//grid.MasterTableView.Columns[6].HeaderStyle.Width = Unit.Percentage(15);

 

 

GridHyperLinkColumn col7 = new GridHyperLinkColumn();

 

col7.UniqueName = grid.MasterTableView.Name +

"colCharacteristics2";

 

col7.HeaderText =

"Characteristics";

 

col7.DataNavigateUrlFields =

new string[] { "Id", "LongDescription" };

 

col7.DataNavigateUrlFormatString =

"javascript:ShowCharacteristics('{0}', '{1}');";

 

col7.Text =

"View";

 

grid.MasterTableView.Columns.Add(col7);

grid.MasterTableView.Columns[7].HeaderStyle.Width =

Unit.Percentage(10);

 

 

//grid.MasterTableView.Columns[7].HeaderStyle.Width = Unit.Pixel(50);

 

 

GridHyperLinkColumn col8 = new GridHyperLinkColumn();

 

col8.UniqueName = grid.MasterTableView.Name +

"colSRP";

 

col8.HeaderText =

"Quality Checks";

 

col8.DataNavigateUrlFields =

new string[] { "Id", "LongDescription" };

 

col8.DataNavigateUrlFormatString =

"javascript:ShowSRPs('{0}','{1}');";

 

col8.DataTextField =

"SRPViewText";

 

 

//col8.Text = "View";

 

grid.MasterTableView.Columns.Add(col8);

grid.MasterTableView.Columns[8].HeaderStyle.Width =

Unit.Percentage(10);

 

 

//grid.MasterTableView.Columns[8].HeaderStyle.Width = Unit.Pixel(50);

 

 

grid.NeedDataSource +=

new GridNeedDataSourceEventHandler(this.RadGridProducts_NeedDataSource);

 

grid.DetailTableDataBind +=

new GridDetailTableDataBindEventHandler(this.RadGridProducts_DetailTableDataBind);

 

grid.DeleteCommand +=

new GridCommandEventHandler(this.radGridProducts_DeleteCommand);

 

grid.UpdateCommand +=

new GridCommandEventHandler(this.RadGridProducts_UpdateCommand);

 

grid.InsertCommand +=

new GridCommandEventHandler(this.RadGridProducts_InsertCommand);

 

grid.ItemDataBound +=

new GridItemEventHandler(this.RadGridProducts_ItemDataBound);

 

grid.MasterTableView.CommandItemTemplate =

new ProductCommandItemTemplate();

 

grid.MasterTableView.CommandItemDisplay =

GridCommandItemDisplay.Top;

 

 

// Add the grid to the placeholder

 

 

this.PlaceHolder1.Controls.Add(grid);

 

Dimo
Telerik team
 answered on 13 Mar 2009
2 answers
325 views
Hi,

I am developing multiple sharepoint web parts by loading web usercontrols on it.

my problem when i add two web parts i am getting the following error

 

Server Error in '/' Application.

Only one instance of a ScriptManager can be added to the page.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Only one instance of a ScriptManager can be added to the page.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Only one instance of a ScriptManager can be added to the page.]
   System.Web.UI.ScriptManager.OnInit(EventArgs e) +426
   Telerik.Web.UI.RadScriptManager.OnInit(EventArgs e) +78
   System.Web.UI.Control.InitRecursive(Control namingContainer) +321
   System.Web.UI.Control.InitRecursive(Control namingContainer) +198
   System.Web.UI.Control.InitRecursive(Control namingContainer) +198
   System.Web.UI.Control.InitRecursive(Control namingContainer) +198
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +834


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

What to do?

Can anybody help me

Santhosh
Top achievements
Rank 1
 answered on 13 Mar 2009
1 answer
349 views
Hi,
I have just upgrade from Rad Controls Classic. I am having trouble with a RadDock.

The markup looks like this:
        <asp:Panel runat="server" ID="pnlDocks"
 
            <telerik:RadDockLayout runat="server" ID="radDockLayout" Skin="Default" /> 
 
            <telerik:RadDockZone runat="server" ID="radDockingZone" Orientation="Vertical" BorderStyle="None" BackColor="Transparent"
 
                <telerik:RadDock runat="server" ID="rdo" Title="My Title" 
                    Width="520px" Height="60px" Visible="false" Resizable="false" 
                    DockHandle="TitleBar" Collapsed="false"
                    <ContentTemplate> 
                        ... 
                    </ContentTemplate> 
                </telerik:RadDock> 
                     
            </telerik:RadDockZone> 
 
        </asp:Panel> 

The dock displays OK but it is not possible to move it using the titlebar. I receive this error message in Firefox: "h is not a constructor".

I also have a RadAjaxManager that connects pnlDocks with another panel.
Petio Petkov
Telerik team
 answered on 13 Mar 2009
6 answers
180 views
Hello All,
Can anyone tell me if you can define an external css file via ConfigFile.xml? I'm trying with the following code and it doesn't seem to work:

<configuration>
 
<property name="CssFiles"
        <
item>~/DesktopModules/TelerikWebUI/RadEditorProvider/content.css</item>
    </
property>
</
configuration>

Thank you.    

 

 

 

 

Vinny
Top achievements
Rank 1
 answered on 13 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?