Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
Hi.

I have a RadGridButton column

<

telerik:GridButtonColumn CommandName="print" Text="Print" UniqueName="Print" ButtonType="PushButton">

 

 

</telerik:GridButtonColumn>

 

and in event handling of the Command I want to do this:

void

RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

if (e.CommandName == "print")

 

{

 

.
.
.
System.Diagnostics.
Process.Start(Server.MapPath("App_data\\print.doc"));
}


Problem is that Word document won't open.

I put a test button on the same ASP page(outside of RadGrid) and handled Click event with calling to System.diagnostic.process.start as above. It works and opens Word document. So  The question is: why RadGrid button cannot handle call to open word document?

Thank you in advance

 

Iana Tsolova
Telerik team
 answered on 03 Nov 2008
3 answers
169 views
Hi all,

I have a RadGrid and i'm using an user control to edit and insert items. For me it works fine, but the deal is that i need to restrict the user for editing and inserting at the same time.

If the user is editing and click new item it needs to close the editing row  and open the inserting row and if i'm adding an item and i click on edit an item the inserting row needs to close and open the editing row

So  I have the event:

_____________________________

protected void myRadgrid_ItemCommand(object sender, GridCommandEventArgs e)
    {
        switch (e.CommandName)
        {
            case "Edit":
                this._edit = true; //bool value
                break;
            case "InitInsert":
                this._edit = false;
                this.rgTercero.EditIndexes.Clear();
                break;
            default:
                break;
        }
    }
________________________________

With that code when i'm editing and i clicked "insert new item" it close the editing row and open the inserting row(that works fine). But my problem is that i couldn't find the property to do the same when i am adding a register and i try to edit a row (it most close the inserting row and open the editing one).

I hope that you can help me with this, it's really important

Thx a lot

Regards,

Daniel Peralta

Daniel
Top achievements
Rank 1
 answered on 03 Nov 2008
5 answers
138 views
Hi all,

I have been using the radGrid and the editable user control for most of my pages.  Works great.  But now I want to do something a little difference with this same technique.  Here is what I'd like to do:

I have a radGrid on my page with an Edit button that when clicked, calls the user control.  The user control displays with a few telerik controls.  The user enters some data.  The user clicks the Update button.  But instead of updating the database like I normally do, I want to only update the radGrid row that was clicked with the values that the user entered.  So how would I do this?

Thanks,
Bob
Iana Tsolova
Telerik team
 answered on 03 Nov 2008
5 answers
164 views
How do I disable the toolbars as tabstops.  I have a single toolbar enabled for the editor I am using, but when I use the tab key to navigate through my input form, every button on the toolbar is a tabstop.

When I tab out of the previous field I want the focus to go straight to the editor pane.
Rumen
Telerik team
 answered on 03 Nov 2008
5 answers
143 views
I installed Q3 beta and setup a combo box.

I set autopostback to true, but when I change the index, it doesn't fire the SelectedIndexChanged event.

Any ideas?
Moon
Top achievements
Rank 2
 answered on 03 Nov 2008
3 answers
162 views
I'm using client side data binding using WebServices and JSON. The grid works great but has some issues. I guess the client side binding is not there yet. :)

The issue I am facing right now is while using GridClientSelectColumn. After initial load, when I change the page and bind grid on client side, all the check boxes get removed from Select column.

I also looked at RadGrid javascript code to see if I am doing something wrong but there is no handling for GridClientSelectColumn type in there.

This works well after I change the RadGrid javascript code in dataBind method by injecting:

