Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
99 views
Hi, All,

I've got a problem with Radgrid which cannot display the text from database that contains link/URL.

The case was,

I tried to insert a text, e.g. http://www.telerik.com/ from RadEditor and then I saved it to database.
After saving, I try to retrieve it and list it with the other records on Radgrid.
and apparently, the inserted URL did not appear on the list.
The column which should be filled with the URL is blank.

Dear masters,
I do need a clue for this.
It occurs on every browser.

Many thanks in advance
Chairul
Top achievements
Rank 1
 answered on 09 Oct 2013
2 answers
180 views
no matter what I did, I cant select first row. What I'm missing ?
I want to first row to be selected on page load.
items.count is always 0. to find out problem I created a new page with only grid and sqldatasource. still could not found d anything.

<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None">
    <ClientSettings>
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">
        <RowIndicatorColumn Visible="False">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Created="True">
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
    
            <telerik:GridBoundColumn DataField="urun" FilterControlAltText="Filter urun column" HeaderText="urun" SortExpression="urun" UniqueName="urun">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>


Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    Dim c As Integer
 
    c = RadGrid1.MasterTableView.Items.Count
 
End Sub
 
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
    If (RadGrid1.MasterTableView.Items.Count > 0) Then
        If (RadGrid1.SelectedItems.Count = 0) Then
            RadGrid1.MasterTableView.Items(0).Selected = True
        End If
    End If
End Sub
aykut
Top achievements
Rank 1
 answered on 09 Oct 2013
1 answer
96 views
I have noticed since I have upgraded to the latest version release of the Telerik ASP controls a strange behaviour with the DataStringFormat.  Previously, all my HTMLChart controls I was just specifying DataStringFormat="{0}" as I was already formatting the returned date from the SQL query in the MM/dd/yyyy format.  Once I upgraded my controls, whenever a date was being displayed on the chart for the axis label, it would instead show the actual characters {0}, not the date anymore.  I tried changing value to DataStringFormat="{0:MM/dd/yyyy}" and that did not work either, it would show like this {0:01/29/2013} on the axis.  Finally, I just took out the curly brackets and zero and used this DataStringFormat="MM/dd/yyyy" which worked.  This seems to only be a problem when using the {0} for the DataStringFormat on dates, but if it is just a number, like 10000 and I use DataStringFormat="{0:N0}" it shows correctly as 10,000.  Same thing with any other type of data aside of a date value.

Any idead why this is happening and why I cannot be consistant with the way the DataStringFormat is normally defined using the curly brackets and 0?

Thanks,
Ron
Stamo Gochev
Telerik team
 answered on 09 Oct 2013
0 answers
78 views
 Hi we use demo version of telerik radschduler 2012.2.607.35 for web controls.
 In radschduler,coloring single timeslots in certain timings it working properly,while display multiple time slot, colored fill in 1st time slot with certain time period will reflect in another time slot.so how can i avoid the coloring of 2nd time slot while display multiple time slot scenario. i attach the screen shot for your referrence??
Bala
Top achievements
Rank 1
 asked on 09 Oct 2013
3 answers
105 views
I would like to edit RadTreeNodes in a RadWindow and after making changes, update RadTreeView according to those changes.
The idea is to have a context menu with serveral options, one of them would be "Edit node". This action would open a RadWindow with information related to the node. The user would make changes and after changes are saved the treeview (just the treenode) would be updated.

I have tried to implement that but i haven't been able to open a radwindow from context menu.
Do you have an example on how to achieve that?
Thank you,
Sonia.
Princy
Top achievements
Rank 2
 answered on 09 Oct 2013
1 answer
209 views
Basically, when I try to set the date through something like this:

RadDatePicker1.SelectedDate = DateTime.ParseExact(dateToConvert, "yyyyMMdd", CultureInfo.InvariantCulture);

the calendar popup button stops working. Any ideas?
Shinu
Top achievements
Rank 2
 answered on 09 Oct 2013
1 answer
67 views
I am using RadGrid 2013.2.717.40.

Here is the markup:
   <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True">
   </telerik:RadGrid>

The grid is bound to a datasource in code.

No matter what action I take - in this case Sort - the grid becomes a single horizontal line after postback.

This has happened in many previous attempts to use this control when trying to add, edit, delete items, etc. 

Any ideas?
Princy
Top achievements
Rank 2
 answered on 09 Oct 2013
1 answer
95 views
Hi hi :)

I have a column in a grid:

<telerik:GridDropDownColumn DataField="CustomerID" DataType="System.String" DataSourceID="SqlDataSource4" FilterControlAltText="Filter CustomerName column" HeaderText="Customer Name" ListTextField="Name" ListValueField="ID" SortExpression="Name" UniqueName="CustomerName">
                            <ColumnValidationSettings>

