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

Am new to telerik,  Can someone help to solve the below scenario?

 I have radgrid, in that each row contains the check box and by selecting the checkbox, want to edit the certain column in that row.
Shinu
Top achievements
Rank 2
 answered on 07 Feb 2013
1 answer
86 views
hi all
on the top of my grid view is a combo box , and it is changing the style of my grid. i don't know how did it come in my grid?
how can i remove it?
in this image u can see it :  Img      => the combo box with "Default" text....
when i press the combo box i see all of the telerik style name. how can i remove it?
this is my code :
<telerik:RadGrid OnItemCreated="RadGrid1_ItemCreated" ID="RadGrid1" runat="server"
        AllowPaging="True" Width="800px" DataSourceID="SqlDataSource1"
             AutoGenerateColumns="False" CellSpacing="0" GridLines="None" Skin="Metro">
        <ClientSettings>
            <Selecting AllowRowSelect="true"></Selecting>
            <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
        </ClientSettings>
        <MasterTableView ClientDataKeyNames="sid" CommandItemDisplay="Top"
            DataKeyNames="sid" PageSize="12" Width="100%">
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
                Visible="True">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                Visible="True">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="sid" HeaderText="sid" ReadOnly="True"
                    SortExpression="sid" UniqueName="sid" Visible="False">
                    <HeaderStyle Font-Bold="True" Font-Names="Tahoma" ForeColor="#08AFEE" />
                    <ItemStyle Font-Bold="False" Font-Names="Tahoma" Font-Size="10pt" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Descr" HeaderText="نمایش"
                    SortExpression="Descr" UniqueName="Descr">
                    <HeaderStyle Font-Bold="True" Font-Names="Tahoma" ForeColor="#08AFEE" />
                    <ItemStyle Font-Bold="False" Font-Names="Tahoma" Font-Size="10pt" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Descr1" HeaderText="کارگردان"
                    SortExpression="Descr1" UniqueName="Descr1">
                    <HeaderStyle Font-Bold="True" Font-Names="Tahoma" ForeColor="#08AFEE" />
                    <ItemStyle Font-Bold="False" Font-Names="Tahoma" Font-Size="10pt" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="duration" HeaderText="مدت اجرا"
                    SortExpression="duration" UniqueName="duration">
                    <HeaderStyle Font-Bold="True" Font-Names="Tahoma" ForeColor="#08AFEE" />
                    <ItemStyle Font-Bold="False" Font-Names="Tahoma" Font-Size="10pt" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="saloonName" HeaderText="سالن"
                    SortExpression="saloonName" UniqueName="saloonName">
                    <HeaderStyle Font-Bold="True" Font-Names="Tahoma" ForeColor="#08AFEE" />
                    <ItemStyle Font-Bold="False" Font-Names="Tahoma" Font-Size="10pt" />
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
                    <ItemTemplate>
                        <asp:HyperLink ID="EditLink" runat="server" Text="       " CssClass="buy"
                            Height="35px" Width="34px" ></asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings>
               
            </EditFormSettings>
            <CommandItemTemplate>
                <a href="#" onclick="return ShowInsertForm();"></a>
            </CommandItemTemplate>
        </MasterTableView>
        <PagerStyle Mode="NumericPages" />
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
Eyup
Telerik team
 answered on 07 Feb 2013
11 answers
1.6K+ views
I am trying to bind radgrid to datasource null on page load .but the grid is not showing up.
I want the grid Headers to show even if there is no Data.
below is the used HTML Code

 

<telerik:RadGrid ID="rdgDepartment" runat="server" AutoGenerateColumns="False" Width="100%"

 

 

GridLines="None" Skin="Office2007" AllowFilteringByColumn="True"

 

 

AllowPaging="True" AllowSorting="True">

 

 

<HeaderContextMenu EnableTheming="True">

 

 

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

 

 

</HeaderContextMenu>

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" />

 

 

<MasterTableView EnableNoRecordsTemplate=true ShowHeadersWhenNoRecords=true >

 

 

<NoRecordsTemplate>

 

 

<div style="width: 300px;">

 

There are no records to display

</div>

 

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="DISCIP_CODE" HeaderText="Discipline Code(Staging)"

 

 

