Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
131 views
Hello everyone,

I have 2 rad grid in in my page. First grid is shows demo data and second one shows actual data.

So ti differentiate first grid I want to put watermark which says like "This is sample data".

So how can i achieve this functionality?

I have tried using background css image but not succeed as when I using some other theme which have Row Background....

So can anyone guide me how can I do this?

Regards,

Dharmesh
Radoslav
Telerik team
 answered on 18 Apr 2011
3 answers
1.3K+ views
lo que tengo es lo siguiente, pero lo que deseo es agregar una tabla mas pero no tiene un campo de relación con una de ellas

protected void Page_Load(object sender, EventArgs e)
        {
        
        }




        protected void BuscarTablaTema(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            if (!e.IsFromDetailTable)
            {
                RadGrid1.DataSource = ObtenerDatosTabla("SELECT * FROM Tema");
                RadGrid1.MasterTableView.DataKeyNames = new string[] { "IdConocimiento" };
            }
        }


        protected void BuscarTablaConocimiento(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
        {
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
            string IdConocimiento = dataItem.GetDataKeyValue("IdConocimiento").ToString();
            e.DetailTableView.DataSource = ObtenerDatosTabla("SELECT * FROM Conocimiento WHERE IdConocimiento = '" + IdConocimiento + "'");
        }


        public DataTable ObtenerDatosTabla(string ConsultarTabla)
        {
            String ConnString = ConfigurationManager.ConnectionStrings["IgrupoLogosConnectionString"].ConnectionString;
            SqlConnection conexionTabla = new SqlConnection(ConnString);
            SqlDataAdapter adaptador = new SqlDataAdapter();
            adaptador.SelectCommand = new SqlCommand(ConsultarTabla, conexionTabla);


            DataTable DatosTabla = new DataTable();


            conexionTabla.Open();
            try
            {
                adaptador.Fill(DatosTabla);
            }
            finally
            {
                conexionTabla.Close();
            }


            return DatosTabla;
        }
    }
}
Radoslav
Telerik team
 answered on 18 Apr 2011
3 answers
257 views
Hello all,i have a problems with Radgrid,plz help me
i want when i click client select column on my grid then informations on a row binding to textbox
example : 
http://nguy-hiem.co.cc/img.png
So what should i do ? what the event i can use ?

THANK !
Shinu
Top achievements
Rank 2
 answered on 18 Apr 2011
1 answer
63 views
I am looking to have a RadWindow open any URL I throw at it, but I am getting the following error:

BC30456: 'OpenRadWindow' is not a member of {page name}

It seems like it should be pretty simple, I must be missing something here...

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
   <script type="text/javascript">
 
    function OpenRadWindow(url) {
        radopen(url, "DisplayWindow");
    }
 
    </script
    </telerik:RadCodeBlock>
<p>
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableViewState = "false">
        <Windows>
            <telerik:RadWindow Skin="Sunset"  ID="DisplayWindow" runat="server" Title="RadWindow" AutoSize="true" Left="10px" Top="10px" ReloadOnShow="true" Modal="true"  ShowContentDuringLoad="false" KeepInScreenBounds="True" />
        </Windows>
    </telerik:RadWindowManager>
 
    </p>
<p><asp:LinkButton ID="LinkButton1" runat="server" OnClick="OpenRadWindow('http://maps.google.com/maps?map_url'); return false;">Map It!</asp:LinkButton> </p>
Georgi Tunev
Telerik team
 answered on 18 Apr 2011
1 answer
109 views
Hi:
I need create a textbox into a gridcolumn, but it's dinamic in with c# code.
Thanks
David.
Princy
Top achievements
Rank 2
 answered on 18 Apr 2011
1 answer
102 views
I am rewriting a report written using classic ASP. It is laid out using multiple rows for each record.

There is a data field with text commentary in it—too wordy to fit in a single column. (See the attachment)

I'd like to have it on a separate row below the grid row containing the additional data.

Is it possible to do this?

Thanks!
Princy
Top achievements
Rank 2
 answered on 18 Apr 2011
2 answers
129 views
I have 2 combo box's on my page using Load on Demand from Webservices which are working great, but I'm trying to enable "MarkFirstMatch", but if I do that the item isn't being selected, but just the text value is being set.
(if they key down to the value, or select with the mouse it works fine, just not when using mark first).

Result
Selectedindex = -1
SelecteItem = Nothing
Selected Value = ""
text = marked FirstMatch.

While I think i could do a work around and do a reverse lookup if value = "' and text = something, I would like to get it working so I can just reference the selectedvalue.

Thanks in advance for any help you can give.

Combo:

