Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
35 views
I am looking forward to the new features I saw here.
Marin Bratanov
Telerik team
 answered on 28 Sep 2012
1 answer
38 views
Hi,

My codes is here.
protected void Button1_Click(object sender, EventArgs e)
       {
 
 DataTable dt = new DataTable();
           OleDbDataAdapter da=new OleDbDataAdapter("Select NAME, PHONE FROM TBL_CITY WHERE POP='"+TextBox1.Text+"' and ROWNUM<150",conn);
           da.Fill(dt);
           RadGrid1.DataSource = dt;
           RadGrid1.DataBind();
       }

<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True">
    </telerik:RadGrid>


When I click the button1 its ok. Radgrid is working.

But when I click the Next page or any page number, I can't see radgrid. 


For example:

I click the button1. Radgrid is ok.

When I click the 5. page number. I cant see radgrid.

After when ı click the button1. I am seeing 5. page radgrid :) 



How can I do? 

Sorry for my english.
Andrey
Telerik team
 answered on 28 Sep 2012
4 answers
117 views
In a pivot table format grid, how does one go about either inserting or updating a row. Need to loop through each column in a row. Since most column UniqueNames contain an item's value. How do you first loop through columns and then identify each where there is no distinct unique name. And also because each record spans multiple dates which requires a multi-record update.

The pivot table I have created, lists date columns and statistics rows.

                     | 09/02/2012 | 09/03/2012 | 09/05/2012 | 09/09/2012
Stat1            |         1         |          0         |         5         |         3       
Stat2            |         8         |          0         |         1         |         0       
Stat3            |         0         |          6         |         2         |         7       

Thank you,

SteveO
JSON
Top achievements
Rank 1
 answered on 28 Sep 2012
1 answer
96 views
Hi ,
my radgirid sample markup
<telerik:RadGrid ID="RadCagri" runat="server"
             CellSpacing="0" Culture="tr-TR" Height="380px" GridLines="None"
    AllowPaging="True" AutoGenerateColumns="False" CssClass="Grid_Modul"
    AllowFilteringByColumn="True" AllowSorting="True" Skin="Simple">           
                  
            <MasterTableView DataKeyNames="GERCEKADI" HierarchyLoadMode="Client" >
            <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            </EditFormSettings>
 
            <PagerStyle Mode="NextPrevAndNumeric" />
           <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
               <Columns>
 
                     <telerik:GridBoundColumn DataField="GERCEKADI" HeaderText="Çağrı Merkezi Uzm."
                       FilterControlAltText="Filter GERCEKADI column" UniqueName="GERCEKADI"
                       FilterControlWidth="250px"><ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                  <telerik:GridBoundColumn DataField="TXTUNVAN" HeaderText="Müşteri Adı"
                       FilterControlAltText="Filter TXTUNVAN column" UniqueName="AG" DataType="System.String" FilterControlWidth="400px">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                  <telerik:GridBoundColumn DataField="TXTPROJEADI" HeaderText="Proje"
                       FilterControlAltText="Filter TXTPROJEADI column" DataType="System.String"
                       UniqueName="TXTPROJEADI">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="LNGMERKEZKOD" HeaderText="merkez Kod"
                       FilterControlAltText="Filter LNGMERKEZKOD column" DataType="System.Int32"
                       UniqueName="LNGMERKEZKOD" Display="false">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
 
                      <telerik:GridDateTimeColumn DataField="TRHTARIH"
                       DataFormatString="{0:dd/MM/yyyy}" DataType="System.DateTime"
                       FilterControlAltText="Filter TRHTARIH column" FilterControlWidth="150px"
                       HeaderText="Arama Tarihi" UniqueName="TRHTARIH">
                       <ItemStyle Wrap="False" /></telerik:GridDateTimeColumn>
                 
                   <telerik:GridDateTimeColumn DataField="TXTSAAT"
                       DataFormatString="{0:HH:mm:ss}" DataType="System.DateTime" FilterControlWidth="100px"
                       FilterControlAltText="Filter TXTSAAT column" HeaderText="Arama Saati"
                       MinDate="" UniqueName="TXTSAAT">
                   </telerik:GridDateTimeColumn>
 
                    <telerik:GridBoundColumn DataField="TXTDEPARTMAN" HeaderText="Çağrı Kuyruğu"
                       FilterControlAltText="Filter TXTDEPARTMAN column" DataType="System.String"
                       UniqueName="TXTDEPARTMAN">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                </Columns>
              </MasterTableView>
             <ClientSettings>
                <DataBinding Location="GridMasterDetailsService.svc" FilterParameterType="Linq" SelectMethod="GetCLG"
                 SortParameterType="Linq" ShowEmptyRowsOnLoad="True">               
                </DataBinding>
                <ClientEvents OnDataBound="RadCagri_DataBound" OnDataBinding="RadCagri_DataBinding" OnGridCreated="RadCagriCriteria" />
                <Selecting AllowRowSelect="True"></Selecting>
                <Scrolling AllowScroll="True"></Scrolling>
            </ClientSettings>
             
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
             
 
 
 
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu></telerik:RadGrid>
and my button click 
RadCagri.ExportSettings.ExportOnlyData = True
       RadCagri.ExportSettings.IgnorePaging = True
       RadCagri.ExportSettings.OpenInNewWindow = True
       RadCagri.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind
       RadCagri.MasterTableView.ExportToExcel()