if (_244[j]._data.ColumnType == "GridClientSelectColumn") { 
    var _254 = cell.getElementsByTagName("input"); 
    if (_254.length > 0 && _254[0].type == "checkbox") { 
        if (_254[0].checked) { 
            _254[0].checked = false
            _248.set_selected(false); 
        } 
    } 

Can someone suggest a solution?

Thanks
Vlad
Telerik team
 answered on 03 Nov 2008
13 answers
221 views
Hi,
I have a strange behavior when i try to ajaxify my Combox Multi-selection.
My comboBox contains an itemTemplate tag. This item Template tag contains a list of asp:textbox tag.
When i click on a checkbox of JMRadComboPersonGroupList radComboBox, i want to update an other RadComboBox (JMRadComboMonitoringList) MultiSelection (with asp:checkbox too).

When i execute my code, for the first click on checkbox, an ajax callback is sending (good!!!), when i click on other checkBox of this list, It's a global refresh of the page which is running (bad!!!!). An other click, and It's an ajax callback, on other click and it's a global refresh of the page.....
Half the time, it's a global refresh that are running.

here the code:
... 
<span>                     
    <telerik:RadComboBox ID="JMRadComboPersonGroupList" runat="server" AutoPostBack="true" ><%-- AutoPostBack="false" OnSelectedIndexChanged="JMRadComboPersonGroupList_SelectedIndexChanged" --%> 
                    <ItemTemplate> 
                        <asp:CheckBox runat="server" ID="CBPersonGroupList"  OnCheckedChanged="CBPersonGroupList_OnCheckedChanged" onclick="stopPropagation(event);" AutoPostBack="true" /> <%# DataBinder.Eval(Container, "Text") %>  
                    </ItemTemplate> 
     </telerik:RadComboBox>                     
</span> 
... 
<span>                     
                    <telerik:RadComboBox ID="JMRadComboMonitoringList" runat="server" AutoPostBack="true"
                        <ItemTemplate> 
                            <asp:CheckBox runat="server" ID="CBMonitoringList" onclick="stopPropagation(event);" Text=""/> <%# DataBinder.Eval(Container, "Text") %> 
                        </ItemTemplate> 
                    </telerik:RadComboBox>                     
</span>  
..... 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true"
     <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="JMRBChooseList"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="JMRadComboPersonGroupList" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="JMRadComboPersonGroupList"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="CBPersonGroupList" /> 
                    <telerik:AjaxUpdatedControl ControlID="JMRadComboPersonGroupList" /> 
                    <telerik:AjaxUpdatedControl ControlID="JMRadComboMonitoringList" /> 
                    <telerik:AjaxUpdatedControl ControlID="CBMonitoringList" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting>            
        </AjaxSettings> 
</telerik:RadAjaxManager> 
... 

<telerik:RadComboBox ID="id_rcb" runat="server" AutoPostBack="true" >
    <ItemTemplate>
       <asp:CheckBox runat="server" ID="CB"   OnCheckedChanged="CBPersonGroupList_OnCheckedChanged" onclick="stopPropagation(event);" AutoPostBack="true" /> <%# DataBinder.Eval(Container, "Text") %>
                    </ItemTemplate>
                </telerik:RadComboBox>   


Rosi
Telerik team
 answered on 03 Nov 2008
1 answer
238 views
Here is my scenario,

  • I have a radcombobox which allows custom text.
  • I have a save button on the page.
  • Biz Rule on clicking save -
    • If the user selects an item from combobox - no confirm is needed
    • If the user types custom text - show a confirm asking them if they want to use their text.
  • I have a server-side OnClick for the save button.
  • I have a client OnClientClick method that validates based on the radcombobox null check on selecteditem.
  • It works with a 'normal confirm' but no luck with a 'radconfirm'
  • I have read the KB on radconfirm blocking the thread solution. But that example has the radconfirm unconditonally called on OnClientClick.
  • How do I get it to work conditionally?

 


 

Thanks
mO
Georgi Tunev
Telerik team
 answered on 03 Nov 2008
1 answer
68 views

Hi,

I'm trying to edit and update a Date field in a radgrid. But an error shows "Cannot convert value of Parameter 'Date' from System.String to System.DateTime". I'm populating the radgrid using a ObjectDataSource which would try to update the mapped object when I try click on the update button on the radgrid.

Please Help!

Thank you,
Manuka.
Nikolay Rusev
Telerik team
 answered on 03 Nov 2008
7 answers
251 views
I have a RadGrid hooked up to an ObjectDataSource, and it's Ajax enabled.

The update and delete functions work fine.  The insert function returns an error saying that it can't find a generic method that takes the parameters DivisionName, DivisionDescription, DivisionID.

I don't get it, Division ID visible is set to false.  The signature for insert is just DivisionName and Divsion Description.  Why is it trying to add DivisionID to the equation?

onitemcreated only does validation just like the example, and that works.

The ASPX looks like this:

<telerik:RadGrid ID="RadGrid1" runat="server"
    AllowPaging="True"
    AllowSorting="True"
    DataSourceID="CmdbDivision"
    GridLines="None"
    Skin="Office2007"
    AllowAutomaticInserts="True"
    AllowAutomaticUpdates="True"
    AllowAutomaticDeletes="True"
    Width="99%"
    onitemcreated="RadGrid1_ItemCreated"
    AutoGenerateColumns="False">
<MasterTableView DataSourceID="CmdbDivision"
            OverrideDataSourceControlSorting="true"
            CommandItemDisplay="Top"
            EditMode="InPlace"
            DataKeyNames="DivisionID">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridEditCommandColumn>
        </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn DataField="DivisionID"
            HeaderText="DivisionID" SortExpression="DivisionID"
            UniqueName="DivisionID" DataType="System.Int32" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DivisionName" HeaderText="DivisionName"
            SortExpression="DivisionName" UniqueName="DivisionName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DivisionDescription"
            HeaderText="DivisionDescription" SortExpression="DivisionDescription"
            UniqueName="DivisionDescription">
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn CommandName="Delete" Text="Delete"
            UniqueName="column">
        </telerik:GridButtonColumn>
    </Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
    <PagerStyle Mode="NextPrevAndNumeric" />
</MasterTableView>
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
<FilterMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
    </telerik:RadGrid>
<asp:ObjectDataSource ID="CmdbDivision" runat="server"
        DeleteMethod="Delete"
        InsertMethod="Insert"
        SelectMethod="FetchAll"
        TypeName="CMDB.TblDivisionController"
        UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="DivisionID" Type="Object" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="DivisionID" Type="Int32" />
            <asp:Parameter Name="DivisionName" Type="String" />
            <asp:Parameter Name="DivisionDescription" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="DivisionName" Type="String" />
            <asp:Parameter Name="DivisionDescription" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>



Nikolay Rusev
Telerik team
 answered on 03 Nov 2008
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?