Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
146 views
I'm using a radgrid which looks up against a datatable.

I need to be able to configure/set what the default values are, which are assigned to the new row When the "Add a New Record" button is pressed.

Is this possible?  Currently it returns nulls.
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Sep 2011
1 answer
99 views
Hi guys, i have 4 textboxes and a search button. When the search button is pressed a radgrid is binded depending on the value of the textboxes, the radgrid has enable paging=true,  after hitting the search button the textboxes are cleared the when I try to change page,the grid is not binded because there's no value in the textboxes, My question is if is it posible that after clear the textboxes and change the page of the radgrid keep the last value of the textboxes?

Here's my code to bind the grid
private void BuscaSolicitanteGrid()
     {
         try
         {
             if (rdTxtExp.Value != null)
             {
                 var bdInstContext = new BD_INSTEntities();
                 var empleados = from emp in bdInstContext.Empleados
                                 where emp.exp_emp == rdTxtExp.Value && emp.ind_edo_emp=="A"
                                 select emp;
                   
                 rgSolic.DataSource = empleados;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                
                 rdTxtExp.Value = null;
          
             }
             if (rdTxtNom.Text != "")
             {
                 var bdInstContextApat = new BD_INSTEntities();
                 var empleadoNombre = from emp in bdInstContextApat.Empleados
                                      where emp.nombre_emp == rdTxtNom.Text && emp.ind_edo_emp == "A"
                                      select emp;
                   
                 rgSolic.DataSource = empleadoNombre;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                 rdTxtExp.Value = null;
             
             }
             if (rdTxtApat.Text != "")
             {
                 var bdInstContextApat = new BD_INSTEntities();
                   
                 var empleadoApat = from emp in bdInstContextApat.Empleados
                                    where emp.paterno_emp == rdTxtApat.Text && emp.ind_edo_emp == "A"
                                    select emp;
                 rgSolic.DataSource = empleadoApat;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                 rdTxtExp.Value = null;
           
             }
             if (rdTxtAmat.Text != "")
             {
                 var bdInstContextAmat = new BD_INSTEntities();
                 var empleadosAmat = from emp in bdInstContextAmat.Empleados
                                     where emp.materno_emp == rdTxtAmat.Text && emp.ind_edo_emp == "A"
                                     select emp;
                 rgSolic.DataSource = empleadosAmat;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                 rdTxtExp.Value = null;
          
             }
             if (rdTxtNom.Text != "" && rdTxtApat.Text!="")
             {
                 var bdInstContextNom = new BD_INSTEntities();
                 var empleadoNom = from emp in bdInstContextNom.Empleados
                                   where emp.nombre_emp == rdTxtNom.Text && emp.paterno_emp == rdTxtApat.Text && emp.ind_edo_emp == "A"
                                 select emp;
                 rgSolic.DataSource = empleadoNom;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                 rdTxtExp.Value = null;
           
             }
             if (rdTxtNom.Text != "" && rdTxtAmat.Text != "")
             {
                 var bdInstContextNom = new BD_INSTEntities();
                 var empleadoNom = from emp in bdInstContextNom.Empleados
                                   where emp.nombre_emp == rdTxtNom.Text && emp.materno_emp == rdTxtAmat.Text && emp.ind_edo_emp == "A"
                                   select emp;
                 rgSolic.DataSource = empleadoNom;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                 rdTxtExp.Value = null;
              
             }
             if (rdTxtApat.Text!="" && rdTxtAmat.Text!="")
             {
                 var bdInstContextNom = new BD_INSTEntities();
                 var empleadoApellidos = from emp in bdInstContextNom.Empleados
                                         where emp.paterno_emp == rdTxtApat.Text && emp.materno_emp == rdTxtAmat.Text && emp.ind_edo_emp == "A"
                                   select emp;
                 rgSolic.DataSource = empleadoApellidos;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                 rdTxtExp.Value = null;
             
             }
             if (rdTxtNom.Text != "" && rdTxtApat.Text != "" && rdTxtAmat.Text != "")
             {
                 var bdInstContextNom = new BD_INSTEntities();
                 var empleadoApellidos = from emp in bdInstContextNom.Empleados
                                         where
                                             emp.nombre_emp == rdTxtNom.Text && emp.paterno_emp == rdTxtApat.Text &&
                                             emp.materno_emp == rdTxtAmat.Text && emp.ind_edo_emp == "A"
                                         select emp;
                 rgSolic.DataSource = empleadoApellidos;
                 rgSolic.Rebind();
                 rgSolic.Visible = true;
                 rdTxtNom.Text = "";
                 rdTxtApat.Text = "";
                 rdTxtAmat.Text = "";
                 rdTxtExp.Value = null;
                
             }
            
         }
         catch (Exception ex)
         {
             Alerta(ex.Message);
         }
          
         
     }
In page index change method I call again this method

Hope you could help me
 
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Sep 2011
2 answers
376 views
Hi all.

i have been trying to get Cell values from Radgrid. The columns can be items templates (textbox, combo, etc ) and can be simply data binding columns. I tried:

      foreach (Telerik.Web.UI.GridDataItem dataItem in grdShippedOrders.MasterTableView.Items)
        {
                     int OrderID = Convert.ToInt32(dataItem.GetDataKeyValue("OrderID"));
       }

----------------------------------------

   GridFooterItem footer = (GridFooterItem)grdShippedOrders.MasterTableView.GetItems(GridItemType.Footer)[0];
        int order = Convert.ToInt32(footer["OrderId"].ToString());

-----------------------------------------

CompanyName = (grdShippedOrders.MasterTableView.FindItemByKeyValue("orderId") as GridDataItem)["orderId"].Text;