UniqueName="DISCIP_CODE">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="DISCIP_NAME" HeaderText="Discipline Name(Staging)"

 

 

UniqueName="DISCIP_NAME">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="SORT_ORDER" HeaderText="Discipline Sort Order(Staging)"

 

 

UniqueName="SORT_ORDER">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="DEPT_CODE" HeaderText="Discipline Code(PTR)"

 

 

UniqueName="DEPT_CODE">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="DEPT_DESC" HeaderText="Discipline Name(PTR)"

 

 

UniqueName="DISP_NAME">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="DEPT_SORT_ID" HeaderText="Discipline Sort Order(PTR)"

 

 

UniqueName="DISP_ORDER">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="STATUS" HeaderText="STATUS" UniqueName="STATUS">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings AllowDragToGroup="True">

 

 

<Selecting AllowRowSelect="True" />

 

 

<Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="True" ScrollHeight="250px" />

 

 

</ClientSettings>

 

 

<ExportSettings>

 

 

<Pdf FontType="Subset" PaperSize="Letter" />

 

 

<Excel Format="ExcelML" FileExtension=".xls" />

 

 

<Csv ColumnDelimiter="Colon" RowDelimiter="NewLine" />

 

 

</ExportSettings>

 

 

<FilterMenu EnableTheming="True">

 

 

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

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

Shinu
Top achievements
Rank 2
 answered on 07 Feb 2013
1 answer
98 views
I am attempting to use the Template Manager in the scenario where the user wants to open a template rather than insert it...
- The user has abandoned some existing editor content which would to be cleared and a new template opens.   Is there an event with some confirmation  which would handle this?

Cheers.


Rumen
Telerik team
 answered on 07 Feb 2013
1 answer
73 views
Hello,

I'm attempting to do a client side binding for my radgrid but after calling my webmethod, i get a server 500 error.

I have followed everything that was said in your online tutorial video. 

I have made sure that I had an empty function for OnCommand.

The function that I call to return the data to apply to the grid returns a datatable, I have tried to modify the function to return a list and it does the same issue.

What could be the cause of such error?

Thank you again,
Radoslav
Telerik team
 answered on 07 Feb 2013
1 answer
115 views
I want to get the row count after the  NeedDataSource event (after rebind client side).
How can I do this from client side.
Please help
Shinu
Top achievements
Rank 2
 answered on 07 Feb 2013
5 answers
234 views
Hi there,

I'm  using radEditor and found annoying error that must be solved.
What happened was the user wanted to paste HTML content from google finance to radEditor.
And it triggered javascript error, object not found in Internet Explorer 8.
For more details, I enclosed the google finance content at the end of this page.

After tiring and restless debugging, much testing, I still couldn't suppress the javascript error.
I use the onerror syntax to capture all javascript error, but it doesn't work.
window.onerror = function () {
    alert("Error captured");
}

Finally, I found the culprit. The image tag has javascript onload event. Thus I use the following crude code to replace the onload event.
This works for future use, but it sill doesn't solve the issue when the user pasted the content.
function OnClientPasteHtml(sender, args) {
    alert("OnPaste");
    var value = args.get_value();
    alert(value);
    value = value.replace(/ on/g, " _on");
    args.set_value(value);
}

In fact, I tried to paste the google finance content, I received the same javsacript error in this page.
I tried to use OnClientCommandExecuting radEditor client event, hoping I can modiy the clipboard content before it's being paste into radEditor. But the args.get_value() returns empty.

My questions,
1. How to suppress all javascript error in radEditor?
2. How to modify the clipboard content before it's being paste to radEditor. OnClientPasteHtml is too late.

Thank you.




http://www.google.com/finance

Huffington Deal Raises Question: What Site Will Be Sold Next?
By EVELYN M. RUSLI In agreeing to buy The Huffington Post for $315 million, AOL is putting what appears to be a significant premium on the ability to attract and build a community of readers.
Can the Huffington Post save AOL?  
Newspaper stocks jump on content hopes  
Market Chart
12,161.63 +69.48 (0.57%)
1,319.05 +8.18 (0.62%)
2,783.99 +14.69 (0.53%)
Rumen
Telerik team
 answered on 07 Feb 2013
