Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
76 views
Dears,
Is it possible to open RadWindow in RTL direction including Toolbar and Scrollbar ?

Best Regards
Georgi Tunev
Telerik team
 answered on 08 Dec 2010
1 answer
267 views
I have implemented a solution that uses the RadFileExplorer and CustomFileSystemProvider similar to what is in this post:

http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx

My issue is that when I try to open a file that has a number sign in the file name, the URL path that is passed to the FileSystemHandler.ashx is poorly formed, and loses everything after the first '#' character. I don't expect to see these kinds of characters in our file names, but this one was a valid file and breaks the FileSystemHandler.ashx at the response.write, because the path to the file is invalid.

Is there a way to intercept this file path URL and ensure that it stays well formed. I noticed in the OnClientFileOpen client event, the url looks fine, so checking it here doesn't help. It isn't until its passed to the handler code that it is missing data....
Fiko
Telerik team
 answered on 08 Dec 2010
3 answers
268 views
Hi ,

i am using radgrid control on my page and i want to get the text of the hyperlink column in view mode.
i am getting the control and all its property but not the text property of hyperlink control.

private void grid_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
}
else
{
string tasknumber = ((GridHyperLinkColumn)((RadGrid)sender).MasterTableView.DetailTables[0].Columns[6]).Text;
((GridHyperLinkColumn)((RadGrid)sender).MasterTableView.DetailTables[0].Columns[6]).DataNavigateUrlFormatString = "../AIPSTaskSelector.aspx?SubActionId={0}&disableMaster=1&read=true";
}
}

how to get the text here...
string tasknumber = ((GridHyperLinkColumn)((RadGrid)sender).MasterTableView.DetailTables[0].Columns[6]).Text;

here in string tasknumber is empty.

Please help.
Princy
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
63 views
Hi,

I would like this functionality:

series.ActiveRegionToolTip = String.Format("{0}: {1} ({2})", series.Name, "#Y", Convert.ToDateTime("#X") );

#X is a string representation of a DateTime as OADate. I am unable to convert it here as it is still just the string literal "#X" until run time.

What is the correct way of doing this?
Evgenia
Telerik team
 answered on 08 Dec 2010
1 answer
48 views

I know how to make the RadGrid do a postback ( RadGrid1_SelectedIndexChanged event ) when a single row is clicked and I know how to set the grid up to select multiple rows but I cannot figure out how to make it automatically do a postback after I have selected multiple rows.  Is there a way to do that?

Thanks

John

Shinu
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
100 views
I am displaying a list of objects in a grid. One property of the object is a boolean value that I'd like to be able to allow the user to change simply checking/unchecking a checkbox. I want this to be a one-click solution - that is to say, I don't want them to have to select the row, go into edit mode, check the box, choose to save the records, etc. If the box gets checked, I want to update the record that it is bound to.

Simple enough I think, but going about this seems so problematic.

At first, I tried using a GridCheckBoxColumn. This correctly displays the value of the property, but is disabled. I learned that is because this will only enable if the row is in Edit mode. I added some code to the Pre_Render() event which causes every single row to be set to edit mode initially, but this looks pretty ugly - all the rows have dark lines on them, and I have to go back and explicitly set every other control in the row to ReadOnly so that they aren't editable.

My second attempt involved using a GridTemplateColumn, and an asp:CheckBox which is bound (Bind(MyProperty)) to the property. This also displays the value fine, but I'm not sure how to handle it past that. Checking the box doesn't seem to update the bound data? I figured maybe I could set AutoPostBack=True and call the OnChecked() function to set the value manually, but how do I get a reference to the row/item being checked?

Any help would be appreciated.
Princy
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
45 views
I have a column in my grid that needs to change from either a dropdownbox or textbox based on the previous columns dropdown value.
Is this possible?

If you have any suggestions would be helpful.
Princy
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
383 views
I have a radgrid with a readonly column named Status.  After my validation completes I need to change the value of the column if there is an error.  I'm having problems changing the value. Any suggestions would be helpful.