using this data source:

<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:NameOfString %>" SelectCommand="SELECT [Name], [ID] FROM [Customer] ORDER BY [Name]"></asp:SqlDataSource>

I want to be able to filter the grid by Name, but it filters by ID for some reason. Here's what I mean:

if I filter by name this happens:

http://i.imgur.com/F3lJxnN.png

if I filter by Gretchen's ID, this happens:

http://i.imgur.com/qkz96vj.png


So it is filtering by the wrong field but I think I have the settings correct, yes?
Princy
Top achievements
Rank 2
 answered on 09 Oct 2013
1 answer
176 views

I have a RadMultiPage with several pageviews, each of which is tied to a specific tab in a RadTabStrip. When the page loads I programmatically determine which tabs are accessible, and hide the rest. I then iterate over the pageviews in the associated RadMultiPage to mark them visible if the tab is also visible. Once that's done I check if there are any visible tabs, and if there are I set the selectedindex of both the tabstrip and the multipage to 0.

The tabs are showing/hiding correctly, but the multipage pageviews are not. If the first tab/pageview is not visible the tab is gone, but the pageview still shows. If I set all of the pageviews to visible=false but leave the tabs visible I can click through all the tabs and their pageviews load which is not what I expect.

If a control is set to "Visible=false" I would expect it to be completely removed from the server side and have no possibility to render. Why is this not happening? Here's some of the relevant code:

<telerik:RadTabStrip ID="tabs" runat="server" MultiPageID="pages" AutoPostBack="true" ShowBaseLine="true" Align="Right">
<Tabs>
<telerik:RadTab Text="Tab1" PageViewID="Page1" Value="Tab1" Visible="false" />
<telerik:RadTab Text="Tab2" PageViewID="Page2" Value="Tab2" Visible="false" />
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="pages" runat="server" RenderSelectedPageOnly="true">
<telerik:RadPageView ID="Page1" runat="server">
...

tabs.FindTabByValue("Tab1").Visible = HasPermission("Tab1");
tabs.FindTabByValue("Tab2").Visible = HasPermission("Tab2");
...
foreach (RadTab tab in tabs.Tabs)
{
pages.FindPageViewByID(tab.PageViewID).Visible = tab.Visible;
}
if (tabs.Tabs.Count(x => x.Visible) > 0)
{
tabs.SelectedIndex = 0;
pages.SelectedIndex = 0;
}

 

Chad
Top achievements
Rank 1
 answered on 08 Oct 2013
0 answers
98 views
Hi,

As a Telerik newbie, I'd like to seek some wisdom on RadGrid implementation. I have a single ASP.NET page that is structured with two custom user controls: one for getting user inputs and another for displaying results based on inputs. The custom controls look like the following:

// ctrlInput.ascx.cs
// consists of several controls (dropdown lists, checkboxes and a submit button)
  
public event EventHandler BtnClickEvent;
protected void Btn_Click(object sender, EventArgs e)
{
    BtnClickEvent(this, e);
}

//ctrlRadGrid.ascx.cs
//display result table based on ctrlInput values
  
public event EventHandler MyGridNeedDataSource;
          
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    MyGridNeedDataSource(this, e);
}

When user makes proper selection on ctrlInput and then click on submit button, BtnClickEvent will be raised to the containing aspx page, which looks like this:

// MyPage.aspx.cx
  
protected void Page_Init(object sender, EventArgs e)
{
    ctrlInput1.BtnClickEvent += new EventHandler(Foo_btnClickEvent);
    ctrlRadGrid1.MyGridNeedDataSource += new EventHandler(myGrid_NeedDataSource);
}
          
protected void Page_Load(object sender, EventArgs e)
{
    // toggle panel visibility
    if (!IsPostBack)
    {
        pnlInputs.Visible = true;
        pnlResults.Visible = false;
    }
    else
    {
        pnlInputs.Visible = false;
        pnlResults.Visible = true;              
    }
}
          
protected void myGrid_NeedDataSource(object sender, EventArgs e)
{
    if (ViewState["MyParams"] != null)
      {
         myGrid.DataSource = GetData(ViewState["MyParams"]);
      }
}
          
protected void Foo_btnClickEvent(object sender, EventArgs e)
{
    var ctrl = (ctrlInput)sender;
      ViewState["MyParams"] = ctrl.InputParams;
}
 
private DataTable GetData(string param)
{
    //DONE: call stored procedure with param
}

When myGrid_NeedDataSource fires for the first time, there's nothing to pass to GetData because Foo_btnClickEvent, which contains user's inputs, is always fired "afterwards". Can someone please shed some lights on how to achieve this or even suggest a better design/implementation?

Thanks in advance,


 



Archen
Top achievements
Rank 1
 asked on 08 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?