but export excell empty whyy my page usercontrol

Help mee Thanks
Kostadin
Telerik team
 answered on 28 Sep 2012
1 answer
86 views
I have a two buttons on different pages which perform the same action. In one case, the button is ajaxified and in the other it is not. In the code which handles both button clicks, I need to call some client-side script. If the button is ajaxified, I simply add the script using  ajaxamanager.ResponseScripts.Add. In the nonajaxified scenario, I simply use RegisterScriptManagerScript.

My question is:

is there a way within code to tell if an ajax update is occurring. Like I said, I would like to have one function which handles the button cick in both scenarios. Within this function, I need a way to branch off and call the ajaxmanager code if an ajasupdate is occuring, and the other if it is not.
Maria Ilieva
Telerik team
 answered on 28 Sep 2012
4 answers
134 views
Hello there,

I'm currently evaluation this calendar and am not sure if it really does what I need (though I'm quite positive).

I want, in MVC, to provide some data, that changes how the days of a month are display (and if possible even restrict from select specific dates).
How would I go to implement that? In general ASP.Net I would, perhaps, subscribe to the event, but this isn't possible in MVC.

Basically, that Data I am going to provide is a little bool[]. True meaning the day should paint with a greenish background and be selectable, while false gets a reddish background and shouldn't be selectable.
At the same time, when selecting a date, I want to let the website display something that is associated with that date... Say, for making an appointment with a physician.. it then displays a list of possible appointment, or something like this.

How would I go about to implement this in MVC? (Sorry, if it might seem to be a stupid question, I'm more of a conventional C# programmer than Web-Programmer)

Thank you very much in advance,

Greetings

Alex Endris
Yuriy
Top achievements
Rank 1
 answered on 28 Sep 2012
1 answer
134 views
I am trying to implement a ComboBox inside a ToolTip which consists of a user control.  When I click in the combox, I get the following error:

The target 'ctl100$ctl100$PageContent$PageContent$ctl11$drpdwnEmail1' for the callback could not be found or did not implement ICallbackEventHandler

I am thinking it is because the user control that contains the above ComboBox is added dynamically, and when the OnItemsRequested handler is fired on the combobox, it no longer exists.  The solutions I have found on this site say to make sure to add the control each time OnPageLoad.  However, this isn't realistic because parameters are passed to the control depending on which row of a Repeater we are in....

MyPage.aspx: 
<telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose" ShowEvent="OnClick" Skin="Office2010Silver" Width="500" Height="175" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" Position="MiddleLeft" />
  
<asp:Repeater ID="rptrMyRepeater" runat="server" OnItemDataBound="myRepeater_OnItemDataBound">
   <ItemTemplate>
      <div>
         <asp:LinkButton runat="server" ID="btnEmailAttachment" Text="Open Popup" OnClientClick="return false;" />
      </div>
   </ItemTemplate>
</asp:Repeater>


MyPage.aspx.cs

protected void myRepeater_OnItemDataBound(object o, RepeaterItemEventArgs e)
{
   if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
   {
      RadToolTipManager1.TargetControls.Add(((LinkButton)e.Item.FindControl("btnEmailAttachment")).ClientID, Convert.ToString(DataBinder.Eval(e.Item.DataItem, "RequestID")), true);
   }
}
  
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
    int requestID = Convert.ToInt32(args.Value);
  
    Control ctrl = Page.LoadControl("EmailBox.ascx");
    args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);
    CollateralCentral_EmailBox emailBox = (CollateralCentral_EmailBox)ctrl;
    emailBox.RequestID = requestID;
}