1 answer
144 views
The modal is not resizing.  Please refer to the PNG file.
Here is my code:
<telerik:RadWindow ID="RadWindow2" runat="server"
                                                                        Modal="True" Behaviors="Move, Reload" Title="     Recurrence"
                                                                        AutoSize="True" ForeColor="White"
                                                                        AutoSizeBehaviors="Width, Height, Default" ReloadOnShow="True">
                                                                    <ContentTemplate>
                                                                        <p align="left">
                                                                                <asp:RadioButtonList ID="RadioButtonList1" runat="server">
                                                                                    <asp:ListItem Value="ThisWeekOnly" Selected="True">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selected Week</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Forever</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vocation !!!</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More Vocation !!!!</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Even More Vocation !!!!!</asp:ListItem>
                                                                                </asp:RadioButtonList>
                                                                        </p>
                                                                        <p>                                                                                       
                                                                            <asp:Button ID="btnSubmit" runat="server" Text="Submit"
                                                                                ForeColor="White"
                                                                                BackColor="#CC0000" BorderStyle="Outset"
                                                                                Font-Bold="True"
                                                                                UseSubmitBehavior="False" EnableTheming="True" OnClick="btnSubmit_Click"/>
                                                                               
                                                                            <asp:Button ID="Cancelbtn" runat="server" BackColor="#CC0000"
                                                                                            BorderStyle="Outset" Font-Bold="True" ForeColor="White" Text="Cancel"
                                                                                            UseSubmitBehavior="False" />
                                                                        </p>
                                                                    </ContentTemplate>
                                                                    </telerik:RadWindow>

 

Princy
Top achievements
Rank 2
 answered on 07 Feb 2013
1 answer
73 views
Hi, 
I've tried to bind a radgrid using jquery. On the first databind of the grid the desired rows have been shown without problems, from the second databind the grid has correcly set the datasource but it always displays "No records to display" message.
Debuggin the code I've found this function:
get_dataItems:function(){if(this._dataItems.length>0||(this._cachedItems&&this._cachedItems.length>0)){return this._dataItems; ....

The function is not correct because returns always the dataitems and It not considers the cachedItems. In my case the dataItmes is always empty from the second databind on the other hand the cachedItems is set.

this is my code to bind the grid:

function bindGridView(result) {
            var masterTable = $find("<%= Grid.ClientID %>").get_masterTableView();
            masterTable.set_dataSource(result.Dia);
            try {
                masterTable.dataBind();
            }
            catch (e) {
                alert(e);
            }
        }

There is a workaround to fix this behaviour?

Thanks,

Maurizio
Radoslav
Telerik team
 answered on 07 Feb 2013
1 answer
68 views
Hi,
Radwindow works fine in firefox and chrome but doesnot render properly in IE 9(doesnot display border, titlebar and behaviour buttons).
SKin is set at application level in webconfig file and  mark up for radwindow and radwindow manager is as below:
//ASPX

 

<telerik:RadWindowManager ID="RadWindowManager14" runat="server" EnableShadow="true"

 

VisibleStatusbar="false" Behaviors="Close, Move, Resize" DestroyOnClose="false"

 

ShowContentDuringLoad="false" IconUrl="img/preview_16x16.png" >

 

<Windows>

 

<telerik:RadWindow ID="APage" runat="server" Title="M4 Workforce" OnClientPageLoad="SetRadwindowHeightAndWidth" Left="200px" Top="25px" ReloadOnShow="true"

ShowContentDuringLoad="false" Modal="false" IconUrl="img/preview_16x16.png" Behaviors="Maximize, Minimize,Move, Close"

 

KeepInScreenBounds="true" OpenerElementID="ABtn" NavigateUrl="ggPages.aspx" >

 

</telerik:RadWindow>




//WebConfig

<

add key="Telerik.EnableEmbeddedSkins" value="true" />

<

 

 

add key="Telerik.Skin" value="Outlook" />

<

 

 

add key="Telerik.Window.Skin" value="WebBlue" />



Thanks in advance,
Prava
Princy
Top achievements
Rank 2
 answered on 07 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?