Fix Widht & Height for Rows & Columns

Last post 07-05-2009, 1:14 AM by Amjad Sahi. 3 replies.
Sort Posts: Previous Next
  •  07-03-2009, 2:39 AM 186716

    Fix Widht & Height for Rows & Columns

    Hi,

    I want to fix the height and width for rows and columns of web grid, so that user cannot modify the sizes.
    How can we fix the height and width for rows & columns?

    Regards

    Prithiraj Sengupta
    Filed under: Fix Width Height
     
  •  07-03-2009, 4:40 AM 186739 in reply to 186716

    Re: Fix Widht & Height for Rows & Columns

    Hi,

    Well, I think you can hide the row/column headers if it suits your need, see the following sample code:

    GridWeb1.HeaderBarWidth = new Unit("0pt");

    GridWeb1.HeaderBarHeight = new Unit("0pt");

     

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  07-03-2009, 5:06 PM 186853 in reply to 186739

    Re: Fix Widht & Height for Rows & Columns

    Hi,

    1. I have tried using this but I can still expand and contract the width and height for rows and columns. Any other Idea?

    2. One more thing. The subject is out side the grid. I hope you will answer me. I am using the Aspose.Grid. So all the applications where I am using Aspose.Grid should be created with the location as http. There are other locations (Ftp and FileSystem) too.

    Now I need to open an word document. I have provided all the rights inside "dcomcnfg.exe" for Microsoft word. The instance is created successfully. But its not executing any line of code after Open. Its stick there only.  And its keep me waiting. While I have created another application with similar code using locaiton as "FileSystem", it works completely fine. But its not working with "http"as location. So, how can I run this code. I am using IIS ver 5.1 in the local and IIS ver 6.0 in the server.
    The thing gets stuck in -->  MSdoc.Documents.Open(ref source, ref Unknown, ref Unknown, ref Unknown,
                        ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown,
                        ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown);

    Here is the Code sample:

    private Microsoft.Office.Interop.Word.ApplicationClass MSdoc;
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            string str_path=Server.MapPath("");
            object Unknown = Type.Missing;
            if (flUploadDoc.FileName.Substring(flUploadDoc.FileName.LastIndexOf('.') + 1).ToLower() == "doc")
            {
                flUploadDoc.PostedFile.SaveAs(str_path+"\\App_Data\\"+flUploadDoc.FileName);
                object source = str_path+"\\App_Data\\"+flUploadDoc.FileName;
                object target = str_path+"\\App_Data\\Target.pdf";
                if (MSdoc == null)
                {
                    MSdoc = new Microsoft.Office.Interop.Word.ApplicationClass();
                }
                try
                {
                    MSdoc.Visible = true;

                    MSdoc.Documents.Open(ref source, ref Unknown, ref Unknown, ref Unknown,
                        ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown,
                        ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown);
                    MSdoc.Application.Visible = true;
                    MSdoc.WindowState = WdWindowState.wdWindowStateMaximize;
                    object Format = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF;
     
  •  07-05-2009, 1:14 AM 186893 in reply to 186853

    Re: Fix Widht & Height for Rows & Columns

    Hi,

    Thanks for providing us further details.

    1) When you hide the row/column headers in the GridWeb, do you set the height and width of a row/column in code or visually? If you set it visually, what are the steps involved to extend or decrease the height or width of a row/column? we will also check it on our side.

    2) Well, I did not use MS Word automation APIs, so I cannot help you much. But I think if it allows to open .doc files from streams, you can do using the steps involved, e.g. try to get the .doc file into streams from the http location, now open it into streams. Furthermore, I am not sure if it works correctly but you may just try it to check.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
View as RSS news feed in XML