Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
111 views

Hi,

  Could any one help me in finfing the following error problem. I am using rad grid basic PDF export code which is give by the Rad help page. But while i am clicking the export button i am getting this rutime error

"The '*' character, hexadecimal value 0x2A, cannot be included in a name."


Plz help me for this scenarios


Regards,
Appu
Daniel
Telerik team
 answered on 29 Jun 2009
1 answer
83 views
We have a button for save(Not in RadGrid) and we need to get values of row cells for each row in order to save.
For this we need to loop the grid with rows and getting each cell value for each row,

Thanks Ahead!!!
Princy
Top achievements
Rank 2
 answered on 29 Jun 2009
2 answers
178 views
Hi All,
I have a RadGrid With Checkboxlist control in itemtemplate ,My question is How can I get number of selected item in every checkbox once user click the item
  thanks
ghadeer
Shinu
Top achievements
Rank 2
 answered on 29 Jun 2009
1 answer
213 views
Hi,

When i click on the Add new record of the gridtabletaview  textbox is not displayed , just the insert and the cancel links are displayed.

Please help me with this.

Here is the code 

 

<telerik:RadGrid ID="radGridComments" Skin="WebBlue" GridLines="None" runat="server" Width="100%" PageSize="20"

 

 

AllowPaging="True" AutoGenerateColumns="False"

 

 

ShowStatusBar="True" ShowFooter="False" OnDetailTableDataBind="radGridComments_DetailTableDataBind" >

 

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="PKey" HorizontalAlign="NotSet">

 

 

<DetailTables>

 

 

<telerik:GridTableView DataKeyNames="PKey" Width=70% Name="Actions" CommandItemDisplay=Top ed HorizontalAlign="NotSet">

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="CommentsPkey" MasterKeyField="PKey" />

 

 

</ParentTableRelation>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="PKey" Visible=False UniqueName="Pkey" >

 

 

<ItemTemplate >

 

 

<asp:Label runat="server" ID="lblID" Text='<%# Bind("Pkey") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="CommentPKey" Visible=False UniqueName="Pkey" >

 

 

<ItemTemplate >

 

 

<asp:Label runat="server" ID="lblCommentPKey" Text='<%# Bind("CommentPkey") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="StatusPKey" Visible=False UniqueName="StatusPkey" >

 

 

<ItemTemplate >

 

 

<asp:Label runat="server" ID="lblID" Text='<%# Bind("StatusPkey") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Subject" UniqueName="Subject" EditFormColumnIndex="1">

 

 

<HeaderStyle Width="15%" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" ID="lblSubject" Text='<%# DataBinder.Eval(Container.DataItem,"ActionSubject") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:TextBox CssClass="TextBox" Text='<%# ViewState("ActionSubject")%>' ID="txtSubject" runat=server></asp:TextBox>

 

 

<asp:RequiredFieldValidator ID="rfvSubject" runat="server" ErrorMessage="*" ControlToValidate="txtSubject"></asp:RequiredFieldValidator>

 

 

</EditItemTemplate>

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridTemplateColumn>

 

 

 

 

</Columns>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn HeaderText="FromDB" Visible=False UniqueName="TemplateColumn" >

 

 

<ItemTemplate >

 

 

<asp:Label runat="server" ID="lblFromDB" Text='<%# Bind("FromDB") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="PKey" Visible=False UniqueName="Pkey" >

 

 

<ItemTemplate >

 

 

<asp:Label runat="server" ID="lblID" Text='<%# Bind("Pkey") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="UserID" Visible=False UniqueName="UserID" >

 

 

<ItemTemplate >

 

 

<asp:Label runat="server" ID="lblUserID" Text='<%# Bind("UserId") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Comments Date" UniqueName="CommentsDate" EditFormColumnIndex="1">

 

 

<HeaderStyle Width="15%" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" ID="lblCommentsDate" Text='<%# Format(DataBinder.Eval(Container.DataItem,"CommentsDate"),"dd-MMM-yyyy") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadDatePicker ID="radCommentsDate" runat="server">

 

 

<DatePopupButton HoverImageUrl="" ImageUrl="" />

 

 

<Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">

 

 

 

</Calendar>

 

 

<DateInput DateFormat="dd-MMM-yyyy" Skin="">

 

 

</DateInput>

 

 

</telerik:RadDatePicker>

 

 

 

<asp:RequiredFieldValidator ID="rfvCommentsDate" runat="server" ErrorMessage="*" ControlToValidate="txtSubject"></asp:RequiredFieldValidator>

 

 

</EditItemTemplate>

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Subject" UniqueName="Subject" EditFormColumnIndex="1">

 

 

