Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
197 views
Here I am with another question : How to disable the bulit-in context menu? I have this in my toolsfile.xml :

<contextMenus> 
    <contextMenu forElement="IMG" enabled ="false"> 
    </contextMenu> 
    <contextMenu forElement="TABLE"> 
      <tool Name="ToggleTableBorder" /> 
      <tool Name="SetTableProperties" /> 
      <tool Name="DeleteTable" /> 
    </contextMenu> 
    <contextMenu forElement="TD"> 
      <tool Name="InsertRowAbove" /> 
      <tool Name="InsertRowBelow" /> 
      <tool Name="DeleteRow" /> 
      <tool Name="InsertColumnLeft" /> 
      <tool Name="InsertColumnRight" /> 
      <tool Name="MergeColumns" /> 
      <tool Name="MergeRows" /> 
      <tool Name="SplitCell" /> 
      <tool Name="DeleteCell" /> 
      <tool Name="SetCellProperties" /> 
    </contextMenu> 
    <contextMenu forElement="A" enabled="false"> 
    </contextMenu> 
    <contextMenu forElement="BODY"> 
      <tool Name="Cut" /> 
      <tool Name="Copy" /> 
      <tool Name="PasteFromWord" /> 
    </contextMenu> 
  </contextMenus> 

Depending on where I click I still have the old one with all the paste option.
Dobromir
Telerik team
 answered on 27 Jul 2010
2 answers
111 views
Hi,
when i am using the radgrid,
the total data is displaying in each cell.
My intention is to "compress the content of cell to specific no.of characters,
and when i am resizing the column it has to display the total content."
so it will be good for look and feel.
Suggest me in this whether is there any built in function or any thing.
Thanks.


shiva
Top achievements
Rank 1
 answered on 27 Jul 2010
4 answers
185 views
I have a telerik combox which worked properly: when the drop down list is selected dropdown list opens to the left and all items selecteable. I changed the CSS which positions the combox to POSITION:absolute and now the dropdown list opens to the right. See attached image. Even after changing the CSS back to position relative, I still get the same problem. Can anyone help?
Kalina
Telerik team
 answered on 27 Jul 2010
1 answer
100 views

Hi,

I would like to know how to upload image using RadFileUpload which is inside the FormTemplate of EditFormSettings in RadGrid .


I am trying to finding the solution for this for past 4 days. I didn't get any solution

Please help me in this

Quick replay highly appreciated


Prathap
Princy
Top achievements
Rank 2
 answered on 27 Jul 2010
3 answers
171 views
Hello,

I think that a "Print" button would be extremely helpful if it were built into the RadGrid control. I think that many different users would find a print feature beneficial. It would be great if it were added and there were options that could be set to: 

  1. Print RadGrid
  2. Print Selected Rows Only
  3. Print Master RadGrid & any detail tables
  4. Print Master/Detail rows and page break when the DataKeyField value of the Master Table View changed
(example)
MASTER ROW
DETAIL ROW
DETAIL ROW
PAGE BREAK
MASTER ROW
DETAIL ROW
DETAIL ROW

Thanks!
Casey
Daniel
Telerik team
 answered on 27 Jul 2010
1 answer
138 views
Can I use RadGrid with MySql Connector for .NET?
RadGrid auto generate delete and update command but when I perform, it can not change
Rosen
Telerik team
 answered on 27 Jul 2010
1 answer
101 views
Hello I want to show footer on radgrid. i have populated my radgrid's rows from code behind. there is no control i placed on radgrid but from code behind.

<telerik:RadGrid ID="gvDayWiseCashReport" runat="server" AutoGenerateColumns="False"
                GridLines="None" OnItemDataBound="gvDayWiseCashReport_ItemDataBound">
                <MasterTableView>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                </MasterTableView>
            </telerik:RadGrid>