I know how to get the value froma  control (textbox, checked) but i can't get the value of a column with data binding source. I need to get each value from each column and row. I tried with for(...){   .......... }  too.

Please help me.



kharen
Top achievements
Rank 1
 answered on 02 Sep 2011
1 answer
58 views
I like to download this trail version. when I logged into my account - it took me to page for automation installation, manual installation.
We already have telerik load in our system, should we need to update with new version to get this ?

Please advice.
Thank you
Mohan Ambaty
Sebastian
Telerik team
 answered on 02 Sep 2011
5 answers
232 views

Hi,

        Is there any possibility to customize CommandItemTable and add one more button in addition to AddNewRecord and Refresh button.

 

I would like to add one Export button in the CommandItem row or in between Add and Refresh button. So please le me know the availability of this option.

 

-Thanks

 

OverCoded
Top achievements
Rank 2
 answered on 02 Sep 2011
2 answers
76 views
I'm not able to find the Add Record bar for any RadGrids that I create. I can Edit and Delete but don't see the usual bar (bar that I see in the Telerik RadGrid demos). Is there a check box that I'm missing? The code for my currrent Grid is below.

<form id="form1" runat="server">
    <p>
        <br />
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    </p>
    <div>
    
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" 
            AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" 
            DataSourceID="dsRadGrid" GridLines="None" AllowAutomaticInserts="True" 
            ShowFooter="True" Skin="Office2007">
<MasterTableView autogeneratecolumns="False" datakeynames="photoID" 
                datasourceid="dsRadGrid">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>


<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>


<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>


    <Columns>
        <telerik:GridBoundColumn DataField="photoID" DataType="System.Int16" 
            FilterControlAltText="Filter photoID column" HeaderText="ID" ReadOnly="True" 
            SortExpression="photoID" UniqueName="photoID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="photoFilename" 
            FilterControlAltText="Filter photoFilename column" HeaderText="Filename" 
            SortExpression="photoFilename" UniqueName="photoFilename">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="photoTags" 
            FilterControlAltText="Filter photoTags column" HeaderText="Tags" 
            SortExpression="photoTags" UniqueName="photoTags">
        </telerik:GridBoundColumn>
        <telerik:GridImageColumn DataImageUrlFields="photoFilename" DataImageUrlFormatString="http://fshn.ifas.ufl.edu/photos/images/thumbnails/{0}"
            FilterControlAltText="Filter column column" HeaderText="Photo" ImageHeight="" 
            ImageWidth="" 
            UniqueName="column">
        </telerik:GridImageColumn>
    </Columns>


<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>


<FilterMenu EnableImageSprites="False"></FilterMenu>


<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="dsRadGrid" runat="server" 
            ConnectionString="<%$ ConnectionStrings:FSHN_ImagesConnectionString %>" 
            DeleteCommand="DELETE FROM [department_photos] WHERE [photoID] = @photoID" 
            InsertCommand="INSERT INTO [department_photos] ([photoFilename], [photoTags]) VALUES (@photoFilename, @photoTags)" 
            SelectCommand="SELECT * FROM [department_photos] ORDER BY [photoID]" 
            UpdateCommand="UPDATE [department_photos] SET [photoFilename] = @photoFilename, [photoTags] = @photoTags WHERE [photoID] = @photoID">
            <DeleteParameters>
                <asp:Parameter Name="photoID" Type="Int16" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="photoFilename" Type="String" />
                <asp:Parameter Name="photoTags" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="photoFilename" Type="String" />
                <asp:Parameter Name="photoTags" Type="String" />
                <asp:Parameter Name="photoID" Type="Int16" />
            </UpdateParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>

thanks for any help.
Marion
Top achievements
Rank 1
 answered on 02 Sep 2011
5 answers
298 views
I found the information about accessing control inside the RadListView in this link:
http://www.telerik.com/help/aspnet-ajax/listview-accessing-controls.html

However, there is no example of using javascript, only server-side code.

Please let me know how to access control inside RadListView.

Thanks All

Lamk.
LamKhoa
Top achievements
Rank 1
 answered on 02 Sep 2011
1 answer
64 views
Hello,

Is there any news on when the Editor nl-NL localization and spellchecker files will be available for the new DNN6/6.1 release?

Regards,
Jochem Rebergen
Rumen
Telerik team
 answered on 02 Sep 2011
2 answers
175 views
Hi, 

         I have an editor(telerik:RadEditor) inside a List(telerik:RadListView), when the user clicks edit it will display the editor. I want to disable some buttons the user should not see, I tried using this code:
<script>
 function OnClientLoad(editor) {
             var oTool = editor.getToolByName("SpellCheck");
              var icon = oTool.GetIcon();
                icon.style.display = "none";
 
</script>
<telerik:RadEditor OnClientLoad="OnClientLoad" ....

But when I click edit I get this error: Object doesn't support property or method 'getToolByName' 
Felipe
Top achievements
Rank 1
 answered on 02 Sep 2011
3 answers
230 views
Hi,

I'm using RadEditor for MOSS 2007. After uploading an image through the Image Manager dialog box, I'm resizing it using the embedded Image Editor.

After resizing (I've decreased the image size) and saving the image, I can see that the target image (which Image Editor appends a _thumb in the name, by default) is much bigger than the original one.

In my case, I've uploaded and resized a 103Kb .jpg image. After resized the image size is 3.32MB and it's format is .bmp (bitmap instead of jpeg).

Is there a way to configure the Image Editor so I can set the compression method of the target image (like png, jpeg, etc)?

It does not make sense to have bitmap thumbnails because of the huge size of this type of format.

Thanks in advance.

Rodrigo.
Rumen
Telerik team
 answered on 02 Sep 2011
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?