<HeaderStyle Width="15%" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" ID="lblSubject" Text='<%# DataBinder.Eval(Container.DataItem,"CommentsSubject") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:TextBox CssClass="TextBox" Text='<%# ViewState("Subject")%>' ID="txtSubject" runat=server></asp:TextBox>

 

 

<asp:RequiredFieldValidator ID="rfvSubject" runat="server" ErrorMessage="*" ControlToValidate="txtSubject"></asp:RequiredFieldValidator>

 

 

</EditItemTemplate>

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="Comments By" UniqueName="CommentsBy" EditFormColumnIndex="1">

 

 

<HeaderStyle Width="20%" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" ID="lblCommentsBy" Text='<%# Bind("CommentsBy") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadComboBox ID="radCommentsBy" runat="server">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

</telerik:RadComboBox>

 

 

 

 

<asp:RequiredFieldValidator ID="rfvCommentsBy" runat="server" ErrorMessage="*" ControlToValidate="radCommentsBy"></asp:RequiredFieldValidator>

 

 

</EditItemTemplate>

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="Comments" UniqueName="Comments" EditFormColumnIndex="1">

 

 

<HeaderStyle Width="50%" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" ID="lblComments" Text='<%# Bind("Comments") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadEditor ID="radComments" width="400px" runat="server" ToolsFile="../App_Data/RadEdit/ToolsFile.xml" >

 

 

 

<Content></Content>

 

 

 

</telerik:RadEditor>

 

 

 

</EditItemTemplate>

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridEditCommandColumn UniqueName="EditButton">

 

 

<HeaderStyle Width="50px" />

 

 

</telerik:GridEditCommandColumn>

 

 

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">

 

 

<HeaderStyle Width="60px" />

 

 

<ItemStyle Width="60px" />

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

<EditFormSettings ColumnNumber="3" >

 

 

<FormTableItemStyle Wrap="False"></FormTableItemStyle>

 

 

<FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>

 

 

<FormMainTableStyle CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" />

 

 

<FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" BackColor="White" />

 

 

<FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>

 

 

<EditColumn ButtonType="ImageButton" InsertText="Save" UpdateText="Save" UniqueName="EditCommandColumn1"></EditColumn>

 

 

<FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>

 

 

</EditFormSettings>

 

 

</MasterTableView>

 

 

<HeaderContextMenu Skin="">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</HeaderContextMenu>

 

 

<FilterMenu Skin="">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

Yavor
Telerik team
 answered on 29 Jun 2009
2 answers
662 views

hi!

I'm using a javascript to launch a window.

<script type="text/javascript">  
    function openRadWin()  
    {  
        radopen("http://www.telerik.com","RadWindow1");   
    }  
</script> 

The problem is that this window is launched inside a frame.

I want to know :

  1. If this launched window can be moved out of the frame? or be blocked inside of the frame?
  2. How to popup it in screen center? but not in frame center.

 

In  a word, how to popup the window from iframe, fixing it in screen center and moving out of the frame?

In my page, left side is a masterpage and right side there is an iframe in it, maybe like this demo effects:
http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx

If luanching window in iframe can't make this effects, is it necessary to popup a window from main page where the iframe is contained?

Hope I described the situation clearly, thank you!

Airad

 

Airad
Top achievements
Rank 1
 answered on 29 Jun 2009
1 answer
90 views

Hello,

In my site i am using Rad Grid,Rad Contex menu and  Rad popup features.
 
i am facing some problems :-
 1.    while i am inserting some through the Rad Popup , i am not being able to  rebining it.so newly inserted data are not showing in
        the Rad grid.Rad grid and Rad popup are  2 diiferent  Aspx page.
 2.    After inserting data through Rad popup  i want to close it automatically,How can i do this?

Thanks.
Denny

Georgi Tunev
Telerik team
 answered on 29 Jun 2009
5 answers
370 views

Hi, I have a button to programatically build the url for one RadWindow, but I have some strange problem showing the window, after the Window is closed, every control that must initiate an Ajax request forces a page reload on postback and the window apperas again.


This is my code on the page

    <script type="text/javascript">
   
    function OpenFreqWindow()
    {
        var mgr =  $find('RadWindowManager1'); // GetRadWindowManager();
//        alert(mgr);
        mgr.show();
        return false;
    }           
    function OpenWindow(url)
    {                     
        var mgr =  $find('RadWindowManager1'); // GetRadWindowManager();
        //alert(mgr);       
        var wnd = mgr.open(url, null);                              
        return false;
    }              
    </script>


this is the RadWindowManager

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista" Animation="None" Behavior="Default" Behaviors="Default" InitialBehavior="None" InitialBehaviors="None" Left="" Top="">
        <Windows>
            <telerik:RadWindow runat="server" Animation="None" Behavior="Default" Behaviors="Default"
                InitialBehavior="None" InitialBehaviors="None" Left="" NavigateUrl=""
                Skin="Vista" Style="display: none;" Top="" Modal="True" Width="500px" Height="500px">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