if (errorCount > 0)
{               
    TableCell statusCell = item["STATUS"];
    (statusCell.Controls[0] as TextBox).Text = "Error";
    (statusCell.Controls[0] as TextBox).BackColor = System.Drawing.Color.Red;
}
<telerik:RadGrid ID="rdDeposits" AllowSorting="False" AllowPaging="False" runat="server"
                            AutoGenerateColumns="False" AllowAutomaticInserts="False" OnPreRender="rdDeposits_PreRender" 
                            AllowAutomaticDeletes="False" Skin="Web20" OnNeedDataSource="rdDeposits_NeedDataSource"
                             OnItemDataBound="rdDeposits_ItemDataBound" GridLines="Horizontal"  OnItemCommand="rdDeposits_ItemCommand" 
                             OnItemCreated="rdDeposits_ItemCreated" OnDeleteCommand="rdDeposits_ItemDeleted"
                            AllowMultiRowEdit="False" Width="738px" Height="360px">
                            <MasterTableView ShowFooter="true" DataKeyNames="ESCROW_ACCOUNT_DEPOSIT_ID" CommandItemDisplay="Top" EditMode="InPlace" TableLayout="Fixed">
                                <CommandItemTemplate>
                                    <div style="padding: 5px 5px;">
                                        <asp:Button ID="btnAdd" CommandName="InitInsert" Text="Add Transaction" runat="server" />
                                    </div>
                                </CommandItemTemplate>
                                <Columns> 
                                    <telerik:GridBoundColumn DataField="ESCROW_ACCOUNT_DEPOSIT_ID" UniqueName="ESCROW_ACCOUNT_DEPOSIT_ID"
                                        ReadOnly="true" Visible="false">
                                    </telerik:GridBoundColumn>                                                                                               
                                    <telerik:GridDropDownColumn DataField="DEPOSIT_TRANS_TYPE_ID" HeaderText="Type" UniqueName="DEPOSIT_TRANS_TYPE_SDESC" 
                                        ListTextField="DEPOSIT_TRANS_TYPE_SDESC" ListValueField ="DEPOSIT_TRANS_TYPE_ID"
                                        DropDownControlType="DropDownList"  ColumnEditorID="GridDropDownColumnEditor1">
                                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="110px" />
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridDropDownColumn>                                                      
                                    <telerik:GridBoundColumn DataField="EXPECTED_DATE" HeaderText="Expected Date" UniqueName="EXPECTED_DATE"
                                        ReadOnly="true">
                                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="90px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="EXPECTED_AMOUNT" HeaderText="Expected Amount"
                                        UniqueName="EXPECTED_AMOUNT" ReadOnly="true">
                                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="100px" />
                                        <ItemStyle HorizontalAlign="Right"/>
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridBoundColumn>
                                    <telerik:GridDateTimeColumn DataField="ACTUAL_DATE" HeaderText="Actual Date" UniqueName="ACTUAL_DATE"
                                        DataType="System.DateTime" ColumnEditorID="GridDateTimeColumnEditor">
                                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="100px" />                                        
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridNumericColumn DataField="ACTUAL_AMOUNT" HeaderText="Actual Amount" UniqueName="ACTUAL_AMOUNT"
                                         NumericType="Currency" Resizable="False" MaxLength="8" DataType="System.Decimal"  >
                                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="100px"  />
                                        <ItemStyle HorizontalAlign="Center" />   
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" />                                                                                                                                                                                                                                                                
                                    </telerik:GridNumericColumn>                                                                                                  
                                    <telerik:GridBoundColumn DataField="STATUS" HeaderText="Status" UniqueName="STATUS"
                                         ReadOnly="true">
                                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="90px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </telerik:GridBoundColumn>                                                                    
                                    <telerik:GridButtonColumn ButtonType="ImageButton" Text="Delete"
                                         ImageUrl='../Images/deleteX.GIF' CommandName="Delete" UniqueName="Delete">
                                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="15px" />
                                    </telerik:GridButtonColumn>
                                    <telerik:GridBoundColumn DataField="EXPECTED_TRANSACTION_IND" UniqueName="EXPECTED_TRANSACTION_IND" ReadOnly="true"
                                       Visible="false" ForceExtractValue="Always" >
                                    </telerik:GridBoundColumn>                                       
                                </Columns>                                                                                             
                            </MasterTableView>
                            <SelectedItemStyle BackColor="#F8C320" />
                            <ClientSettings EnableRowHoverStyle="true">
                                <Selecting AllowRowSelect="true" />
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
                            </ClientSettings>            
                        </telerik:RadGrid>


Thanks
Princy
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
73 views

Hi, I have a question in regards to selective delete.  I have a grid with delete option defined as below

 

 

 

 

<telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"

 

 

ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"

 

 

UniqueName="DeleteAlignment">

Now, I want to selectivele remove the delete option on some of the rows.  Is there a way to do that?  So I wan say delete option on the first 5 rows only... or something like that

Princy
Top achievements
Rank 2
 answered on 08 Dec 2010
8 answers
184 views
When i use GridClientSelectColumn in a RadGrid and set it to allow scroll, it will get a scroll bar for the outer body.
Detail please see the attach.

Example code to get the issue:

<telerik:RadFormDecorator ID="formdecorator" runat="server" DecoratedControls="All"
        ControlsToSkip="Zone" />
        <telerik:RadGrid ID="rgFr" runat="server" PageSize="50">   
    <MasterTableView DataKeyNames="A">
        <Columns>
            <telerik:GridClientSelectColumn ItemStyle-Width="20" />           
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true" />
        <Scrolling AllowScroll="true" ScrollHeight="300" />
    </ClientSettings>

In the code-behind:

 protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                var ds = new List<object>();
                for (int i = 0; i < 100; i++)
                {
                    ds.Add(new { A = "AA" });
                }
                this.rgFr.DataSource = ds;

                this.rgFr.DataBind();
            }
        }


Amir
Top achievements
Rank 2
 answered on 08 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?