in My code behind on button click...This is how i am populating it
protected void btnSearch_Click(object sender, EventArgs e)
    {
        DaysList daysforList = null;
        Month = int.Parse(ddlMonth.SelectedValue);
        Year = int.Parse(ddlYear.SelectedValue);
  
        GetDates dates = new GetDates();
        FirstDate = dates.GetFirstDayOfMonth(Month, Year);
        LastDate = dates.GetLastDayOfMonth(Month, Year);
  
        days = System.DateTime.DaysInMonth(int.Parse(ddlYear.SelectedItem.Value), int.Parse(ddlMonth.SelectedValue)).ToString();
        int NoofDays = int.Parse(days);
  
        DataSet ds = new DataSet();
        DateTime date;
        CustomSQLCommand command = new CustomSQLCommand(@"select distinct Purpose,Others from tbl_CashRequest req left join tbl_CashPurpose purpose
        on purpose.ID=req.CashPurposeID", false);
        ds = command.ExecuteDataSet();
  
        gvDayWiseCashReport.DataSource = null;
        gvDayWiseCashReport.MasterTableView.Columns.Clear();
        gvDayWiseCashReport.DataBind();
  
        gvDayWiseCashReport.DataSource = ds;
  
        GridBoundColumn boundColumn;
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Purpose";
        gvDayWiseCashReport.MasterTableView.Columns.Add(boundColumn);
  
  
        for (int i = 1; i <= NoofDays; i++)
        {
            date = dates.GetDate(int.Parse(ddlMonth.SelectedValue), int.Parse(ddlYear.SelectedItem.Value), i);
            string strDay = date.DayOfWeek.ToString();
            int Day = 0;
            CustomSQLCommand getDay = new CustomSQLCommand(@"select ID from tbl_PreferedTransferDay where PrefferedDay='" + @strDay + "'", false);
            try { Day = int.Parse(getDay.ExecuteScalar()); }
            catch { }
  
            if (Day != 0 && Day != null)
            {
                daysforList = new DaysList();
                GridBoundColumn boundColumn1;
                boundColumn1 = new GridBoundColumn();
  
                boundColumn1.HeaderText = String.Format("{0:ddd, MMM d, yyyy}", date);
                gvDayWiseCashReport.MasterTableView.Columns.Add(boundColumn1);
                daysforList.Day = date;
                daysforList.DayID = Day;
  
                ListDays.Add(daysforList);
            }
            Day = 0;
        }
  
        gvDayWiseCashReport.DataBind();
          
    }
and in item data bound this is how i am writing data on each cell
protected void gvDayWiseCashReport_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = (GridDataItem)e.Item;
 
            string purpose = "", others = "";
            if (DataBinder.Eval(e.Item.DataItem, "Purpose").ToString() == "Others")
            {
                e.Item.Cells[2].Text = DataBinder.Eval(e.Item.DataItem, "Others").ToString();
                try { purpose = DataBinder.Eval(e.Item.DataItem, "Purpose").ToString(); }
                catch { }
                try { others = DataBinder.Eval(e.Item.DataItem, "Others").ToString(); }
                catch { }
            }
            else
            {
                try { purpose = DataBinder.Eval(e.Item.DataItem, "Purpose").ToString(); }
                catch { }
                others = "";
            }
 
            CustomSQLCommand cmd = new CustomSQLCommand("[SP_CashRequest_getApprovalDayWise]", true);
 
            cmd.AddInputParameter("@Purpose", purpose, SqlDbType.NVarChar, 200);
            cmd.AddInputParameter("@Others", others, SqlDbType.NVarChar, 200);
 
            DataSet ds = cmd.ExecuteDataSet();
 
            for (int j = 0; j < ListDays.Count; j++)
            {
                e.Item.Cells[j + 3].Text = "";
            }
 
            if (ds.Tables[0].Rows.Count > 0)
            {
                int NoofInstallment = 0;
                string InstallmentType = "", PaymentMethod = "";
                int RequestID = 0, ApprovalID = 0; string Remarks = "";
                string RequestedBy = "", ApprovedBy = "";
                float TotalAmount = 0.0F;
 
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    try { NoofInstallment = int.Parse(ds.Tables[0].Rows[i]["NoOfInstallments"].ToString()); }
                    catch { }
                    try { InstallmentType = ds.Tables[0].Rows[i]["ApprovedInstallmentType"].ToString(); }
                    catch { }
                    try { PaymentMethod = ds.Tables[0].Rows[i]["ApprovedPaymentType"].ToString(); }
                    catch { }
                    try { Remarks = ds.Tables[0].Rows[i]["ActionRemarks"].ToString(); }
                    catch { }
                    try { ApprovedBy = ds.Tables[0].Rows[i]["ActionTakenBy"].ToString(); }
                    catch { }
                    try { RequestedBy = ds.Tables[0].Rows[i]["RequesterName"].ToString(); }
                    catch { }
                    try { TotalAmount = int.Parse(ds.Tables[0].Rows[i]["ApprovedAmount"].ToString()); }
                    catch { }
                    try { ApprovalID = int.Parse(ds.Tables[0].Rows[i]["ApprovalID"].ToString()); }
                    catch { }
 
                    cfmsBL.ApprovalID = ApprovalID;
 
                    #region Single Installments
                    if (PaymentMethod == "Single time")
                    {
                        DateTime CashTransferDay = DateTime.MinValue;
                        float Amount = 0.0F;
                        String TransferDayIDs = "";
                        try { TransferDayIDs = ds.Tables[0].Rows[i]["ApprovedTransferDayIDs"].ToString(); }
                        catch { }
                        try { CashTransferDay = DateTime.Parse(ds.Tables[0].Rows[i]["ApprovedCashTransferDay"].ToString()); }
                        catch { }
 
                        DataSet dsTransfer = new DataSet();
 
                        if (TransferDayIDs != "" && TransferDayIDs != null)
                        {
                            DataSet dsTransferDays = DB.CFMS_DB.GetByIDs(TransferDayIDs);
                            if (dsTransferDays.Tables[0].Rows.Count > 0)
                            {
                                TransferDayIDs = "";
                                for (int k = 0; k < dsTransferDays.Tables[0].Rows.Count; k++)
                                {
                                    try { TransferDayIDs = TransferDayIDs + dsTransferDays.Tables[0].Rows[k]["PrefferedDay"].ToString() + ","; }
                                    catch { }
                                }
                                TransferDayIDs = TransferDayIDs.Substring(0, TransferDayIDs.Length - 1);
                            }
                            cfmsBL.DaysName = TransferDayIDs.Split(',');
                        }
 
                         
 
 
                        for (int j = 0; j < ListDays.Count; j++)
                        {
                            cfmsBL.Dates = "";
                            DateTime dateNext = DateTime.MinValue;
                            DateTime dateCurr = DateTime.MinValue;
                            dateCurr = ListDays[j].Day;
                            try { dateNext = ListDays[j + 1].Day; }
                            catch { }
                            if (CashTransferDay == ListDays[j].Day)
                            {
                                if (e.Item.Cells[j + 3].Text == "")
                                {
                                    try { Amount = int.Parse(ds.Tables[0].Rows[i]["ApprovedAmount"].ToString()); }
                                    catch { }
                                }
                                else
                                {
                                    try { Amount = float.Parse(e.Item.Cells[j + 3].Text.ToString()) + float.Parse(ds.Tables[0].Rows[i]["ApprovedAmount"].ToString()); }
                                    catch { }
                                }
                                try { e.Item.Cells[j + 3].Text = Amount.ToString(); }
                                catch { }
}
}
}
Now i want to show the summ of each column on footer. please tell me how to acheive this. I have attached the snap of the grid.
shahid Aleem
Top achievements
Rank 1
 answered on 27 Jul 2010
1 answer
72 views
In IE8, when I load the following HTML into the editor:

<html><head></head><body><table><tr><td width="*"></td></tr></table></body></html>

I get the following javascript error:

"Error while executing filter CleanAttributesFilter - Error: Invalid argument."

I suspect this is related to the width="*" attribute. When I take this out, the editor loads without showing the message.
Rumen
Telerik team
 answered on 27 Jul 2010
6 answers
184 views
Hi,

Does the RadTreeview in 2010.Q2 force AutoIDs now (and not allow us to Statically set IDs any longer as we could in Q1)?

With Q2, when I select a RadTree, then go to properties > ClientIDMode, it won't let me select anything other than AutoID.  (even though the other 4 choices appear (Inherit, AutoID, Predictable, and Static).  And now the Q2 Treeview also ignores my code-behind that was statically setting IDs to dynamically created RadComboBoxes.  (eg.)

...
 ddlItem.ClientIDMode = UI.ClientIDMode.Static
 ddlItem.ID = "ddlItem_" + strOrderDetailID
treenodeItem.Controls.Add(ddlItem)

 









This was working great in Q1, and would create an ID such as "ddlItem_12345",
but as soon as I upgraded to Q2, it was stuck in AutoID mode, and the controls
had "id="ctl00_ContentPlaceHolder1_RadTreeView2_i0_i0_ddlItem_12345" again (as it was before .net 4.0)

Am I missing some new setting?

Thanks,
Mike
Nikolay Tsenkov
Telerik team
 answered on 27 Jul 2010
4 answers
167 views
Consider the following page ...
  <head runat="server">
    <title></title>
  </head>
  <body>
    <form id="form1"
          runat="server">
      <telerik:radscriptmanager runat="server"></telerik:radscriptmanager>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <div>
        <telerik:RadWindow ID="winDetail"
                           runat="server"
                           Behaviors="None"
                           Left="686px"   
                           Height="452px"
                           Top="130px"
                           VisibleOnPageLoad="true"
                           VisibleStatusbar="false"
                           VisibleTitlebar="false"
                           Width="300px"
                           style="margin-bottom: 49px">
          <ContentTemplate>
            <telerik:RadComboBox ID="RadComboBox1"
                                 runat="server">
              <Items>
                <telerik:RadComboBoxItem Value="1"
                                         Text="Monday"/>
                <telerik:RadComboBoxItem Value="2"
                                         Text="Tuesday"/>
                <telerik:RadComboBoxItem Value="4"
                                         Text="Wednesday"/>
                <telerik:RadComboBoxItem Value="8"
                                         Text="Thurday"/>
                <telerik:RadComboBoxItem Value="16"
                                         Text="Friday"/>
                <telerik:RadComboBoxItem Value="32"
                                         Text="Saturday"/>
                <telerik:RadComboBoxItem Value="64"
                                         Text="Sunday"/>
              </Items>
            </telerik:RadComboBox>
            <telerik:RadEditor ID="RadEditor1"
                               runat="server"
                               EnableResize="false"
                               ContentAreaMode="Div"
                               EditModes="Design"
                               Height="100px"
                               NewLineBr="false"
                               ToolbarMode="ShowOnFocus"
                               ToolsFile="~/App_Data/Editor/ToolsFileLimited.xml"
                               Width="256px">
            </telerik:RadEditor>
            <telerik:RadDatePicker Runat="server"></telerik:RadDatePicker>
          </ContentTemplate>
        </telerik:RadWindow>
 
      </div>
    </form>
  </body>
</html>

Run the page. Click on the combobox and the dropdown appears. Click on the datepicker button and the calendar appears.

Now, click on the editor and the toolbar appears, but subsequent clicks on the other 2 controls will, seemingly, fail to display the popups.

In fact, they do display but behind the window.

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 27 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?