We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to get column name of SfGridDataControl grid using QTP 11?

Hi,

I have an application that has an embedded SfGridDataControl grid. I could use QTP to click on all the cells and get their values. However, I am not able to get the values of the column names.

Is there a specific QTP command that retrieves the column name? For example:
WpfWindow("App_Name").SfGridDataControl("Table_Name").GetColumnName
Or something similar.

Thanks!

3 Replies

KB Kalaiarasan B Syncfusion Team December 9, 2014 05:22 AM UTC

Hi Al Shigetomi,

 Yes, there is a function in QTP to get the column names. Here is the syntax

 /// <summary>

/// For the given table name and column index, the column name in which it is residing can be obtained

/// </summary>

/// <param name="tablename">The name of the table</param>

/// <param name="colindex">The index of the column</param>

/// <returns>Returns the Column name as a string</returns>

[Description("Retrieves the specified column name.")]

string GetColumnName(string tablename, int colindex);

Please try with this function and let me know if you have any concerns

Regards,

Kalai



SR Sriram replied to Kalaiarasan B December 9, 2014 05:22 AM UTC

Hi Al Shigetomi,

 Yes, there is a function in QTP to get the column names. Here is the syntax

 /// <summary>

/// For the given table name and column index, the column name in which it is residing can be obtained

/// </summary>

/// <param name="tablename">The name of the table</param>

/// <param name="colindex">The index of the column</param>

/// <returns>Returns the Column name as a string</returns>

[Description("Retrieves the specified column name.")]

string GetColumnName(string tablename, int colindex);

Please try with this function and let me know if you have any concerns

Regards,

Kalai


Hi- Iam facing issues when I connect to WinSCP from QTP script.

SystemUtil.Run "C:\WinSCP\Winscp.exe", "", "", ""
wait 2
Window("WinSCP Login").WinEdit("Host Name (or IP address)").Set "LoginName"

When QTP reaches the window command, it throws an error "WinSCP Login" Window object was not found in Object Repository.
Check the Object repository to confirm that the object exists or to find the correct name for the object.

I ran this is maintenance mode and added the winscp repository, but still getting the same error.
But when I use PUTTY, it works perfectly. Here I used Window("WinSCP Login").WinEdit("Host Name (or IP address)").Set "Login name"

I also tried using DelphiWindow("DelphiWindow").DelphiEdit("DelphiEdit").Set "Login name" - It throws an error "Unspecified error"

All I want is to provide host name, usename,password in WinSCP Login window thru QTP.

Appreciate all your help.



AR Akila Rajaram Syncfusion Team December 12, 2014 01:27 AM UTC

Hi Al Shigetomi/ Sriram,

 

[@Al Shigetomi]

 

Please ignore the previous update .

 

Our engineer wrongly updated the previous information . We regret to inform you that we don’t have support for specific  QTP command to retrieve the column name .

 

 [@Sriram]

 

Thank you for using Syncfusion Products .

 

We regret to inform you that we couldn’t get your requirement clearly . Could you please share more information on this  .This would be helpful to provide better solution earlier .

 

Please let us know if you have any other queries .

 

Regards,

Akila R

 


Loader.
Live Chat Icon For mobile
Up arrow icon