Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
221
DropdownListColumn of Ultrawebgrid
posted

Hi,

I have a dropdownlist column in my ultrawebgrid.

The code I used for binding the values to this column is:

  

DataSet dsskil = new DataSet();

dsskil = rectskills.recruitmntSkillsproc(8, 0, docid, deptid, finyr, desg, 0, 0, 0, "");

lstSkill.DataTextField = "skillM_SkillsNV";

lstSkill.DataValueField = "rectCS_skillsIdI";

lstSkill.DataSource = dsskil;

lstSkill.DataBind();

I have a need to get the value of selected text.

for that i write a code like :

int iSkillId = Convert.ToInt32(uwgSkills.Rows[0].Cells[0].Value.ToString());

At runtime I got an errror on this line as 'Input string was not in correct format'.

How can i get  the selected value from this column.

Thanks in advance. 

  • 28464
    posted

    Hello,

    It is a bit hard to tell without seeing the complete stack trace. Do you have "Format" property set on this particular columns? Can you please paste the complete stack trace you are getting with any additional clues that might help?

    Thanks.