<telerik:RadComboBox ID="rcbInitiated" runat="server" DataTextField="userName" MarkFirstMatch="true"
          DataValueField="eID" EnableLoadOnDemand="true" EnableAutomaticLoadOnDemand="true"
         ShowMoreResultsBox="false" EnableVirtualScrolling="false" OnClientDropDownClosed="OnClientDropDownClosed" EnableItemCaching="true">
        <CollapseAnimation Duration="200" Type="OutQuint" />
        <WebServiceSettings Path="~/ws/wsCFR.asmx" Method="GetEIDUserName" />
</telerik:RadComboBox>

WebService:
<WebMethod()> _
Public Function GetUserIDUserName(ByVal context As RadComboBoxContext) As RadComboBoxData
    Return GetItems(context, "userID")
End Function
Public Function GetItems(ByVal context As RadComboBoxContext, ByVal valueField As String) As RadComboBoxData
    Dim data As DataTable = GetData(context.Text)
    Dim comboData As New RadComboBoxData()
    Dim itemOffset As Integer = context.NumberOfItems
    Dim endOffset As Integer = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count)
    comboData.EndOfItems = endOffset = data.Rows.Count
    Dim result As New List(Of RadComboBoxItemData)(endOffset - itemOffset)
    For i As Integer = itemOffset To endOffset - 1
        Dim itemData As New RadComboBoxItemData()
        itemData.Text = data.Rows(i)("userName").ToString()
        itemData.Value = data.Rows(i)(valueField).ToString()
        result.Add(itemData)
    Next
    comboData.Message = GetStatusMessage(endOffset, data.Rows.Count)
    comboData.Items = result.ToArray()
    Return comboData
End Function
Byzza
Top achievements
Rank 2
 answered on 18 Apr 2011
3 answers
429 views
I have created Grid dynamically (Simply Grid is defined in .aspx file, columns are bind from code behind., no hard coded column Name) I have Combo Box outside the grid, gird loads with different column as item changes in Combo Box. 

protected

void grdSystemComponents_ItemCreated(object sender, GridItemEventArgs e){
if

(e.Item is GridDataItem && e.Item.IsInEditMode || e.Item is GridFilteringItem)
{
foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
{
if ((column is GridBoundColumn) && !((GridBoundColumn)column).ReadOnly)
{
TextBox textBox = null;
if (e.Item is GridDataItem)
{
textBox = ((
TextBox)((GridDataItem)e.Item)[column.UniqueName].Controls[0]);
textBox.Style[
"width"] = "90%";
textBox.Style[
"height"] = "11px";
textBox.Style[
"border"] = "0px";
textBox.Style[
"font-size"] = "11px";
} }

//Each column is assigned UniqueName as ID of respective Column
string
headerID = column.HeaderText;
int count = dtHeaderInfo.Rows.Count;
for (int i = 0; i < count; i++)
{
if (headerID == dtHeaderInfo.Rows[i][0].ToString())
column.UniqueName = dtHeaderInfo.Rows[i][0].ToString();
} } } }

Here are my two Issues:

1) Since Grid is set up this way, I have no idea how to calculate Footer Total for each columns. Number of column changes depending on the selected Item on Combo Box.

2) I also need to update Caluculation as user will enter number on textboxes of the Grid. In the grid, there is a column called "Tot Num", as user enter numbers here I need to update other columns on same row, user can change it but can't exceed value of "Tot Num" column. If "Tot Number" is zero, should not allow to enter number.

I need to have database interaction for calculation? How do I go go to accomplish this? Your help is much appreciated.

thansk
Madhu

chitralekha
Top achievements
Rank 1
 answered on 16 Apr 2011
2 answers
293 views
Hi,

It's the end of a long dev cycle and my brains gone to mush, so I'm sure I am missing something really simple but don't seem to be able to find a solution.

I have some external js for advertising banners like this...
<script type="text/javascript">
var uri = 'http://sampleurl/imp?type(img)g(111)a(222)' + new String(Math.random()).substring(2, 11);
document.write('<a id="a_manuallyadded" href="http://sampleurl/click?p=111&a=222&g=333"
target="_BLANK"><img id="i_manuallyadded" src="'
+ uri + '" border=0></a>');
                    
</script>
...which are located within a RadAjaxPanel.    After an async call the banners disappear, if I wrap them in a RadScriptBlock then after the call the rest of the page disappears and I'm left with the banner.

Unfortunatley due to the layout I can't really not include the banners in the ajax panel.  

Thanks
Rich



ps. Congrats on the new website, so much easier to work with and I think it looks better too.
Richard
Top achievements
Rank 1
 answered on 16 Apr 2011
2 answers
109 views
Hi

Please consider this simple page , Why RadToolTipManager doesn't change the ToolTip

    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
                <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Skin="Hay" Animation="FlyIn">
        </telerik:RadToolTipManager>
        <asp:CheckBox ID="CheckBox1" runat="server" ToolTip="test tooltip" />
    </div>
    </form>

Thanks
reza
Top achievements
Rank 1
 answered on 16 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?