EmailBox.ascx

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <telerik:RadComboBox 
                       ID="drpdwnEmail1" 
                       runat="server" 
                       Width="350px" 
                       Height="140px" 
                       EnableLoadOnDemand="True" 
                       OnItemsRequested="RadComboBox1_ItemsRequested" />
</telerik:RadAjaxPanel>

 

 EmailBox.ascx.cs

protected void RadComboBox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
    drpdwnEmail1.Items.Clear();
    if (e.Text.Trim().Length > 2) // make them type at least 3 letters
    {
            DataTable dt = GetDataTable();
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                drpdwnEmail1.Items.Add(new RadComboBoxItem((string)dt.Rows[i]["Email_addr"], Convert.ToString(dt.Rows[i]["Email_addr"])));
            }
            dt.Dispose();
     }
}

I am not sure in this example how to get past this error - I need to load the control in the manner I am loading it and can't do it each time a postback happens, and I need to populate the email dropdown server-side because there are about 100,000 email addresses so I want them to start typing before they see anything...

Any help would be greatly appreciated!!!

Marin Bratanov
Telerik team
 answered on 28 Sep 2012
3 answers
107 views
I am confused over the use of "default" skin terminology

In the Configure Project dialog I select a skin that is supposedly the "default".

Let's use Metro, since it is very distinctive.

If I go to RadMenu tasks I can also select a "default" skin which is different from Metro. (basically shades of gray)


If I edit the HTML and change "skin="default" to "skin="" then I get something else entirely.

Removing "skin=" completely gives the the default project skin of Metro, as intended.

However, when I go back to RadMenu tasks, the skin remains listed as "default".

It seems to me that the term is overloaded.

I am also finding differences with Metro Touch, where I don't get the project default, and need to specify the skin explicitly for certain controls. Since that skin was just released, I think it will take a while for consistent integration. But those issues brought the confusion (in my mind) to the forefront.

Can anyone explain what is going on?




Tsvetina
Telerik team
 answered on 28 Sep 2012
8 answers
562 views
Hi.
I have a doubt, i need to export from a radgrid to an excel file, i'm using 

RadGrid4.ExportSettings.ExportOnlyData =

False

RadGrid4.ExportSettings.IgnorePaging =

True

RadGrid4.ExportSettings.OpenInNewWindow =

True

RadGrid4.MasterTableView.ExportToExcel()

and it works just fine, but i would like to know if there is a way to export columns that are hidden, because i'm only showing 4 columns and there are like 50 columns on the table and i need to export all of them but i'm just getting the ones that are not hidden, is there a way get them all?

thanks in advanced.

Sumit
Top achievements
Rank 1
 answered on 28 Sep 2012
5 answers
270 views
Hi
I'm currently finding my way on radgrid client side scripting
i want to open the insert row (when client click on "add new record") without postback - is there a way to do it?

or even better - how can i work with radgrid entirly from the client side
I mean that my ultimate goal is to get the records from my data source when the page is initialized
but then work "offline" when inserting/updaing/deleting records will be made only in the grid itself
(and later when the client submit the page - i will extract the changes and do stuff on the server side...)

thank you
Yotam

Eyup
Telerik team
 answered on 28 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?