the code behind

    protected void btnShowWindow_Click(object sender, EventArgs e)
    {
            String url = "SomePage.aspx?source=fromWindow";
            GridItemCollection items = RadGrid1.Items;
            foreach (GridDataItem item in items)
            {
                TableCell cell = item["CheckBoxTemplateColumn"];
                CheckBox chkItem = cell.Controls[1] as CheckBox;
                if (chkItem.Checked)
                {
                    ++docCount;
                    url += "&doc"+docCount.ToString()+"=" + item["CustomerID"].Text;
                }
            }
            InjectScript.Text = "<script type='text/javascript'>Sys.Application.add_load(function(){OpenWindow('" + url + "')})</script>";
        }
    }

Can somebody help me with this issue? I've spent 2 days trying to figure out what's wrong

Any help would be appreciated

Thanks in advance
Georgi Tunev
Telerik team
 answered on 29 Jun 2009
1 answer
266 views

RadGrid

 

r = new RadGrid();

 

 

r.MasterTableView.DataKeyNames =

new string[] { "DepartmentID" };

 

 

 

r.Skin =

"Default";

 

 

 

r.Width =

Unit.Percentage(100);

 

 

 

r.PageSize = 5;

r.AllowPaging =

true;

 

 

 

r.AutoGenerateColumns =

 

 

false;

 

r.MasterTableView.PageSize = 15;

 

 

//Add columns

 

 

 

GridBoundColumn boundColumn;

 

boundColumn =

 

new GridBoundColumn();

 

boundColumn.DataField =

 

"DepartmentID";

 

boundColumn.HeaderText =

 

"DepartmentID";

 

r.MasterTableView.Columns.Add(boundColumn);

boundColumn =

 

new GridBoundColumn();

 

boundColumn.DataField =

 

"Budget";

 

boundColumn.HeaderText =

 

"Budget";

 

r.MasterTableView.Columns.Add(boundColumn);

 

 

 

 

 

//Detail table - Orders (II in hierarchy level)

 

 

 

GridTableView tableViewOrders = new GridTableView(r);

 

 

 

//tableViewOrders.DataSourceID = "AccessDataSource2";

 

 

tableViewOrders.DataKeyNames =

new string[] { "CourseID" };

 

 

 

GridRelationFields relationFields = new GridRelationFields();

 

relationFields.MasterKeyField =

 

"DepartmentID";

 

relationFields.DetailKeyField =

 

"DepartmentID";

 

tableViewOrders.ParentTableRelation.Add(relationFields);

RadGrid1.MasterTableView.DetailTables.Add(tableViewOrders);

 

 

//Add columns

 

 

boundColumn =

new GridBoundColumn();

 

boundColumn.DataField =

 

"CourseID";

 

boundColumn.HeaderText =

 

"CourseID";

 

tableViewOrders.Columns.Add(boundColumn);

boundColumn =

 

new GridBoundColumn();

 

boundColumn.DataField =

 

"Title";

 

boundColumn.HeaderText =

 

"Title";

 

tableViewOrders.Columns.Add(boundColumn);

r.AllowMultiRowSelection =

 

true;

 

r.MasterTableView.DetailTables.Add(tableViewOrders);

r.DetailTableDataBind +=

 

new GridDetailTableDataBindEventHandler(r_DetailTableDataBind);

 

r.NeedDataSource +=

 

new GridNeedDataSourceEventHandler(r_NeedDataSource);

 

r.ID =

 

"RockOn";

 

 

 

this.PlaceHolder1.Controls.Add(r);

its the same code posted on Site Examples..


it loads ok but when i try to expand the grid Row ... i get an error--


Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.


on page load i m binding the DataSets to the Grid

 

 

Shinu
Top achievements
Rank 2
 answered on 29 Jun 2009
8 answers
818 views
I was wondering if there is a way to do a 2 column treeview? My treeview is simple, but I'm using two columns to save space. Only way I can think to do it is to deselect all nodes from the adjacent treeview each time a node is selected? Any ideas on the best way to implement something like this?

Great product by the way. Simply awesome. The skins, performance, everything, is the best around.

Thanks,
Levi
Naresh
Top achievements
Rank 1
 answered on 29 Jun 2009
1 answer
152 views
Hi all,
I have checkboxlist in rad grid ,I want to bind it from sqldatasource
I try with :

 

Value='<%#Eval("answer")%>'

 

but I get error !!???

thanks
ghadeer
Daniel
Telerik team
 answered on 29 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?